add-skill
CommandAdd a skill to the project with validation and README generation
Build a mental model of changes by splitting them into smaller logical chunks
$ npx -y skills add softaworks/agent-toolkit --agent claude-code
description: Build a mental model of changes by splitting them into smaller logical chunks argument-hint: [commit|branch|range|custom]
Analyze code changes and present them as a coherent mental model - breaking large diffs into logical chunks ordered by dependency so they can be understood incrementally.
1. **Gather changes** from the specified source (commit, branch, range, or custom input) 2. **Analyze and categorize** changes into logical groups by theme/purpose 3. **Identify dependencies** between change groups 4. **Present ordered explanation** so changes can be reviewed in a sensible sequence
# Current working changes (staged + unstaged) /mental-model # Specific commit /mental-model abc1234 /mental-model HEAD~3 # Branch comparison (vs main) /mental-model feature/my-branch # Explicit range /mental-model main..HEAD /mental-model origin/main...HEAD # Custom - user will provide diff/changes in next message /mental-model custom
When this command is invoked:
Parse the argument to determine what changes to analyze:
**No argument provided:**
**Argument looks like a commit hash** (7-40 hex chars):
**Argument looks like a branch name** (contains letters, no `..`):
**Argument contains `..`** (explicit range):
**Argument is "custom":**
Run the appropriate git command and capture the output:
# Example for commit git show <hash> --no-color # Example for range git diff <range> --no-color
If the diff is very large (>5000 lines), use `--stat` first to get an overview, then selectively read the most important files.
Group changes into logical categories based on:
For each file changed, determine:
Identify how changes relate to each other:
Order groups so that: 1. Dependencies come before dependents 2. Lower-level abstractions come before higher-level ones 3. Core changes come before peripheral changes
Output the analysis in this format:
## Mental Model: [Brief title of what these changes accomplish] ### High-Level Summary [2-3 sentences explaining the overall goal and approach of these changes] ### Key Concepts to Understand Before diving into the code, understand these concepts: - **[Concept 1]**: [Brief explanation] - **[Concept 2]**: [Brief explanation] - **[Concept 3]**: [Brief explanation] ### Change Groups (in review order) #### 1. [Group Name] - [Purpose] **Files:** `file1.ts`, `file2.ts` **Why this matters:** [Explain the purpose and context] **Key changes:** - [Change 1 and why] - [Change 2 and why] **Depends on:** Nothing (foundation) **Enables:** [What other groups need this] #### 2. [Group Name] - [Purpose] **Files:** `file3.ts`, `file4.ts` **Why this matters:** [Explain the purpose and context] **Key changes:** - [Change 1 and why] - [Change 2 and why] **Depends on:** Group 1 **Enables:** [What other groups need this] [Continue for all groups...] ### Review Sequence For the best understanding, review in this order: 1. **[Group 1]** - Start here because [reason] 2. **[Group 2]** - Then this because [reason] 3. **[Group 3]** - Finally this because [reason] ### Gotchas and Non-Obvious Details - [Any tricky parts or things that might be confusing] - [Implicit assumptions in the code] - [Things that look wrong but are intentional]
If git command fails:
If diff is empty:
If changes are too large to analyze meaningfully:
For a commit that adds user authentication:
## Mental Model: Adding JWT-based User Authentication ### High-Level Summary These changes add user authentication using JWT tokens. The flow is: user submits credentials → server validates → server returns JWT → client stores and sends JWT with requests → server validates JWT on protected routes. ### Key Concepts to Understand - *
Opinionated skills shared by @leonardocouy for improving daily work efficiency with Claude Code. Skills are packaged instructions and scripts that extend agent capabilities across development, documentation, planning, and professional workflows.
Add a skill to the project with validation and README generation
Sync root README.md with current skills inventory from skills/ directory
Create a detailed implementation plan using Codex 5.2 with high reasoning
Draft a professional email using the What-Why-How framework. Use when you need to compose emails to colleagues, stakeholders, or…
You are `Code-Sage`, an expert AI code reviewer and technical writer. Your purpose is to assist human developers by providing…
Run or manage the SkillOpt-Sleep self-evolution cycle (review past sessions, replay tasks through a selected backend, consolidate…
Create or update an OpenCode skill using the bundled skill-creator workflow