Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/Codeblockz/langchain-community-pluginWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/codeblockz/langchain-community-plugin/new-rag)<a href="https://agentmods.dev/commands/codeblockz/langchain-community-plugin/new-rag"><img src="https://agentmods.dev/badge/commands/codeblockz/langchain-community-plugin/new-rag/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/codeblockz/langchain-community-plugin/new-rag"><img src="https://agentmods.dev/badge/commands/codeblockz/langchain-community-plugin/new-rag.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00021 | $0.03455 |
| Opus 5.5 | $0.00008 | $0.01382 |
| Sonnet 5.5 | $0.00004 | $0.00691 |
| Haiku 4.5 | $0.00002 | $0.00346 |
Grade A, and why
new-rag scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 602 lines — stays where its author put it; the contents beside it link to each section on GitHub.
New RAG Pipeline Command
Create a new RAG pipeline file with best practices baked in.
Workflow
-
Ask the user which vector store they want:
InMemory- Quick prototyping, no persistenceFAISS- Local, file-based persistenceChroma- Local with server optionpgvector- PostgreSQL-basedPinecone- Managed cloud service
-
Get filename from argument or ask user (default:
rag_pipeline.py) -
Generate the RAG file using the appropriate template below
-
Inform user about next steps (install dependencies, configure embeddings)
Templates
InMemory Template
"""
RAG Pipeline using InMemoryVectorStore
Install: pip install langchain langchain-openai
"""
from langchain_community.document_loaders import WebBaseLoader
from langchain_text_splitters import RecursiveCharacterTextSplitter
from langchain_core.vectorstores import InMemoryVectorStore
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
from langchain_core.runnables import RunnablePassthrough
from langchain_openai import OpenAIEmbeddings, ChatOpenAI
# 1. Load documents
def load_documents(urls: list[str]):
"""Load documents from URLs."""
docs = []
for url in urls:
loader = WebBaseLoader(url)
docs.extend(loader.load())
return docs
# 2. Split into chunks
def split_documents(docs, chunk_size=1000, chunk_overlap=200):
"""Split documents into chunks for embedding."""
splitter = RecursiveCharacterTextSplitter(
chunk_size=chunk_size,
chunk_overlap=chunk_overlap,
add_start_index=True,
)
return splitter.split_documents(docs)
# 3. Create vector store
def create_vectorstore(chunks):
"""Create vector store from document chunks."""
embeddings = OpenAIEmbeddings()
vectorstore = InMemoryVectorStore.from_documents(chunks, embeddings)
return vectorstore
# 4. Build RAG chain
def build_rag_chain(vectorstore):
"""Build the RAG chain."""
retriever = vectorstore.as_retriever(search_kwargs={"k": 4})
prompt = ChatPromptTemplate.from_template("""
Answer the question based only on the following context.
If you cannot answer based on the context, say "I don't know."
Context:
{context}
Question: {question}
Answer:
""")
llm = ChatOpenAI(model="gpt-4o", temperature=0)
def format_docs(docs):
return "\n\n".join(doc.page_content for doc in docs)
chain = (
{"context": retriever | format_docs, "question": RunnablePassthrough()}
| prompt
| llm
| StrOutputParser()
)
return chain
def main():
# Example usage
urls = [
"https://example.com/page1",
"https://example.com/page2",
]
print("Loading documents...")
docs = load_documents(urls)
print(f"Loaded {len(docs)} documents")
print("Splitting documents...")
chunks = split_documents(docs)
print(f"Created {len(chunks)} chunks")
print("Creating vector store...")
vectorstore = create_vectorstore(chunks)
print("Building RAG chain...")
chain = build_rag_chain(vectorstore)
# Query
question = "What is this about?"
print(f"\nQuestion: {question}")
answer = chain.invoke(question)
print(f"Answer: {answer}")
if __name__ == "__main__":
main()
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 602 lines · 21 tokens per session scan A 31e5ad9cc074
new-rag is a command published in the GitHub repository Codeblockz/langchain-community-plugin (3 stars, last pushed 9mo ago), licensed Apache-2.0. It adds 21 tokens to every session and 3,455 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
build-corpus
Use when the user invokes /goal-flight build-corpus to build or refresh the private Goal Flight dispatch-context corpus.
rag-tune
Audit a RAG pipeline for retrieval quality and cost, and emit prioritized concrete fixes.
index
Index this repository for local RAG search, then report which rung it is on — descriptions still to write, a promotion to apply, or nothing left.
ingest
Ingest a URL, directory, or file into your knowledge base. remember = a specific durable fact, ingest = a URL, learn = a distilled lesson that gets retrieval preference.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.