From cai
Use when recording an architecture decision as an ADR. Triggers: 'cai-add-decision', 'decision 기록', 'ADR 추가', 'add decision', '결정 기록', '아키텍처 결정'
How this skill is triggered — by the user, by Claude, or both
Slash command
/cai:cai-add-decisionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Records an architecture decision as an ADR (Architecture Decision Record) in the CAI, with automatic numbering and structured format.
Records an architecture decision as an ADR (Architecture Decision Record) in the CAI, with automatic numbering and structured format.
Scan context/decisions/ directory for existing decision files. Extract the maximum NNN from filenames matching pattern NNN-*.md. The next number is max + 1, zero-padded to 3 digits.
context/decisions/ contents:
001-chose-postgresql.md
002-event-driven-arch.md
→ next number: 003
If context/decisions/ is empty or has no numbered files, start at 001.
CRITICAL: Never hardcode the number. Always dynamically calculate from directory contents.
Is the decision content already available in the current conversation context?
├── YES → Use it directly (Step 3)
└── NO → Invoke the cai:cai-interview skill (Step 2a)
2a. Interview for Decision Content
Invoke the cai:cai-interview skill. Pass:
Create context/decisions/{NNN}-{slug}.md with the following structure:
---
type: decision
status: accepted
tags: [relevant, tags]
last_synced: {today, YYYY-MM-DD}
---
# {NNN}. {Decision Title}
## Background
{Problem context and why a decision was needed}
## Decision
{What was decided, stated clearly}
## Alternatives Considered
### {Alternative 1}
- Pros: ...
- Cons: ...
### {Alternative 2}
- Pros: ...
- Cons: ...
## Consequences
### Positive
- ...
### Negative
- ...
The {slug} is derived from the decision title: lowercase, words joined by hyphens, concise (e.g., "chose-postgresql", "event-driven-arch").
Present the generated ADR to the user for review before writing to disk. Apply any requested changes.
cai:cai-interview — Collects decision details from the user when not already available (see Step 2a).| Artifact | Path | Format |
|---|---|---|
| ADR document | context/decisions/{NNN}-{slug}.md | Markdown with YAML frontmatter (Interface Contract 0.1, decision type) |
| Error | Action |
|---|---|
context/decisions/ directory does not exist | Create it before proceeding |
| Filename collision (number already taken due to race) | Re-scan and recalculate |
| User declines the ADR after review | Discard the draft, do not write to disk |
| Insufficient context for meaningful ADR | Ask the user for more details rather than writing a shallow document |
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub workingdanny911/cai --plugin cai