architecture-decision-records by affaan-m/everything-claude-code
npx skills add https://github.com/affaan-m/everything-claude-code --skill architecture-decision-records在编码会话期间捕捉架构决策。这项技能生成结构化的 ADR 文档,与代码共存,而不是让决策仅存在于 Slack 线程、PR 评论或某人的记忆中。
使用 Michael Nygard 提出的轻量级 ADR 格式,并针对 AI 辅助开发进行调整:
# ADR-NNNN: [决策标题]
**日期**: YYYY-MM-DD
**状态**: proposed | accepted | deprecated | superseded by ADR-NNNN
**决策者**: [参与人员]
## 背景
促使我们做出此决策或变更的问题是什么?
[用 2-5 句话描述情况、约束条件和影响因素]
## 决策
我们提议和/或正在进行的变更是什么?
[用 1-3 句话清晰地陈述决策]
## 考虑的替代方案
### 替代方案 1: [名称]
- **优点**: [好处]
- **缺点**: [弊端]
- **为何不选**: [被拒绝的具体原因]
### 替代方案 2: [名称]
- **优点**: [好处]
- **缺点**: [弊端]
- **为何不选**: [被拒绝的具体原因]
## 后果
由于此变更,哪些事情变得更容易或更困难?
### 积极影响
- [好处 1]
- [好处 2]
### 消极影响
- [权衡 1]
- [权衡 2]
### 风险
- [风险及缓解措施]
当检测到决策时刻时:
docs/adr/ 不存在,在创建目录、一个预填充了索引表头(见下方 ADR 索引格式)的 README.md 以及一个供手动使用的空白 之前,先征求用户确认。未经明确同意,不要创建文件。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
template.mddocs/adr/ 中的现有 ADR 并递增编号docs/adr/NNNN-decision-title.md。如果用户拒绝,则丢弃草稿,不写入任何文件。docs/adr/README.md当用户询问“我们为什么选择 X?”时:
docs/adr/ 是否存在 — 如果不存在,回复:“在此项目中未找到 ADR。您想开始记录架构决策吗?”docs/adr/README.md 索引以查找相关条目docs/
└── adr/
├── README.md ← 所有 ADR 的索引
├── 0001-use-nextjs.md
├── 0002-postgres-over-mongo.md
├── 0003-rest-over-graphql.md
└── template.md ← 供手动使用的空白模板
# 架构决策记录
| ADR | 标题 | 状态 | 日期 |
|-----|-------|--------|------|
| [0001](0001-use-nextjs.md) | 使用 Next.js 作为前端框架 | accepted | 2026-01-15 |
| [0002](0002-postgres-over-mongo.md) | 主数据存储选择 PostgreSQL 而非 MongoDB | accepted | 2026-01-20 |
| [0003](0003-rest-over-graphql.md) | REST API 而非 GraphQL | accepted | 2026-02-01 |
在对话中注意以下表明架构决策的模式:
显式信号
隐式信号(建议记录 ADR — 未经用户确认不要自动创建)
proposed → accepted → [deprecated | superseded by ADR-NNNN]
| 类别 | 示例 |
|---|---|
| 技术选择 | 框架、语言、数据库、云提供商 |
| 架构模式 | 单体 vs 微服务、事件驱动、CQRS |
| API 设计 | REST vs GraphQL、版本控制策略、认证机制 |
| 数据建模 | 模式设计、规范化决策、缓存策略 |
| 基础设施 | 部署模型、CI/CD 流水线、监控栈 |
| 安全 | 认证策略、加密方法、密钥管理 |
| 测试 | 测试框架、覆盖率目标、端到端测试与集成测试的平衡 |
| 流程 | 分支策略、审查流程、发布节奏 |
每周安装次数
225
仓库
GitHub 星标数
105.0K
首次出现
5 天前
安全审计
安装于
codex215
cursor197
opencode195
gemini-cli195
github-copilot195
amp195
Capture architectural decisions as they happen during coding sessions. Instead of decisions living only in Slack threads, PR comments, or someone's memory, this skill produces structured ADR documents that live alongside the code.
Use the lightweight ADR format proposed by Michael Nygard, adapted for AI-assisted development:
# ADR-NNNN: [Decision Title]
**Date**: YYYY-MM-DD
**Status**: proposed | accepted | deprecated | superseded by ADR-NNNN
**Deciders**: [who was involved]
## Context
What is the issue that we're seeing that is motivating this decision or change?
[2-5 sentences describing the situation, constraints, and forces at play]
## Decision
What is the change that we're proposing and/or doing?
[1-3 sentences stating the decision clearly]
## Alternatives Considered
### Alternative 1: [Name]
- **Pros**: [benefits]
- **Cons**: [drawbacks]
- **Why not**: [specific reason this was rejected]
### Alternative 2: [Name]
- **Pros**: [benefits]
- **Cons**: [drawbacks]
- **Why not**: [specific reason this was rejected]
## Consequences
What becomes easier or more difficult to do because of this change?
### Positive
- [benefit 1]
- [benefit 2]
### Negative
- [trade-off 1]
- [trade-off 2]
### Risks
- [risk and mitigation]
When a decision moment is detected:
docs/adr/ does not exist, ask the user for confirmation before creating the directory, a README.md seeded with the index table header (see ADR Index Format below), and a blank template.md for manual use. Do not create files without explicit consent.docs/adr/ and incrementdocs/adr/NNNN-decision-title.md after explicit approval. If the user declines, discard the draft without writing any files.docs/adr/README.mdWhen a user asks "why did we choose X?":
docs/adr/ exists — if not, respond: "No ADRs found in this project. Would you like to start recording architectural decisions?"docs/adr/README.md index for relevant entriesdocs/
└── adr/
├── README.md ← index of all ADRs
├── 0001-use-nextjs.md
├── 0002-postgres-over-mongo.md
├── 0003-rest-over-graphql.md
└── template.md ← blank template for manual use
# Architecture Decision Records
| ADR | Title | Status | Date |
|-----|-------|--------|------|
| [0001](0001-use-nextjs.md) | Use Next.js as frontend framework | accepted | 2026-01-15 |
| [0002](0002-postgres-over-mongo.md) | PostgreSQL over MongoDB for primary datastore | accepted | 2026-01-20 |
| [0003](0003-rest-over-graphql.md) | REST API over GraphQL | accepted | 2026-02-01 |
Watch for these patterns in conversation that indicate an architectural decision:
Explicit signals
Implicit signals (suggest recording an ADR — do not auto-create without user confirmation)
proposed → accepted → [deprecated | superseded by ADR-NNNN]
| Category | Examples |
|---|---|
| Technology choices | Framework, language, database, cloud provider |
| Architecture patterns | Monolith vs microservices, event-driven, CQRS |
| API design | REST vs GraphQL, versioning strategy, auth mechanism |
| Data modeling | Schema design, normalization decisions, caching strategy |
| Infrastructure | Deployment model, CI/CD pipeline, monitoring stack |
| Security | Auth strategy, encryption approach, secret management |
| Testing | Test framework, coverage targets, E2E vs integration balance |
| Process | Branching strategy, review process, release cadence |
Weekly Installs
225
Repository
GitHub Stars
105.0K
First Seen
5 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex215
cursor197
opencode195
gemini-cli195
github-copilot195
amp195
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
109,600 周安装
Fastmail SMTP 集成教程:通过命令行和Python脚本发送电子邮件
1 周安装
shadcn/ui 组件库使用指南:Radix UI + Tailwind CSS 可自定义前端组件集成
1 周安装
Agent Skills (agentskills.io) - 为AI智能体创建可移植技能,兼容Claude/Cursor/Copilot
1 周安装
Web性能优化专家模式 | 核心Web指标、页面加载速度与渲染性能优化工具
1 周安装
API安全审查指南:OWASP API十大风险检测与自动化测试工具
1 周安装
TanStack Query Pro 使用指南:Next.js 16 数据获取、缓存与 SSR 优化
1 周安装