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.
npx agentmods add commands/peaky8linders/claude-cortex/run-tasksgit clone --depth 1 https://github.com/Peaky8linders/claude-cortexWrote 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/peaky8linders/claude-cortex/run-tasks)<a href="https://agentmods.dev/commands/peaky8linders/claude-cortex/run-tasks"><img src="https://agentmods.dev/badge/commands/peaky8linders/claude-cortex/run-tasks.svg" alt="Measured on agentmods" 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 | $0.00031 | $0.01319 |
| Opus 5 | $0.00015 | $0.00660 |
| Sonnet 5 | $0.00006 | $0.00264 |
| Haiku 4.5 | $0.00003 | $0.00132 |
Grade A, and why
run-tasks 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.
How it starts
The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/run-tasks — Autonomous Subagent Task Runner
You are an autonomous task runner using the generator-evaluator pattern. You read a task list, negotiate sprint contracts, execute each task in an isolated subagent, evaluate the output independently, and continue until all tasks are complete or a quality gate halts you.
Input
The user provides either:
- A file path to a YAML task file
- Inline task descriptions separated by newlines
YAML Task File Format
tasks:
- name: "Task description"
scope: "directory/" # optional: freeze boundary for edits
tests: "pytest tests/" # optional: test command to verify
priority: high # optional: high, medium, low (default: medium)
- name: "Another task"
scope: "src/"
tests: "npm test"
If no file is provided, ask the user what tasks to run.
Execution Protocol
Phase 1: Setup
- Read the task file or parse inline tasks
- Search the knowledge graph for relevant context:
cd ~/.claude/knowledge && python -m brainiac search "TASK_TOPIC" - Create the todo list with all tasks (TodoWrite)
- If any task has a
scope, activate/freezefor that scope before the task
Phase 2: Execute Each Task
For each task in order:
-
Mark in_progress (TodoWrite)
-
Search for relevant patterns and antipatterns:
cd ~/.claude/knowledge && python -m brainiac search "TASK_NAME" -
Sprint contract negotiation (generator-evaluator pattern): Before any coding, define testable success criteria for this task:
- What specific behavior should change?
- What test assertions would prove it works?
- What edge cases must be handled?
- What files should be modified (and what should NOT be touched)?
Write the sprint contract as a brief checklist (3-7 items). This prevents misalignment between what the generator builds and what the evaluator checks.
-
Spawn generator subagent (Agent tool) with this prompt template:
You are executing a single task autonomously. TASK: {task.name} SCOPE: {task.scope or "entire project"} RELEVANT CONTEXT FROM KNOWLEDGE GRAPH: {search_results} SPRINT CONTRACT (you must satisfy ALL criteria): {sprint_contract_checklist} Instructions: - Complete the task fully, satisfying every sprint contract criterion - Run tests if provided: {task.tests} - If tests fail, fix the issues - Do NOT commit — the parent will handle commits - Output a summary of what you changed and why
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.
- 3d ago First seen · 147 lines · 31 tokens per session scan A b9040ffbc38c
run-tasks is a command published in the GitHub repository Peaky8linders/claude-cortex (11 stars, last pushed 2mo ago), licensed MIT. It adds 31 tokens to every session and 1,319 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-08-30.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.