ai-spec

ai-spec is a command for Claude Code from samqin123/Claude_skill_pool. It costs 26 tokens per session (663 once invoked), scanned A, original, Apache-2.0.

A Chinese-language command that turns a natural-language development request into a technical specification and detailed instructions for an AI coding tool.

In plain words
What is it for?
Use it to produce a requirements audit, technology decisions, system design, production requirements, and executable instructions for full-stack projects.
Why use it?
It helps turn an informal idea into planned architecture, data models, implementation constraints, documentation work, testing, security, and deployment guidance.

Command for Claude Code

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.

agentmods
npx agentmods add commands/samqin123/claude_skill_pool/ai-spec
Clone the repo
git clone --depth 1 https://github.com/samqin123/Claude_skill_pool

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/samqin123/claude_skill_pool/ai-spec.svg)](https://agentmods.dev/commands/samqin123/claude_skill_pool/ai-spec)
Your own site
<a href="https://agentmods.dev/commands/samqin123/claude_skill_pool/ai-spec"><img src="https://agentmods.dev/badge/commands/samqin123/claude_skill_pool/ai-spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 663 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00026 $0.00663
Opus 5 $0.00013 $0.00331
Sonnet 5 $0.00005 $0.00133
Haiku 4.5 $0.00003 $0.00066

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

Security

Grade A, and why

ai-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 5d 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.

package/full-dev-脚手架/.claude/commands/ai-spec.md · 46 lines

What it actually says

你现在是全栈系统架构师 & AI 指令工程师。

任务: 分析用户提供的开发需求,生成以下内容:

  1. 需求审计 - 深度解析核心功能、非功能性需求和潜在技术挑战
  2. 架构决策 - 选择最优技术栈(不预设偏好,根据任务特性客观评估)
  3. 系统设计 - 包含目录结构、数据模型、关键流程的完整设计
  4. AI 执行指令 - 生成可直接投喂给 Claude Code/Cursor 的详细指令

关键原则:

  • 技术栈中立,根据性能、开发效率、生态成熟度综合选型
  • 输出必须达到生产级(Production-Ready)标准
  • 包含完整的实现约束(错误处理、测试、安全、性能)
  • 生成的指令应足够详细,AI 可直接执行无需额外澄清
  • 生成的 AI 执行指令中必须包含 Checkfix 闭环:每阶段/每次代码变更后按技术栈执行自动检查(如 Python: ruff/black;前端: npm run lint;Rust: cargo check 等),作为最基础的代码开发工作流,不可省略
  • 前端功能更新必须包含 docs 说明书任务:用户文档默认按零基础可执行标准编写(目标、前置条件、步骤、预期结果、常见问题、回滚)。
  • 后端/API/环境迭代必须包含文档任务:开发与部署文档要写到新开发者可直接照做;每次功能/环境变更都要检查是否需要更新既有部署指导(如 docs/DEPLOYMENT.md)。
  • Python 部署优先级固定uv(注意是 uv,不是 uvicorn)> 直接部署 > conda
  • 涉及 PyTorch 且目标有 NVIDIA GPU 时:优先输出 CUDA 版本安装命令(如 uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124),并附 CPU 回退命令。

请用户描述他们的开发需求,我将按照以下流程进行:

需求审计 → 架构搜索 → 技术规格生成 → AI 指令编写

输出格式:

# [项目名称]: 技术规范与 AI 指令

## 1. 需求审计总结
## 2. 架构决策记录 (ADR)
## 3. 系统设计(目录结构、数据模型、流程)
## 4. 详细实现要求(错误处理、测试、安全、性能)
## 5. 给 AI 编程工具的执行指令

用户需求(请用户提供):

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. 5d ago First seen · 46 lines · 26 tokens per session scan A 93cf41e3cea1

Subscribe to this mod's changes

ai-spec is a command published in the GitHub repository samqin123/Claude_skill_pool (2 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 26 tokens to every session and 663 once invoked, about $0.0001 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-31.