Borrowing it
Nothing to install: this file belongs to JoakimCarlsson/bastion. 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/JoakimCarlsson/bastion/main/.claude/commands/pipeline.mdgit clone --depth 1 https://github.com/JoakimCarlsson/bastionWrote 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/joakimcarlsson/bastion/pipeline)<a href="https://agentmods.dev/commands/joakimcarlsson/bastion/pipeline"><img src="https://agentmods.dev/badge/commands/joakimcarlsson/bastion/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/commands/joakimcarlsson/bastion/pipeline"><img src="https://agentmods.dev/badge/commands/joakimcarlsson/bastion/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.00067 | $0.02411 |
| Opus 5 | $0.00034 | $0.01205 |
| Sonnet 5 | $0.00013 | $0.00482 |
| Haiku 4.5 | $0.00007 | $0.00241 |
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 9d 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 — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/pipeline — hardened delivery loop
You are the pipeline orchestrator. Invoke each agent in turn via the Agent tool, parse the HANDOFF:* block in their final output against the schema in docs/pipeline-handoff-schema.md, and route to the next agent based on the verdict.
Issue number for this run: $ARGUMENTS
How chaining works in Claude Code
.cursor/agents/ and .github/agents/ use frontmatter handoffs: to fire the next agent automatically. Claude Code does not have that mechanism — subagents return a single summary and stop. This slash command bridges the gap.
Every agent in this pipeline ends with one of these typed blocks (full field list in docs/pipeline-handoff-schema.md):
HANDOFF:PLAN(planner → red-team → coder)HANDOFF:IMPLEMENTATION(coder → smoke-tester)HANDOFF:VERIFIED(smoke-tester → reviewer)HANDOFF:FIX(smoke-tester or reviewer → coder)HANDOFF:APPROVED(reviewer → user)
Treat the block as canonical — pass it verbatim to the next agent in the prompt.
Run setup (do this once at the very start)
- Pick a
run_id:YYYYMMDD-HHMMSS-<6-hex>(UTC, e.g.20260523-140812-a3f9b1). UseBashto compute it. - Create the log directory:
.pipeline-runs/$ARGUMENTS/. - Open an empty
run.jsonlat.pipeline-runs/$ARGUMENTS/<run_id>.jsonl. - Initialise counters in memory:
tokens_total = 0, per-stageattempt = 0,signatures_seen = {}. - Resolve the token budget: read
$env:BASTION_PIPELINE_BUDGET(PowerShell) or$BASTION_PIPELINE_BUDGET(bash); default to 400000 if unset.
Validation contract (apply at every stage boundary)
Before invoking the next stage, run these checks against the block returned by the prior stage:
- Envelope: the block is fenced by
---HANDOFF:<TYPE>---and---END HANDOFF---on their own lines. - YAML: the body parses as YAML (use a tiny Bash one-liner with
python -coryqif needed). - Common fields:
schema_version,issue_number,issue_url,next_agentare all present. - Type-specific fields: every required field for the block type per
docs/pipeline-handoff-schema.mdis present and non-empty. - Cross-references: for
HANDOFF:IMPLEMENTATIONand beyond, every AC id from the originatingHANDOFF:PLANmust appear inac_mapping[]/spec_conformance[].
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.
- 9d ago First seen · 165 lines · 67 tokens per session scan A 996136b47659
pipeline is a command published in the GitHub repository JoakimCarlsson/bastion (2 stars, last pushed 3mo ago), licensed MIT. It adds 67 tokens to every session and 2,411 once invoked, about $0.0003 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 commands, from other repositories
workflow-automate
You are a workflow automation expert specializing in creating efficient CI/CD pipelines, GitHub Actions workflows, and automated development processes. Design and implement automation that reduces manual work, improves consistency, and accelerates delivery while maintaining quality and security.
publish
Publish oh-my-opencode to npm via GitHub Actions workflow.
upload-report
Run automation and upload or verify Katalon Platform reports for Katalon Studio/KRE, JUnit XML, and Playwright reports. Use when you need to combine Katalon MCP project/result discovery with Katalon CLI execution, Katalon Report Uploader, or @katalon/playwright-reporter; configure report folders, report types…
green-repo
Drive the whole repository to a verified-green baseline — typecheck, lint, tests, build — with authorized fixing of pre-existing debt.
start-11-1.es
Lección 11-1: Introducción a GitHub Actions!
start-11-1
A guided lesson on the basics of GitHub Actions workflows, including creating a workflow folder and running a Hello World example.