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/doggy8088/spec-kit/analyzegit clone --depth 1 https://github.com/doggy8088/spec-kitWhat 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.00036 | $0.02251 |
| Opus 5 | $0.00018 | $0.01125 |
| Sonnet 5 | $0.00007 | $0.00450 |
| Haiku 4.5 | $0.00004 | $0.00225 |
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 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 — 188 lines — stays where its author put it; the contents beside it link to each section on GitHub.
使用者輸入
$ARGUMENTS
你在執行前必須考慮用戶輸入(若非空)。
目標
在實作前,針對三大核心產物(spec.md、plan.md、tasks.md)找出不一致、重複、模糊及規格不足的項目。本指令僅能在/speckit.tasks已成功產生完整tasks.md後執行。
運作限制
嚴格唯讀:不得修改任何檔案。僅輸出結構化分析報告。可選擇性提供修正建議(用戶必須明確同意後,才會手動執行後續編輯指令)。
憲章權威:專案憲章(/memory/constitution.md)在本分析範圍內不可協商。如有憲章衝突,必定屬於「嚴重」等級,必須調整規格、計畫或任務,而非稀釋、曲解或靜默忽略原則本身。若需修改原則,必須在/speckit.analyze之外,另行明確更新憲章。
執行步驟
1. 初始化分析上下文
自 repo 根目錄執行{SCRIPT}一次,並解析 JSON 取得 FEATURE_DIR 與 AVAILABLE_DOCS。推導絕對路徑:
- SPEC = FEATURE_DIR/spec.md
- PLAN = FEATURE_DIR/plan.md
- TASKS = FEATURE_DIR/tasks.md
若缺少任何必要檔案,則中止並顯示錯誤訊息(指示用戶執行缺少的前置指令)。 對於參數中的單引號(如 "I'm Groot"),請使用跳脫語法:例如 'I'''m Groot'(或盡可能使用雙引號:"I'm Groot")。
2. 載入產物(漸進式揭露)
僅載入每個產物中必要的最小上下文:
來自 spec.md:
- 概述/上下文
- 功能性需求(Functional Requirements)
- 非功能性需求(Non-Functional Requirements)
- 使用者故事(User Stories)
- 邊界情境(Edge Cases,若有)
來自 plan.md:
- 架構/技術堆疊選擇
- 資料模型參考
- 階段劃分
- 技術限制
來自 tasks.md:
- 任務 ID
- 描述
- 階段分組
- 平行標記 [P]
- 參考檔案路徑
來自憲章:
- 載入
/memory/constitution.md以進行原則驗證
3. 建立語意模型
建立內部表示(輸出中不得包含原始產物內容):
- 需求清單:每個功能性與非功能性需求,皆需有穩定鍵值(根據命令式片語產生 slug,例如 "User can upload file" →
user-can-upload-file) - 使用者故事/行動清單:獨立的用戶行為及其驗收標準
- 任務覆蓋對應圖:將每個任務對應到一個或多個需求或故事(可依關鍵字/明確參照模式如 ID 或關鍵片語推論)
- 憲章規則集:擷取原則名稱及 MUST/SHOULD 規範性陳述
4. 偵測流程(節省 Token 的分析)
聚焦於高訊號發現。最多列出 50 項發現;其餘彙總於溢出摘要。
A. 重複偵測
- 找出近似重複的需求
- 標記品質較差的敘述以利合併
B. 模糊偵測
- 標記缺乏可衡量標準的模糊形容詞(如 fast、scalable、secure、intuitive、robust)
- 標記未解決的占位符(如 TODO、TKTK、???、
<placeholder>等)
C. 規格不足
- 僅有動詞但缺少對象或可衡量結果的需求
- 缺乏驗收標準對應的使用者故事
- 任務參照了 spec/plan 未定義的檔案或元件
D. 憲章一致性
- 任何與 MUST 原則衝突的需求或計畫項目
- 憲章要求但缺漏的章節或品質門檻
E. 覆蓋缺口
- 沒有任何任務對應的需求
- 未對應需求/故事的任務
- 非功能性需求未反映於任務(如效能、安全性)
F. 不一致
- 術語漂移(同一概念在不同檔案中名稱不一)
- 計畫中提及但規格未定義的資料實體(或反之)
- 任務順序矛盾(如整合任務排在基礎設置任務之前,卻未註明相依性)
- 需求互相衝突(如一處要求 Next.js,另一處指定 Vue)
5. 嚴重性分級
請依下列準則為發現事項分級:
- CRITICAL(嚴重):違反憲章 MUST、缺少核心規格產物,或關鍵需求完全無覆蓋,導致基本功能受阻
- HIGH(高):重複或衝突需求、模糊的安全/效能屬性、無法驗證的驗收標準
- MEDIUM(中):術語漂移、缺少非功能性任務覆蓋、規格不足的邊界情境
- LOW(低):文風/措辭優化、對執行順序無影響的小幅重複
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 · 188 lines · 36 tokens per session scan A 02ce005577fe
analyze is a command published in the GitHub repository doggy8088/spec-kit (287 stars, last pushed 10mo ago), licensed MIT. It adds 36 tokens to every session and 2,251 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.