Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

adr-authorADR 作者

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

679

周安装

28

GitHub Stars

1

下载量

222
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:adr-author(ADR 作者)
来源仓库:https://github.com/delexw/claude-code-misc
仓库路径:skills/adr-author
安装命令:
npx skills add https://github.com/delexw/claude-code-misc --skill adr-author
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/delexw/claude-code-misc --skill adr-author

简介

用于辅助编写可被自动化系统识别与校验的架构决策记录(ADR)。

  • 强调决策部分的可执行性,确保未来开发者能理解为何做出该选择。
  • 提供结构化指导,涵盖上下文、决策、替代方案与后果的撰写要点。
  • 安装命令:npx skills add https://github.com/delexw/claude-code-misc --skill adr-author。
  • 建议在使用时遵循 Michael Nygard 格式,确保内容清晰且具备长期可读性。

SKILL.md

ADR Authoring Guide

Help users write Architectural Decision Records that future developers actually read and that automated review systems can enforce. Based on Michael Nygard's format from Documenting Architecture Decisions.

How to Think About ADRs

An ADR captures a decision at a moment in time. It answers: what did we decide, why, and what happens because of it? The audience is a future developer (or an AI reviewer) who encounters code that seems odd and needs to understand the reasoning behind it.

The Decision section is the heart of an ADR — it's what gets enforced. The rest (Context, Consequences) provides the reasoning that makes enforcement feel reasonable rather than arbitrary. Spend most of your effort on the Decision section, and write it at the enforceability level the team actually needs.

Workflow

Step 1: Read Existing ADRs

Before writing anything, find and read the project's existing ADRs. They're typically in docs/adr/, doc/arch/, or decisions/. Look for:

  • Numbering scheme (sequential integers, date-prefixed, etc.)
  • Section structure (some teams add "Alternatives Considered" or "References")
  • Tone and detail level
  • Status conventions

Match what's already there. Consistency matters more than any template.

Step 2: Understand the Decision

Ask the user (if not already clear from context):

  1. What's the decision? What architectural choice is being made?
  2. What's the problem? What forces or tensions led here?
  3. What alternatives were considered? Even briefly — this goes in Context.
  4. How should this be enforced? This determines enforceability level.

The fourth question is the key one this skill adds. Most ADR guides skip it, but it determines whether the ADR becomes a living contract or shelf-ware.

Step 3: Choose an Enforceability Level

Enforceability isn't about quality — a LOW enforceability ADR can be excellent. It's about what kind of verification is possible and appropriate.

HIGH — Automated tools can check compliance. Use when there are concrete, measurable requirements: file paths, numeric thresholds, version constraints, exact formats. The Decision section needs 2+ specific, verifiable patterns.

MEDIUM — A human reviewer can check compliance with clear guidance. Use for architectural patterns, prohibitions, and quality guidelines that require judgment. The Decision section needs 1+ clear guideline with enough specificity that two reviewers would agree on whether code complies.

LOW — Reference and context only. Use for principles, historical rationale, and recommendations. No enforcement mechanism needed. These ADRs are valuable for understanding *why* things are the way they are.

Ask the user which level they want. If they're unsure, help them choose based on the nature of the decision: if you can write a linter rule or script to check it, it's HIGH. If a reviewer can check it with a clear yes/no, it's MEDIUM. If it's guidance that reasonable people might apply differently, it's LOW.

Step 4: Draft the ADR

Use Michael Nygard's four sections. Write in full sentences and paragraphs — ADRs are a conversation with future developers, not a requirements spec.

# ADR [NUMBER]: [Short noun phrase]

## Status

[Proposed | Accepted | Deprecated | Superseded by ADR-XXX]

## Context

[Forces at play — technological, political, social, project-local.
Present tensions neutrally. Explain why a decision is needed now.]

## Decision

We will [decision in active voice].

[The enforceable substance goes here — see patterns below.]

## Consequences

[What becomes easier, what becomes harder, what new problems arise,
what trade-offs are we accepting. Be honest about downsides.]

Formatting guidelines (per Nygard):

  • One to two pages total
  • Full sentences in paragraphs, not just bullet lists
  • Active voice in Decision ("We will..." not "It was decided...")
  • Neutral tone in Context, save opinions for Decision
  • Sequential numbering, never reused

Step 5: Write the Decision Section for Your Target Level

This is where enforceability patterns matter. The Decision section is what automated tools scan and what reviewers check against PRs.

Writing HIGH Enforceability Decisions

A HIGH decision reads like natural prose but contains specific, extractable constraints. Think of it as embedding verifiable facts in readable writing.

The six pattern types that enable automation:

  1. File paths — exact locations in backticks All API routes will be in src/api/v2/. Components follow src/components/{feature}/{ComponentName}.tsx.
  2. Measurable constraints — numbers with units Database queries will timeout after 30 seconds. Bundle sizes will not exceed 250kb per page.
  3. Configuration values — key:value or key=value pairs HTTP clients will use timeout: 5000. The connection pool uses maxConnections = 10.
  4. Version constraints — specific version requirements We will use Node.js >= 20.0.0. React dependency will be ^18.0.0.
  5. Format specifications — exact structural patterns Error responses follow: {error: string, code: number, details?: object}. Commits use: type(scope): description.
  6. Declarative statements with specific objects — "will use X for Y" We will use TypeScript for all new files. Async operations will use async/await instead of Promise chains.

Include at least 2 of these pattern types. Add concrete examples, state the verification method (CI check, linter rule, code review checkpoint), and note exceptions explicitly.

Example HIGH Decision:

## Decision

We will standardize on Next.js App Router for all new pages.

All new routes will use the `app/` directory structure with files at
`app/{route}/page.tsx`. For example, product detail pages go in
`app/products/[id]/page.tsx`. Components will be Server Components by default —
only add `'use client'` when client-side interactivity is required (forms,
onClick handlers, browser APIs).

Bundle size increases will be limited to 10% per feature. Any use of 'use
client' must be justified in the PR description explaining why server rendering
is insufficient.

The existing `pages/` directory remains for maintenance. New features use `app/`
starting March 2024. Migration happens opportunistically during major updates.

Verification: CI checks that new routes are in `app/` not `pages/`. ESLint rule
flags `'use client'` files without a justification comment.

Writing MEDIUM Enforceability Decisions

A MEDIUM decision provides clear enough guidance that a reviewer can make a yes/no judgment. The patterns are less about exact values and more about unambiguous intent.

The five pattern types for reviewer-checkable decisions:

  1. Clear prohibitions — what we won't do We will not use class components for new React code. Custom authentication is prohibited; use Auth0.
  2. Implementation requirements — patterns to follow All endpoints will enforce input validation. Services will use dependency injection for instantiation.
  3. Quality/security guidelines — standards with clear scope Database queries will use parameterized queries; direct string concatenation for SQL is prohibited. Security headers will be set on all HTTP responses.
  4. Architectural patterns — structural decisions New services will follow microservices architecture, each owning its data and exposing a REST API.
  5. Universal requirements — "all X must Y" statements All public functions will have unit tests. All API changes will update the OpenAPI specification.

Include a review checklist so reviewers know exactly what to check.

Example MEDIUM Decision:

## Decision

We will standardize error handling across all services.

All async operations will use try-catch blocks. Errors will be wrapped with
context using typed error classes (ValidationError, AuthenticationError,
ExternalServiceError) extending a base ApplicationError. User-facing errors
will not expose internal details — they follow the format:
{message: string, code: string, details?: object}.

All errors will be logged with correlation IDs for request tracing. Sensitive
data will be sanitized before logging.

Review checklist:
- Async operations have try-catch with context
- Appropriate error class is used
- User-facing errors are sanitized
- Errors are logged before handling/re-throwing

Writing LOW Enforceability Decisions

LOW decisions document rationale and principles. They're valuable for understanding *why* without prescribing *how*.

## Decision

We chose PostgreSQL over MongoDB for our primary datastore. Our data model is
heavily relational with complex joins across orders, inventory, and customer
records. PostgreSQL's ACID transactions and mature tooling ecosystem align with
our reliability requirements.

We considered MongoDB for its schema flexibility, which would benefit our
rapidly changing product catalog. However, the transactional integrity
requirements for financial data outweigh the flexibility benefits.

Future iterations may introduce a document store for the product catalog if
schema changes become a bottleneck.

Step 6: Review and Refine

Check the draft against its target level:

For HIGH — Can you write a script or linter rule to verify each requirement? If not, it's not HIGH yet. Look for vague language ("appropriate", "clean", "good") and replace with specifics.

For MEDIUM — Would two independent reviewers agree on whether code complies? If the requirement is ambiguous enough that reasonable people would disagree, either make it more specific (upgrade to HIGH) or acknowledge it's guidance (downgrade to LOW).

For LOW — Does it explain the *why* clearly enough that a developer five years from now would understand the reasoning? That's the bar.

Common refinement moves:

Vague → Specific (LOW → HIGH):

Before: "Use good error handling"
After:  "All async functions will use try-catch with structured logging:
         {level: string, message: string, stack?: string}"

Abstract → Concrete (LOW → MEDIUM):

Before: "Consider security"
After:  "All user inputs will be validated against SQL injection and XSS
         using the sanitization library"

Over-rigid → Practical (HIGH → MEDIUM):

Before: "All components must be exactly 50 lines or less"
After:  "Components should stay under 100 lines; split when they handle
         multiple concerns"

Step 7: Verify Consequences Are Honest

The Consequences section builds trust. If it only lists benefits, it reads like a sales pitch and future developers won't trust it. Include:

  • What becomes easier (the wins)
  • What becomes harder (the costs)
  • What new problems this might create (the risks)
  • What trade-offs are being accepted (the conscious choices)

Common Anti-Patterns

Vague mandates: "Must write clean code" → "Must pass ESLint rules in .eslintrc.js with zero warnings"

Unenforceable absolutes: "All code must be perfect" → "All public functions must have tests with >80% branch coverage"

Technology without constraints: "Use React for frontend" → "Use React >= 18.0.0 with TypeScript strict mode for new components"

Missing examples: "Follow proper naming" → "camelCase for functions (getUserData), PascalCase for components (UserProfile), UPPER_SNAKE_CASE for constants (MAX_RETRY_COUNT)"

Mixed enforceability: Don't combine "files must be in src/" (HIGH) with "use good architecture" (LOW) in the same Decision section. Be consistent in specificity, or split into separate numbered requirements at different levels.

Reference Files

For comprehensive pattern catalogs and ready-to-use templates, read these when you need more depth than this guide provides:

  • references/enforceability-patterns.md — exhaustive catalog of all pattern types with examples in both natural prose and prescriptive styles, pattern recognition keywords, verification methods, and upgrade paths between levels. Read this when you need to identify specific patterns or help a user upgrade from one level to another.
  • references/templates.md — copy-paste templates for HIGH, MEDIUM, and LOW enforceability ADRs, each with a complete worked example. Read this when the user wants a starting template to fill in.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.42%
按下载量换算76

Claude

28.81%
按下载量换算64

Cursor

21.23%
按下载量换算47

Gemini CLI

10.05%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills