kana-spec

kana-spec is a command for Claude Code from Linaqruf/kana-code-plugins. It costs 112 tokens per session (1,963 once invoked), scanned A, original, MIT.

A guided process for writing or updating a grounded specification for a project, feature, design system, API, or migration. A specification records decisions and rules so future coding sessions can work from the same information.

In plain words
What is it for?
Use it to investigate an existing codebase, clarify requirements, check a draft for gaps, and produce SPEC.md, CLAUDE.md, and prompt.md files.
Why use it?
It turns scattered requirements and codebase knowledge into durable documents. This reduces repeated explanations and makes later implementation more consistent.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the kana-spec plugin — 1 command, 2 agents shipped together

Good fit Use it to investigate an existing codebase, clarify requirements, check a draft for gaps, and produce SPEC.md, CLAUDE.md, and prompt.md files.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Linaqruf/kana-code-plugins
Claude Code
/plugin install kana-spec

Made for: Claude Code.

Or install kana-spec, the plugin that ships this one along with the rest of its 1 command, 2 agents.

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 kana-spec

README.md
[![agentmods](https://agentmods.dev/badge/commands/linaqruf/kana-code-plugins/kana-spec/github.svg)](https://agentmods.dev/commands/linaqruf/kana-code-plugins/kana-spec)
Your own site
<a href="https://agentmods.dev/commands/linaqruf/kana-code-plugins/kana-spec"><img src="https://agentmods.dev/badge/commands/linaqruf/kana-code-plugins/kana-spec/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 kana-spec

Your own site · 80×15
<a href="https://agentmods.dev/commands/linaqruf/kana-code-plugins/kana-spec"><img src="https://agentmods.dev/badge/commands/linaqruf/kana-code-plugins/kana-spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 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,963 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.00112 $0.01963
Opus 5.5 $0.00045 $0.00785
Sonnet 5.5 $0.00022 $0.00393
Haiku 4.5 $0.00011 $0.00196

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

Security

Grade A, and why

kana-spec 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 1mo 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.

plugins/kana-spec/commands/kana-spec.md · 162 lines

How it starts

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

Subject of this spec engagement: $ARGUMENTS (free-form — infer; if empty, the subject is the whole project)

The Job

The product is not the spec file — it is better future agent sessions. A spec front-loads decisions into durable contracts: the spec is what a future session READS, SPEC/ files are what it LOOKS UP, CLAUDE.md points at both, prompt.md restarts the loop. Every choice below serves that: a fresh session with zero context must be able to act correctly from the artifacts alone.

The Model: Subject × Mode

Every engagement is one pipeline over two coordinates:

  • Subject — what is being specified: the whole project, a feature, the design system, an API, a migration. Infer from the user's words + scout findings. Scale follows: project-scale → SPEC.md at root; component-scale → SPEC/<slug>.md.
  • Mode — Plan (subject doesn't exist yet), Document (it exists; capture reality), Overhaul (it exists; audit it, then re-derive from first principles with a phased migration checklist).

There are no other routes. Legacy-style arguments ("feature auth", "design:overhaul") read naturally as subject/mode hints.

Pipeline

Steps are tagged: [execute] = do directly, no deliberation; [reason deeply] = slow down, this is where judgment earns its keep.

1. SCOUT [execute]

ALWAYS spawn the spec-scout agent before framing — skipping it is only allowed for true greenfield (empty directory). Pass: the subject + repo path. If the repo is large (>~200 source files) or the subject spans clearly separate concerns, spawn 2-3 scouts in parallel in the same message, each with a narrower beat (e.g. structure+stack / data+API / conventions+tests).

The scout returns a cited map: every claim carries file:line evidence or is marked unknown. Treat it as the interview's pre-fill source, never as something to re-derive yourself in the main context.

2. FRAME [execute]

One AskUserQuestion confirming subject, mode, and scale — options pre-filled from scout findings (e.g. if the scout found an existing SPEC.md, offer Update vs Fresh; if the user asked "what next?" with no subject, present the gap between scout map and existing spec as candidate subjects).

Read the full file on GitHub · 162 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. 1mo ago First seen · 162 lines · 112 tokens per session scan A b0dddb148493

Subscribe to this mod's changes

kana-spec is a command published in the GitHub repository Linaqruf/kana-code-plugins (4 stars, last pushed 22d ago), licensed MIT. It adds 112 tokens to every session and 1,963 once invoked, about $0.0004 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.