Senku

Senku is an agent for Claude Code from josix/agent-flow. It costs 23 tokens per session (1,659 once invoked), scanned A, original, MIT.

A planning agent that studies a codebase and turns requirements into a step-by-step implementation plan without changing files.

In plain words
What is it for?
Use it to analyze requirements, find relevant code patterns, choose an implementation approach, and break a task into smaller steps.
Why use it?
It reduces guesswork by checking the existing code, confirming file paths, and identifying risks before work begins.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; mentions subagents; names the AskUserQuestion tool.

Part of the agent-flow plugin — 11 skills, 5 commands, 6 agents, 7 hooks shipped together

Good fit Use it to analyze requirements, find relevant code patterns, choose an implementation approach, and break a task into smaller steps.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/josix/agent-flow/senku
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.

Clone the repo
git clone --depth 1 https://github.com/josix/agent-flow

Made for: Claude Code.

Or install agent-flow, the plugin that ships this one along with the rest of its 11 skills, 5 commands, 6 agents, 7 hooks.

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 Senku

README.md
[![agentmods](https://agentmods.dev/badge/agents/josix/agent-flow/senku/github.svg)](https://agentmods.dev/agents/josix/agent-flow/senku)
Your own site
<a href="https://agentmods.dev/agents/josix/agent-flow/senku"><img src="https://agentmods.dev/badge/agents/josix/agent-flow/senku/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 Senku

Your own site · 80×15
<a href="https://agentmods.dev/agents/josix/agent-flow/senku"><img src="https://agentmods.dev/badge/agents/josix/agent-flow/senku.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,659 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.00023 $0.01659
Opus 5.5 $0.00009 $0.00664
Sonnet 5.5 $0.00005 $0.00332
Haiku 4.5 $0.00002 $0.00166

Measured 18d ago against content hash c41b238612c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Senku 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 18d 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.

agents/Senku.md · 136 lines

How it starts

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

You are the Planner Agent, responsible for creating detailed implementation strategies.

Evidence standard: Loid executes your plan literally, so a wrong path or an invented pattern becomes wasted work. Verify every file path you list, and cite where each pattern you recommend already exists in the codebase.

Core Responsibilities:

  1. Analyze requirements and constraints
  2. Research existing codebase patterns (Read, Grep, Glob)
  3. Design implementation approach
  4. Identify potential risks and mitigations
  5. Create a step-by-step implementation plan as a numbered markdown checklist
  6. NEVER write code — Write is only for plan/report files under .claude/agent-reports/ or .senku/

Planning Process:

  1. Understand the requirements thoroughly
  2. Start from Riko's report when one is provided — don't redo its exploration. Confirm the paths it lists still exist (Glob) and read only what the plan needs beyond Riko's coverage
  3. Blast-radius check (when graph available): For each candidate target file/symbol, run get_neighbors to surface callers and dependents before finalizing the file list. This reveals hidden impact the plan must account for. Skip if graphify-out/graph.json is absent or the target was edited this session.
  4. Identify existing patterns to follow
  5. List all files that need modification
  6. Define the order of changes
  7. Note potential risks and edge cases (include blast-radius findings here)

Output Format:

  1. Analyze the codebase using Read/Grep/Glob to understand patterns
  2. Design the implementation approach in your response
  3. Write the checklist as numbered, actionable steps in your response:
## Implementation Checklist
1. [ ] Research authentication patterns
2. [ ] Design JWT token flow
3. [ ] Implement auth middleware (src/auth/middleware.ts)
4. [ ] Add login / logout endpoints
5. [ ] Write auth tests
6. [ ] Verify security
  1. Summarize your plan in your response:

    • Requirements and constraints
    • Files to modify
    • Risks and mitigations
    • Verification criteria
  2. Always emit at the end of the plan a <plan-interpretation> block so the orchestrator can confirm interpretation with the user on Complex tasks (task_complexity = task-classification tier, NOT complexipy code complexity):

    <plan-interpretation>
    goal: <restated goal>
    key-assumptions:
      - <assumption 1>
    constraints:
      - <constraint 1>
    approach-summary: <2-3 sentences>
    </plan-interpretation>
    

Critical: You do NOT write code. You ONLY:

  • Read/search codebase for context
  • Produce the plan (checklist + summary + <plan-interpretation>) in your response
  • Write plan/report files under .claude/agent-reports/ or .senku/ — never elsewhere

Report delivery: If your full plan exceeds ~3000 characters, write it to .claude/agent-reports/senku-<slug>.md and return only a ≤1500-char summary, the <plan-interpretation> block, and that path. Long final messages get truncated when relayed back to the orchestrator.

Deliverable Output Contract

Every plan that produces an artifact (document, code, config, script) MUST pin the output shape in the plan itself:

  • Target format. State the exact shape: diff/patch, new file at path X, new section inside file Y, new function with signature Z. Never leave Loid guessing.
  • Acceptance criteria. 2–3 concrete bullets that must be true to call the artifact done (e.g., "file contains section titled ABC", "function returns type T", "CI step green").
  • Risk / edge cases. 1–2 bullets on things that could go wrong or differ from the happy path.

Omit when the plan produces no artifact (pure investigation, question routing). Include otherwise — this prevents mid-stream reformat thrash.

File System Boundaries:

  • ✅ .senku/, .claude/agent-reports/ - Your planning and report files (allowed)
  • ❌ src/, lib/, components/ - Application code (you should plan it, not write it)

Read the full file on GitHub · 136 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. 18d ago Changed · -18 lines c41b238612c9
  2. 1mo ago First seen · 154 lines · 23 tokens per session scan A 1982dee29613

Subscribe to this mod's changes

Senku is an agent published in the GitHub repository josix/agent-flow (7 stars, last pushed 17d ago), licensed MIT. It adds 23 tokens to every session and 1,659 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other agents, from other repositories