git-adr

SKILL开发
开发 未标注权限 许可证不明确

Manage Architecture Decision Records (ADRs) using git-adr, a CLI tool that stores ADRs in git notes instead of files. Execute commands (init, new, edit, list, show, search, sync, supersede, link, attach, stats, export, import), generate ADR content in any format (MADR, Nygard, Y-Statement, Alexandrian, Business Case, Planguage), and teach ADR best practices. Use when users ask about: ADRs, architecture decisions, decision records, git-adr commands, documenting technical decisions, or need help creating/managing ADRs in a git repository.

一句话选型结论

按资料字段整理

git-adr是开发类的 Agent Skill,安装方式:GitHub 仓库,权限级别未标注,许可证不明确,没有现成安装命令,需按说明手动放置 SKILL.md。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类开发 安装方式GitHub 仓库 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 4 仓库 git-adr
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

GitHub 仓库
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    按安装说明或仓库 README,把 SKILL.md 放到客户端的 skills 目录(一般一个技能一个文件夹)。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

开发
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方zircote仓库 git-adr · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式GitHub 仓库安装包 zircote/git-adr
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 未标注
正文体量9.3 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
写代码与改 bug

按需求补代码、定位并修掉报错。

读仓库与生成改动

让模型读懂项目结构,再给出可落地的改动。

跑测试与排查故障

按现象排查问题,补测试用例并复跑。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 基础信息齐全,可以先按说明装一个试试。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有现成安装命令,要按安装说明或仓库 README 手动放置。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在开发场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
git-adr当前 未标注权限 GitHub 仓库 未标注 未标注 无
技能审查员 浏览器控制 ClawHub 市场 877.9 万 OpenClaw 有
Vercel React 最佳实践 浏览器控制 GitHub 仓库 849.1 万 Codex、Claude、Cursor 有
GitHub 代码协作 联网访问 ClawHub 市场 763.3 万 OpenClaw 有
网页设计指南 联网访问 GitHub 仓库 668.6 万 Codex、Claude、Cursor 有
本体论 只读 ClawHub 市场 663.7 万 OpenClaw 有

SKILL.md 全文

9.3 KB
模型实际读到的说明书原文,来自技能仓库

git-adr Skill

Comprehensive skill for managing Architecture Decision Records using the git-adr CLI tool.

Auto-Context Loading

At session start, if in a git-adr repository, automatically load ADR summary:

# Silent detection and load
git notes --ref=adr list &>/dev/null && git adr list --format oneline 2>/dev/null

This provides awareness of existing decisions without consuming excessive context.
See workflows/session-start.md for full behavior.

On-Demand Hydration

Use progressive loading for token efficiency:

Trigger Action
"Show me ADR {id}" git adr show {id} → full content
"What did we decide about X" git adr search "X" → snippets
"Record this decision" Guided creation workflow

See workflows/decision-recall.md for recall patterns.
See workflows/decision-capture.md for creation flow.

CRITICAL RULES

NEVER modify user configuration without explicit permission.

  • Do NOT run git-adr config --set or git config adr.* commands unless the user explicitly asks to change config
  • Do NOT "check" config by running set commands - use git config --get or git-adr config --get only
  • Before using AI features, READ the existing config with git config --local --list | grep adr - do NOT assume or set values
  • If AI config is missing, ASK the user what provider/model they want - do NOT set defaults
  • The user's config is sacred - treat it as read-only unless explicitly told otherwise

What is git-adr?

git-adr is a command-line tool that manages ADRs using git notes instead of files:
- Non-intrusive: ADRs don't clutter the working tree
- Portable: Travel with git history
- Linkable: Associate decisions with commits
- Syncable: Push/pull like regular git content

Quick Command Reference

Command Description
git adr init Initialize ADR tracking
git adr new "<title>" Create new ADR
git adr list List all ADRs
git adr show <id> Display an ADR
git adr edit <id> Edit an ADR
git adr search "<query>" Search ADRs
git adr supersede <old-id> "<title>" Supersede a decision
git adr link <id> <commit> Link ADR to commit
git adr sync --push Push ADRs to remote
git adr sync --pull Pull ADRs from remote
git adr stats Show statistics
git adr export Export to files
git adr config list Show configuration

For full command documentation, see references/commands.md.

Execution Patterns

Before Executing Commands

Always verify the environment:

# 1. Check git-adr is installed
git adr --version

# 2. Verify in a git repository
git rev-parse --is-inside-work-tree

# 3. For most commands, check if initialized
git notes --ref=adr list 2>/dev/null || echo "Not initialized"

Error Handling

If git-adr is not installed:

git-adr is not installed. Install with:
  cargo install git-adr
  # or
  brew tap zircote/tap && brew install git-adr

If not in a git repository:

git-adr requires a git repository. Initialize with:
  git init
  git adr init

If ADRs not initialized:

ADR tracking not initialized. Run:
  git adr init

Format Selection

Reading Project Configuration

Always check the project's configured template before generating content:

# Get configured template (defaults to madr if not set)
TEMPLATE=$(git config --get adr.template 2>/dev/null || echo "madr")
echo "Using template: $TEMPLATE"

Available Formats

Format Config Value Best For
MADR madr General purpose, option analysis (default)
Nygard nygard Quick, minimal decisions
Y-Statement y-statement Ultra-concise, single sentence
Alexandrian alexandrian Pattern-based, forces analysis
Business Case business Stakeholder approval, ROI
Planguage planguage Measurable quality requirements

For format templates, see references/formats/.

Creating ADRs

Workflow

  1. Check format: Read adr.template config
  2. Load template: Read appropriate format from references/formats/
  3. Generate content: Fill template with user's context
  4. Execute command: git adr new "<title>" with content

Example: Creating a MADR

# Create ADR (opens editor with template)
git adr new "Use PostgreSQL for primary database"

# Or with specific format override
git adr new "Use PostgreSQL" --template nygard

When generating content, follow the structure in the appropriate format template.

Common Workflows

New Project Setup

git adr init
git adr new "Record architecture decisions"
git adr sync --push

Team Collaboration

git adr sync --pull        # Get latest
git adr new "Add caching"  # Create decision
git adr sync --push        # Share with team

Linking to Implementation

# After implementing a decision
git adr link 20250115-use-postgresql abc1234

# View linked commits
git adr show 20250115-use-postgresql

Superseding Decisions

# When replacing a decision
git adr supersede 20250101-use-mysql "Migrate to PostgreSQL"

For more workflows, see references/workflows.md.

Configuration

Common configuration options:

# Set default template
git adr config adr.template madr

# Set editor
git adr config --global adr.editor "code --wait"

# Enable auto-sync
git adr config adr.sync.auto_push true
git adr config adr.sync.auto_pull true

For all configuration options, see references/configuration.md.

ADR Best Practices

When to Write an ADR

Write an ADR for decisions that are:
- Significant: Affects architecture or design
- Structural: Changes system organization
- Hard to reverse: Would require substantial effort to change

What Makes a Good ADR

  • Clear context: Explains the situation and constraints
  • Explicit decision: States what was decided
  • Documented consequences: Lists positive, negative, and neutral effects
  • Alternatives considered: Shows options evaluated

Common Mistakes

  • Too detailed (specification, not decision)
  • Too brief (no context or rationale)
  • Not updating status when decisions change
  • Writing long after the decision was made

For complete guidance, see references/best-practices.md.

Progressive Loading Guide

Load reference files based on user intent:

User Intent Load File
"Create an ADR" references/formats/{template}.md
"What commands are available?" references/commands.md
"Configure git-adr" references/configuration.md
"What is an ADR?" references/best-practices.md
"Set up for my team" references/workflows.md
"Find decisions about X" references/search-patterns.md
"Record this decision" workflows/decision-capture.md
"What did we decide" workflows/decision-recall.md

ADR Content Generation

When generating ADR content:

  1. Read the project's configured format
  2. Load the corresponding template from references/formats/
  3. Ask clarifying questions if context is insufficient:
    - What problem are you solving?
    - What alternatives did you consider?
    - What are the constraints?
  4. Fill the template with the gathered information
  5. Execute the command to create the ADR

Content Quality Checklist

Before creating an ADR, ensure:
- [ ] Context explains the situation clearly
- [ ] Decision is explicitly stated
- [ ] Consequences are categorized (positive/negative/neutral)
- [ ] Alternatives were considered (for MADR format)
- [ ] Status is appropriate (proposed/accepted)

Reference Files

File Purpose
references/commands.md Full command documentation
references/configuration.md All config options
references/best-practices.md ADR writing guidance
references/workflows.md Common workflow patterns
references/search-patterns.md Natural language → search mapping
references/formats/madr.md MADR template
references/formats/nygard.md Nygard template
references/formats/y-statement.md Y-Statement template
references/formats/alexandrian.md Alexandrian template
references/formats/business-case.md Business Case template
references/formats/planguage.md Planguage template
workflows/session-start.md Auto-context loading behavior
workflows/decision-capture.md Guided ADR creation workflow
workflows/decision-recall.md Find past decisions workflow

常见问题

5 问
答案由本站依据条目字段整理
git-adr怎么安装?

没有现成安装命令:按安装说明或仓库 README,把 SKILL.md 放进客户端的 skills 目录(一般一个技能一个文件夹)。

git-adr支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

git-adr权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

git-adr收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

git-adr用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。