analyze

analyze is a command for Claude Code from loulanyue/spec-kit-zh. It costs 24 tokens per session (1,927 once invoked), scanned A, a copy of speckit.analyze, MIT.

A read-only command that checks whether spec.md, plan.md, and tasks.md agree and are complete before implementation. These files describe a feature's requirements, approach, and work items.

In plain words
What is it for?
Use it after tasks.md has been generated to produce a Simplified Chinese quality report with issues, severity, coverage, and suggested next steps.
Why use it?
It finds contradictions, duplicated work, unclear requirements, and missing definitions before coding begins, without changing the project files.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions Codex.

Good fit Use it after tasks.md has been generated to produce a Simplified Chinese quality report with issues, severity, coverage, and suggested next steps.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/loulanyue/spec-kit-zh/analyze
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/loulanyue/spec-kit-zh

Made for: Claude Code.

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 analyze

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/loulanyue/spec-kit-zh/analyze"><img src="https://agentmods.dev/badge/commands/loulanyue/spec-kit-zh/analyze.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 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,927 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 81% copy Near-identical to another mod 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.00024 $0.01927
Opus 5 $0.00012 $0.00963
Sonnet 5 $0.00005 $0.00385
Haiku 4.5 $0.00002 $0.00193

Measured 9d ago against content hash ce1fdee8f2c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

analyze 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.

Origin

This is a copy

81% identical to speckit.analyze — 63 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

templates/commands/analyze.md · 214 lines

How it starts

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

用户输入

$ARGUMENTS

在继续之前,你必须考虑用户输入(如果不为空)。

语言要求

  • 完整分析报告、问题发现、严重级别说明、覆盖摘要和下一步建议都必须使用简体中文。
  • requirement key、任务 ID、文件路径和原始标识保持机器可读原样。

目标

在实施前,对三个核心制品 spec.mdplan.mdtasks.md 进行一致性检查,识别其中的不一致、重复、歧义与定义不足之处。本命令只能在 tasks 命令已成功生成完整 tasks.md 后执行;大多数 agent 使用 /speckit.tasks,Codex CLI 使用 /prompts:speckit-tasks

操作约束

严格只读:不得修改任何文件。仅输出结构化分析报告。可以提供可选的修复建议计划,但后续若需要编辑文件,必须先获得用户明确批准。

宪章优先级:项目宪章(/memory/constitution.md)在本分析范围内具有不可协商的优先级。凡与宪章冲突的问题,一律视为 CRITICAL,必须通过调整 spec、plan 或 tasks 来解决,而不能弱化、重解释或忽略宪章原则。若原则本身需要变更,必须通过独立且明确的宪章更新流程完成,而不能在 analyze 命令中处理。

Execution Steps

1. Initialize Analysis Context

Run {SCRIPT} once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:

  • SPEC = FEATURE_DIR/spec.md
  • PLAN = FEATURE_DIR/plan.md
  • TASKS = FEATURE_DIR/tasks.md

Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command). For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'''m Groot' (or double-quote if possible: "I'm Groot").

2. Load Artifacts (Progressive Disclosure)

Load only the minimal necessary context from each artifact:

From spec.md:

  • Overview/Context
  • Functional Requirements
  • Non-Functional Requirements
  • User Stories
  • Edge Cases (if present)

From plan.md:

  • Architecture/stack choices
  • Data Model references
  • Phases
  • Technical constraints

From tasks.md:

  • Task IDs
  • Descriptions
  • Phase grouping
  • Parallel markers [P]
  • Referenced file paths

From constitution:

  • Load /memory/constitution.md for principle validation

3. Build Semantic Models

Create internal representations (do not include raw artifacts in output):

  • Requirements inventory: Each functional + non-functional requirement with a stable key (derive slug based on imperative phrase; e.g., "User can upload file" → user-can-upload-file)
  • User story/action inventory: Discrete user actions with acceptance criteria
  • Task coverage mapping: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
  • Constitution rule set: Extract principle names and MUST/SHOULD normative statements

Read the full file on GitHub · 214 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. 9d ago First seen · 214 lines · 24 tokens per session scan A ce1fdee8f2c3

Subscribe to this mod's changes

analyze is a command published in the GitHub repository loulanyue/spec-kit-zh (339 stars, last pushed 6d ago), licensed MIT. It adds 24 tokens to every session and 1,927 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 81% identical to speckit.analyze, differing in 63 lines, and is treated as a copy.