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.
npx agentmods add skills/codeblockz/langchain-community-plugin/langchain-chainsnpx skills add Codeblockz/langchain-community-plugin --skill langchain-chainsgit clone --depth 1 https://github.com/Codeblockz/langchain-community-pluginWhat 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 | $0.00049 | $0.01427 |
| Opus 5 | $0.00024 | $0.00714 |
| Sonnet 5 | $0.00010 | $0.00285 |
| Haiku 4.5 | $0.00005 | $0.00143 |
Grade A, and why
langchain-chains 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 2d 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 — 217 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LangChain Chains Builder
Quick Decision: Chains vs Agents
| Use Chains when... | Use Agents when... |
|---|---|
| Fixed, predictable workflow | Dynamic decision-making needed |
| Single LLM call or fixed sequence | Multiple iterations, tool selection |
| Processing/transforming data | Interactive task completion |
| Summarization, extraction | Complex multi-step reasoning |
| Low latency critical | Flexibility more important |
LCEL Quick Start
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
from langchain_openai import ChatOpenAI
# Define components
prompt = ChatPromptTemplate.from_template(
"Summarize this text in 3 bullet points:\n\n{text}"
)
llm = ChatOpenAI(model="gpt-4o")
parser = StrOutputParser()
# Compose with pipe operator
chain = prompt | llm | parser
# Invoke
result = chain.invoke({"text": "Long document here..."})
Core LCEL Patterns
RunnablePassthrough (Pass Input Through)
from langchain_core.runnables import RunnablePassthrough
# Pass original input alongside processed value
chain = {
"context": retriever,
"question": RunnablePassthrough(), # Passes input unchanged
} | prompt | llm
RunnableParallel (Execute in Parallel)
from langchain_core.runnables import RunnableParallel
# Run multiple chains simultaneously
parallel = RunnableParallel(
summary=summarize_chain,
keywords=extract_keywords_chain,
sentiment=sentiment_chain,
)
# All run in parallel, results combined
result = parallel.invoke({"text": "Document content..."})
# {"summary": "...", "keywords": [...], "sentiment": "positive"}
RunnableLambda (Custom Functions)
from langchain_core.runnables import RunnableLambda
def process_text(text: str) -> str:
return text.strip().lower()
# Wrap function as runnable
chain = RunnableLambda(process_text) | prompt | llm
Branching (Conditional Routing)
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2d ago First seen · 217 lines · 49 tokens per session scan A 525de209ce4f
langchain-chains is a skill published in the GitHub repository Codeblockz/langchain-community-plugin (3 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 49 tokens to every session and 1,427 once invoked, about $0.0002 per session on Opus 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 skills, from other repositories
data-visualization
Use for creating publication-quality charts and multi-panel analysis summaries. Triggers when tasks involve visualizing data, plotting results, creating charts, or producing visual reports from analysis output.
cuml-machine-learning
Use for GPU-accelerated machine learning on tabular data using NVIDIA cuML. Triggers when tasks involve classification, regression, clustering, dimensionality reduction, or model training on datasets.
blog-post
Writes and structures long-form blog posts, creates tutorial outlines, and optimizes content for SEO with cover image generation. Use when the user asks to write a blog post, article, how-to guide, tutorial, technical writeup, thought leadership piece, or long-form content.
social-media
Drafts engaging social media posts, writes hooks, suggests hashtags, creates thread structures, and generates companion images. Use when the user asks to write a LinkedIn post, tweet, Twitter/X thread, social media caption, social post, or repurpose content for social platforms.
remember
Review the current conversation and capture valuable knowledge — best practices, coding conventions, architecture decisions, workflows, and user feedback — into persistent memory (AGENTS.md) or reusable skills. Use when the user says: (1) remember this, (2) save what we learned, (3) update memory, (4) capture…
textual-screenshot
Capture a Textual terminal UI as an SVG using its headless test harness. Use when asked to make, attach, or preview a screenshot of deepagents-code/dcode or another Textual app, visually verify a TUI state, or render a modal, screen, or widget without a desktop or browser.