Agent Skills: Decision Log

Record or search technical decisions in a persistent SQLite database. Default mode records the most recent decision from conversation with alternatives and reasoning. Use with "search" argument to query past decisions.

UncategorizedID: hairihou/dotfiles/decision-log

Install this agent skill to your local

pnpm dlx add-skill https://github.com/hairihou/dotfiles/tree/HEAD/src/.config/claude/skills/decision-log

Skill Files

Browse the full folder contents for decision-log.

Download Skill

Loading file tree…

src/.config/claude/skills/decision-log/SKILL.md

Skill Metadata

Name
decision-log
Description
Record or search technical decisions in a persistent SQLite database. Default mode records the most recent decision from conversation with alternatives and reasoning. Use with "search" argument to query past decisions.

Decision Log

Context

  • Date: !date "+%Y%m%d"
  • Repository: !git rev-parse --show-toplevel (use basename only, e.g., dotfiles not the full path)
  • DB: !python ${CLAUDE_SKILL_DIR}/scripts/db.py init
  • Summary: !python ${CLAUDE_SKILL_DIR}/scripts/db.py summary

Script: ${CLAUDE_SKILL_DIR}/scripts/db.py

Mode: Record (default)

Use when no argument is provided or argument is not "search".

Steps

  1. Analyze: Review conversation for the most recent design/architecture/technology decision

  2. Extract: Identify topic, chosen approach, alternatives considered, and reasoning

  3. Confirm: Use AskUserQuestion to present the decision and get approval. Format the question as:

    Decision Record
    - Date: <date>
    - Repository: <repo-basename>
    - Topic: <short-label>
    - Chosen: <approach>
    - Alternatives: <other options considered>
    - Reasoning: <why this was chosen>
    

    Suggested responses: ["OK", "Revise"] If the user wants changes, revise and re-confirm.

  4. Insert:

    python ${CLAUDE_SKILL_DIR}/scripts/db.py insert '<date>' '<repo>' '<topic>' '<chosen>' '<alternatives>' '<reasoning>'
    
  5. The script prints the inserted row.

Mode: Search

Use when argument contains "search".

Steps

  1. Parse intent: Understand what the user is looking for from conversation context

  2. Build and run query:

    # All decisions for current repo
    python ${CLAUDE_SKILL_DIR}/scripts/db.py search --repo '<repo>'
    
    # Full-text search
    python ${CLAUDE_SKILL_DIR}/scripts/db.py search --match '<keyword>'
    
    # Date range
    python ${CLAUDE_SKILL_DIR}/scripts/db.py search --from '<start>' --to '<end>'
    
    # Combined filters
    python ${CLAUDE_SKILL_DIR}/scripts/db.py search --repo '<repo>' --match '<keyword>'
    
    # Full detail for a specific decision
    python ${CLAUDE_SKILL_DIR}/scripts/db.py detail <id>
    
    # Update outcome
    python ${CLAUDE_SKILL_DIR}/scripts/db.py update-outcome <id> '<outcome>'
    
  3. Format: Present results in a readable format

Guidelines

  • topic: Use kebab-case short labels (e.g., db-architecture, cache-strategy, auth-flow)
  • chosen/alternatives/reasoning: Write in plain English, concise but complete
  • outcome: Update later via search mode when results are known
  • Escape single quotes in shell arguments: 'it'\''s'