subagents

subagents is a cursor rule for Cursor from JoakimCarlsson/bastion. It costs 661 tokens per session, scanned A, original, MIT.

A set of instructions for coordinating coding agents through a defined development workflow. It covers named roles, handoff messages, and command-line use of GitHub and Git.

In plain words
What is it for?
Use it to create issues, plan linked branches, implement changes, run build and smoke tests, review code, and pass completed work to the next agent.
Why use it?
It helps divide work between planning, coding, testing, and review without losing context between steps. It also clarifies which tools each role should use.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/joakimcarlsson/bastion/subagents
Clone the repo
git clone --depth 1 https://github.com/JoakimCarlsson/bastion

Made for: Cursor.

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 subagents

README.md
[![agentmods](https://agentmods.dev/badge/rules/joakimcarlsson/bastion/subagents.svg)](https://agentmods.dev/rules/joakimcarlsson/bastion/subagents)
Your own site
<a href="https://agentmods.dev/rules/joakimcarlsson/bastion/subagents"><img src="https://agentmods.dev/badge/rules/joakimcarlsson/bastion/subagents.svg" alt="Measured on agentmods" height="20"></a>
Per session 661 This file is loaded in full into every session.
When invoked 661 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00661 $0.00661
Opus 5 $0.00331 $0.00331
Sonnet 5 $0.00132 $0.00132
Haiku 4.5 $0.00066 $0.00066

Measured 3d ago against content hash 8fcc40498884, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

subagents 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 3d 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.

.cursor/rules/subagents.mdc · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Subagents and workflow

Tools

  • GitHub: gh only (issues, labels, milestones, PRs) — not the web UI for bulk work
  • Git: local repo operations only
  • PowerShell: use --body-file for issue/PR bodies; no bash heredocs

Agents (invoke explicitly)

Agent Slash Role
issue-creator /issue-creator Issues, labels, milestones — standalone, stops when done
planner /planner Pick issue, gh issue develop → linked task/<N>-<slug> branch, plan (no source edits)
coder /coder Implement from HANDOFF:PLAN or HANDOFF:FIX
smoke-tester /smoke-tester Build, test, HTTP smoke checks
reviewer /reviewer Final review; blocking issues → HANDOFF:FIX → coder; on approval commits, pushes, opens PR

Delivery pipeline: /planner/coder/smoke-tester/reviewer

Auto-handoff (required): When a pipeline agent finishes with a HANDOFF block and next_agent set, immediately delegate to that agent via the Task tool. Pass the full HANDOFF block unchanged in the Task prompt. Do not stop and ask the user to run the next slash command or paste the handoff manually.

HANDOFF Next agent
HANDOFF:PLAN coder
HANDOFF:IMPLEMENTATION smoke-tester
HANDOFF:VERIFIED reviewer
HANDOFF:FIX coder (from smoke-tester or reviewer)

issue-creator is standalone — no auto-chain after it.

HANDOFF blocks

Copy unchanged between agents:

  • HANDOFF:PLAN — planner → coder
  • HANDOFF:IMPLEMENTATION — coder → smoke-tester
  • HANDOFF:VERIFIED — smoke-tester → reviewer
  • HANDOFF:FIX — smoke-tester or reviewer → coder

Small tasks

For typos or one-file fixes, skip planner and smoke-tester; use /coder then auto-handoff to reviewer with HANDOFF:VERIFIED or a minimal verification summary if smoke-tester was skipped.

Verification commands

Before smoke-testing, read .cursor/verify-commands.md. Update that file when the project stack is chosen.

Read the full file on GitHub · 60 lines

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. 3d ago First seen · 60 lines · 661 tokens per session scan A 8fcc40498884

Subscribe to this mod's changes

subagents is a cursor rule published in the GitHub repository JoakimCarlsson/bastion (2 stars, last pushed 3mo ago), licensed MIT. It adds 661 tokens to every session, about $0.0033 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.