terrylica/cc-skills

adr-code-traceability

Add ADR references to code for traceability.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/terrylica/cc-skills --skill adr-code-traceability

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

ADR Code Traceability

Add Architecture Decision Record references to code for decision traceability. Provides language-specific patterns and placement guidelines.

Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

When to Use This Skill

  • Creating new files as part of an ADR implementation
  • Documenting non-obvious implementation choices
  • User mentions "ADR traceability", "code reference", "document decision"
  • Adding decision context to code during /itp:go Phase 1

Quick Reference

Reference Format

ADR: {adr-id}

Path Derivation: ADR: 2025-12-01-my-feature → /docs/adr/2025-12-01-my-feature.md

Language Patterns (Summary)

LanguageNew File HeaderInline Comment
Python"""...\n\nADR: {adr-id}\n"""# ADR: {adr-id} - reason
TypeScript/** ... \n * @see ADR: {adr-id} */// ADR: {adr-id} - reason
Rust//! ...\n//! ADR: {adr-id}// ADR: {adr-id} - reason
Go// Package ... \n// ADR: {adr-id}// ADR: {adr-id} - reason

See Language Patterns for complete examples.


Placement Decision Tree

Is this a NEW file created by the ADR?
├── Yes → Add reference in file header
└── No → Is the change non-obvious?
    ├── Yes → Add inline comment with reason
    └── No → Skip ADR reference

See Placement Guidelines for detailed guidance.


Examples

New File (Python)

python
"""
Redis cache adapter for session management.

ADR: 2025-12-01-redis-session-cache
"""

class RedisSessionCache:
    ...

Inline Comment (TypeScript)

typescript
// ADR: 2025-12-01-rate-limiting - Using token bucket over sliding window
// for better burst handling in our use case
const rateLimiter = new TokenBucketLimiter({ rate: 100, burst: 20 });

Do NOT Add References For

  • Every line touched (only where traceability adds value)
  • Trivial changes (formatting, typo fixes)
  • Standard patterns (well-known idioms)
  • Test files (unless test approach is an ADR decision)

Reference Documentation


Troubleshooting

IssueCauseSolution
ADR not foundWrong path formatUse relative path from repo root
Reference not showingComment syntax wrongCheck language-specific comment format
Too many referencesOver-documentingOnly add where traceability adds value
Outdated ADR linkADR was renamedUpdate path to match current ADR filename
Hook reminder annoyingNo ADR for this changeAdd inline ADR comment or create new ADR

Post-Execution Reflection

After this skill completes, check before closing:

  1. Did the command succeed? — If not, fix the instruction or error table that caused the failure.
  2. Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
  3. Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.

Only update if the issue is real and reproducible — not speculative.

来自同一仓库

更多 Skills

全部 Skills
terrylica
社区

academic-pdf-to-gfm

Convert academic PDF papers to GitHub-renderable GFM markdown with math equations. TRIGGERS - PDF, GitHub markdown, math

1小时安装量
1
GitHub Stars
2
最近更新
11月5日
terrylica
社区

arxiv-source-first-paper-ingest

Read an arXiv paper faithfully by fetching the authors' own LaTeX source instead of OCR-ing the PDF. Extracts every display equation with its label, environment and enclosing proposition, renders each to MathML, and proves usability by compiling each formula with a real TeX engine. Use when you need a paper's formulas exactly — to replicate a method, implement a loss function or custom objective, verify a quoted number, or check a claim against what the authors actually wrote. TRIGGERS - read th

1小时安装量
1
GitHub Stars
2
最近更新
11月5日
terrylica
社区

azure-provision

Bootstrap Azure automation when interactive az login is blocked by a Conditional Access policy (error 530035, "Device state: Unregistered"). Mints a service principal through the Azure Portal session ONCE — using Microsoft Graph over a captured token, not DOM clicking — then provisions resource groups, Cognitive Services / AI Language / Speech resources and their keys entirely via az/REST, writing key AND endpoint together into the SCS vault. Use when az login fails but the portal works, when mo

1小时安装量
1
GitHub Stars
2
最近更新
11月5日
terrylica
社区

backup

Stream-backup active recordings to GitHub. TRIGGERS - backup recording, sync cast, streaming backup.

1小时安装量
1
GitHub Stars
2
最近更新
11月5日