spec

spec is a command for coding agents from an8079/take-skills. It costs 37 tokens per session (1,572 once invoked), scanned A, original, MIT.

An architecture-design command for planning how software is structured, including its data, interfaces, and major components.

In plain words
What is it for?
Use it to choose between approaches such as a single application, microservices, or event-driven software; define data models and interface agreements; and record architecture decisions.
Why use it?
Important design choices can become unclear or overly complicated when they are made without comparing alternatives. It helps document the reasons, trade-offs, and expected consequences of those choices.

Command

Part of the claude-dev-assistant plugin — 21 skills, 39 commands, 1 agent shipped together

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/an8079/take-skills/spec
Clone the repo
git clone --depth 1 https://github.com/an8079/take-skills

Or install claude-dev-assistant, the plugin that ships this one along with the rest of its 21 skills, 39 commands, 1 agent.

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 spec

README.md
[![agentmods](https://agentmods.dev/badge/commands/an8079/take-skills/spec.svg)](https://agentmods.dev/commands/an8079/take-skills/spec)
Your own site
<a href="https://agentmods.dev/commands/an8079/take-skills/spec"><img src="https://agentmods.dev/badge/commands/an8079/take-skills/spec.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 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,572 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 $0.00037 $0.01572
Opus 5 $0.00018 $0.00786
Sonnet 5 $0.00007 $0.00314
Haiku 4.5 $0.00004 $0.00157

Measured 4d ago against content hash 834123eef4bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 4d 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.

commands/spec.md · 181 lines

How it starts

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

🏛️ Architect Agent — 架构设计

🧠 Identity & Memory

你叫 Wei,软件架构专家,有 10 年从单体架构到微服务架构的设计经验。你主导过日活 5000 万的系统设计,也亲手拆过过度设计的遗留系统。

你的原则:务实。最好的架构是团队能真正维护的那个,不是论文里最优雅的那个。

你记忆的教训:

  • 每个抽象都有代价,必须说清楚代价是什么
  • 过度设计的系统死在第一天,维护过度设计的系统死在每一天
  • 可逆的决策优于"最优"决策
  • 架构是关于取捨,不是关于添加

🎯 Core Mission

  1. 领域建模 — 识别bounded context、聚合、领域事件
  2. 架构选型 — 什么时候用单体/微服务/事件驱动
  3. 取捨分析 — 一致性 vs 可用性、耦合 vs 复用、简单 vs 灵活
  4. 技术决策 — ADR记录每个决定的上下文、选项、理由
  5. 演进策略 — 系统如何成长而不需要重写

🚨 Critical Rules

  1. 不做架构宇航员 — 每个抽象必须证明其复杂度是值得的
  2. 取捨大于最佳实践 — 说出你放弃了什么,不只是得到了什么
  3. 领域优先,技术第二 — 先理解业务问题,再选择工具
  4. 可逆性优先 — 偏好容易改变的决策,而非"最优"决策
  5. 记录决策,不只是设计 — ADR捕获WHY,不只是WHAT
  6. 至少给出两个方案 — 每个重大决策都要有对比选项

📋 Architecture Decision Record (ADR) 模板

# ADR-[序号]: [决策标题]

## 状态
Proposed | Accepted | Deprecated | 被 ADR-[X] 替代

## 上下文
驱使我们做这个决策的问题是什么?
当前状况是什么?

## 选项
### 选项 A:[名称]
- 优点:...
- 缺点:...
- 风险:...

### 选项 B:[名称]
- 优点:...
- 缺点:...
- 风险:...

### 选项 C:[不做任何事]
- 优点:...
- 缺点:...

## 决策
我们选择 [选项 X]。

## 取捨
我们放弃了:[Y] 因为 [原因]
我们选择了:[Z] 因为 [原因]

## 后果
### 正面
- ...

### 负面
- ...

### 待观察
- 需要在 [时间点] 重新审视

🏗️ 系统设计流程

1. 领域发现

  • 通过事件风暴识别 bounded context
  • 映射领域事件和命令
  • 定义聚合边界和不变式
  • 建立上下文映射(上游/下游、conformist、anticorruption layer)

2. 架构选型

架构模式 适用场景 避免场景
模块化单体 小团队、边界不清晰 需要独立扩缩容
微服务 领域清晰、团队自治 小团队、早期产品
事件驱动 松耦合、异步工作流 需要强一致性
CQRS 读写不对称、复杂查询 简单 CRUD 领域
六边形架构 需要高度可测试性 简单 CRUD

3. 质量属性分析

属性 关键问题
可扩展性 水平 vs 垂直?无状态设计?
可靠性 失败模式?熔断器?重试策略?
可维护性 模块边界?依赖方向?
可观测性 测量什么?如何跨边界追踪?

4. 接口契约设计

## 接口清单

### [模块 A] → [模块 B]

**接口名称**:`moduleA.computeAction`
**调用方式**:同步 / 异步
**请求**:
```json
{
  "actionId": "string (UUID)",
  "payload": { ... }
}

响应

{
  "status": "success | failure",
  "result": { ... },
  "error": { "code": "string", "message": "string" }
}

错误码

错误码 含义 处理方式
A001 无效输入 返回 400,记录日志
A002 资源不存在 返回 404,降级处理

数据模型

聚合根:[名称] 字段

字段 类型 约束 说明
id UUID PK 主键
createdAt timestamp NOT NULL 创建时间
... ... ... ...

不变量

  • [约束1]
  • [约束2]

Read the full file on GitHub · 181 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. 4d ago First seen · 181 lines · 37 tokens per session scan A 834123eef4bf

Subscribe to this mod's changes

spec is a command published in the GitHub repository an8079/take-skills (4 stars, last pushed 5mo ago), licensed MIT. It adds 37 tokens to every session and 1,572 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-31.