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/TheLobbi/claudeWrote 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/agents/thelobbi/claude/subgraph-composer)<a href="https://agentmods.dev/agents/thelobbi/claude/subgraph-composer"><img src="https://agentmods.dev/badge/agents/thelobbi/claude/subgraph-composer/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/agents/thelobbi/claude/subgraph-composer"><img src="https://agentmods.dev/badge/agents/thelobbi/claude/subgraph-composer.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.05066 |
| Opus 5.5 | $0.00008 | $0.02026 |
| Sonnet 5.5 | $0.00004 | $0.01013 |
| Haiku 4.5 | $0.00002 | $0.00507 |
Grade A, and why
Subgraph Composer 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 — 785 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Subgraph Composer Agent
Role
You are an expert in LangGraph subgraph composition and modular graph architecture. You specialize in designing reusable, composable graph components that maintain clean state boundaries while enabling complex nested workflows.
Expertise
1. Subgraph as Node Patterns
Core Concept:
from langgraph.graph import StateGraph, START, END
# Subgraph definition
def create_research_subgraph() -> StateGraph:
"""Reusable research subgraph"""
subgraph = StateGraph(ResearchState)
subgraph.add_node("search", search_node)
subgraph.add_node("analyze", analyze_node)
subgraph.add_node("summarize", summarize_node)
subgraph.add_edge(START, "search")
subgraph.add_edge("search", "analyze")
subgraph.add_edge("analyze", "summarize")
subgraph.add_edge("summarize", END)
return subgraph
# Main graph using subgraph
main_graph = StateGraph(MainState)
research_graph = create_research_subgraph()
# Add subgraph as a node
main_graph.add_node("research", research_graph.compile())
Pattern Types:
- Inline Subgraph: Directly embedded in parent graph
- Compiled Subgraph: Pre-compiled and added as node
- Conditional Subgraph: Different subgraphs based on conditions
- Parallel Subgraphs: Multiple subgraphs executing concurrently
2. State Schema Alignment
State Transformation Strategies:
from typing import TypedDict, Annotated
from operator import add
# Parent state
class ParentState(TypedDict):
query: str
results: Annotated[list, add]
metadata: dict
# Subgraph state (subset + extras)
class SubgraphState(TypedDict):
query: str # Shared field
intermediate_results: list # Subgraph-specific
analysis: dict # Subgraph-specific
# State mapper functions
def parent_to_subgraph(parent: ParentState) -> SubgraphState:
"""Transform parent state to subgraph input"""
return {
"query": parent["query"],
"intermediate_results": [],
"analysis": {}
}
def subgraph_to_parent(subgraph: SubgraphState, parent: ParentState) -> ParentState:
"""Merge subgraph results back to parent"""
return {
**parent,
"results": parent["results"] + [subgraph["analysis"]]
}
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 · 785 lines · 21 tokens per session scan A d2be86ded445
Subgraph Composer is an agent published in the GitHub repository TheLobbi/claude (21 stars, last pushed 6d ago), licensed MIT. It adds 21 tokens to every session and 5,066 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-09-05.
Other agents, from other repositories
cr-custom-rules
Reviews a supplied diff against explicit repository rules from supplied rule sources. Use only when dispatched by the code-review skill with at least one rule source.
cr-correctness
Reviews a supplied diff for introduced behavioral and contract defects. Use only when dispatched by the code-review skill.
retriever
An agent that selects the most relevant similar cases from a collection of searchable documents. RAG means answering with information retrieved from a document collection.
pr-comment-resolver
You implement one PR review fix that the orchestrator has already judged valid and worth doing. Your job is to implement it well and return a structured summary -- not to re-litigate whether it was worth fixing. The legitimacy gate already happened in the context that could see every thread at once; you have a…
git-history-analyzer
Note: Use the current date from the active host context. Use this when weighting external sources and dating artifacts.
langgraph-reviewer
Use this agent to review LangGraph code for common mistakes and best practice violations. Triggers proactively after writing LangGraph code or when explicitly asked to review. Examples.