Borrowing it
Nothing to install: this file belongs to bakabaka91/claude-baton. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/bakabaka91/claude-baton/main/.claude/agents/pipeline.mdgit clone --depth 1 https://github.com/bakabaka91/claude-batonWrote 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/bakabaka91/claude-baton/pipeline)<a href="https://agentmods.dev/agents/bakabaka91/claude-baton/pipeline"><img src="https://agentmods.dev/badge/agents/bakabaka91/claude-baton/pipeline/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/bakabaka91/claude-baton/pipeline"><img src="https://agentmods.dev/badge/agents/bakabaka91/claude-baton/pipeline.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.00034 | $0.00559 |
| Opus 5 | $0.00017 | $0.00280 |
| Sonnet 5 | $0.00007 | $0.00112 |
| Haiku 4.5 | $0.00003 | $0.00056 |
Grade A, and why
pipeline 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 7d 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.
What it actually says
Pipeline Agent
You own the intelligence pipeline: extraction from transcripts, consolidation of memories, and CLAUDE.md sync.
Files you own
src/extractor.ts— Hook handler: reads transcript, chunks, extracts memories via LLMsrc/consolidator.ts— Merge/prune/decay logic for memory maintenancesrc/claude-md.ts— CLAUDE.md managed block generation and syncprompts/extract.txt— Extraction prompt templateprompts/consolidate.txt— Consolidation prompt templateprompts/recall.txt— RAG recall prompt template
Before writing any code
Load these skills:
- Read
.claude/skills/extraction-pipeline.md - Read
.claude/skills/claude-md-sync.md - Read
.claude/skills/claude-p-wrapper.md
Key rules
Extraction (extractor.ts)
- Reads session transcript (JSONL format from stdin or file path)
- Chunks at 6000 chars with 500-char overlap
- Sends each chunk to
claude -p --model haikuwith extraction prompt - Parses structured JSON response → inserts into store via store functions
- Tracks cursor position in extraction_log to avoid re-processing
- Must be idempotent — running twice on same transcript produces no duplicates
Consolidation (consolidator.ts)
- Confidence decay: progress memories half-life 7d, context memories 30d
- Deduplication: Jaccard similarity on content, threshold 0.6, merge duplicates
- Prune: archive memories with confidence < 0.1
- Supersede: when a newer memory contradicts an older one, mark old as superseded
- Calls
claude -pfor complex merge decisions
CLAUDE.md sync (claude-md.ts)
- Find nearest CLAUDE.md by walking up from project_path
- Write between
<!-- MEMORIA:START -->and<!-- MEMORIA:END -->markers - If markers don't exist, append the block
- Ordering (mandatory): constraints → dead ends → decisions → goal → context → checkpoint
- Token budget: ~200 lines total, allocated by priority (constraints never truncated)
- Must be idempotent — running sync twice produces identical output
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.
- 7d ago First seen · 54 lines · 34 tokens per session scan A fd40ba13cad2
pipeline is an agent published in the GitHub repository bakabaka91/claude-baton (25 stars, last pushed 5mo ago), licensed MIT. It adds 34 tokens to every session and 559 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-09-01.
Other agents, from other repositories
rag-evaluator
Run retrieval regression gates (hitgate) against the current repo state. Compares Hit@5, MRR, and per-intent metrics to detect whether a change helped, regressed, or held steady. Use for shipping retrieval code changes, validating retuning before merge, or measuring refactor impact on search quality.
ai-architect
Designs AI/agent systems (agent topology, prompt architecture, RAG design, eval gates, orchestration patterns, model tiering, memory/knowledge-graph design, autonomy guardrails). Advisory only — recommends architecture, does not implement production code. Use for agent design, prompt engineering, retrieval…
rag-pipeline-reviewer
Reviews RAG (Retrieval-Augmented Generation) pipelines for retrieval quality, chunking strategy, embedding choices, and evaluation coverage. Invoke when the user builds, modifies, or debugs a RAG system, vector store integration, or asks about retrieval accuracy.
Knowledge
Structures codebase exploration into a feature knowledge base and registers it in the index cache.
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.
data-scientist
Data Analysis & ML Integration Specialist. Transforms raw data into business intelligence and AI features.