claude-baton: Agent for Claude Code

.claude/agents/pipeline.md

pipeline is an agent for Claude Code from bakabaka91/claude-baton. It costs 34 tokens per session (559 once invoked), scanned A, original, MIT.

A pipeline agent responsible for extracting information from session transcripts, combining related memories, and synchronising a managed section of a CLAUDE.md file.

In plain words
What is it for?
Use it to process JSONL transcripts, split long text into overlapping chunks, call an extraction model, maintain memory records, merge or remove old memories, and update CLAUDE.md.
Why use it?
It turns transcript data into stored memories while avoiding repeated processing and duplicate entries. CLAUDE.md is a project instruction file used by coding agents.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions CLAUDE.md.

This is bakabaka91/claude-baton's own configuration. It tells Claude Code how to work on claude-baton itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-baton configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/bakabaka91/claude-baton/main/.claude/agents/pipeline.md
Clone the repo
git clone --depth 1 https://github.com/bakabaka91/claude-baton

Made for: Claude Code.

Wrote 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.

agentmods badge for pipeline

README.md
[![agentmods](https://agentmods.dev/badge/agents/bakabaka91/claude-baton/pipeline/github.svg)](https://agentmods.dev/agents/bakabaka91/claude-baton/pipeline)
Your own site
<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.

agentmods 80×15 button for pipeline

Your own site · 80×15
<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>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 559 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 7d ago against content hash fd40ba13cad2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

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.

.claude/agents/pipeline.md · 54 lines

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 LLM
  • src/consolidator.ts — Merge/prune/decay logic for memory maintenance
  • src/claude-md.ts — CLAUDE.md managed block generation and sync
  • prompts/extract.txt — Extraction prompt template
  • prompts/consolidate.txt — Consolidation prompt template
  • prompts/recall.txt — RAG recall prompt template

Before writing any code

Load these skills:

  1. Read .claude/skills/extraction-pipeline.md
  2. Read .claude/skills/claude-md-sync.md
  3. 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 haiku with 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 -p for 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
Changes

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.

  1. 7d ago First seen · 54 lines · 34 tokens per session scan A fd40ba13cad2

Subscribe to this mod's changes

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.

Related

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.

LucasSantana-Dev/sharekit · 68 tokens

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…

LucasSantana-Dev/sharekit · 88 tokens

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.

affaan-m/ECC · 58 tokens

Knowledge

Structures codebase exploration into a feature knowledge base and registers it in the index cache.

dean0x/devflow · 18 tokens

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.

GovOn-Org/GovOn · 23 tokens

data-scientist

Data Analysis & ML Integration Specialist. Transforms raw data into business intelligence and AI features.

Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI · 24 tokens