.claude/skills/capture-learning/SKILL.md
Capture a project learning or pattern to LEARNINGS.md. Use when you discover a useful pattern or convention during development.
npx skillsauth add benjaminshoemaker/ai_coding_project_base capture-learningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Capture a discovered pattern, convention, or gotcha to the project's LEARNINGS.md file.
/capture-learning "Use vi.mock() not jest.mock() - this is Vitest"
/capture-learning
If no argument provided, prompt for the learning content.
Copy this checklist and track progress:
Capture Learning Progress:
- [ ] Step 1: Get learning content from user
- [ ] Step 2: Determine category (pattern, convention, pitfall, tool-tip)
- [ ] Step 3: Gather context (when it applies, why it matters)
- [ ] Step 4: Write entry to LEARNINGS.md
- [ ] Step 5: Confirm entry was saved correctly
$ARGUMENTS is provided and non-empty, use it as the learning contentQuestion: "What did you learn?"
Header: "Learning"
Options:
- Label: "Enter below"
Description: "Type your learning in the text field"
(User will select "Other" to type their learning)Use AskUserQuestion to ask for category:
Question: "Which category fits this learning?"
Header: "Category"
Options:
- Label: "Conventions"
Description: "Code style, naming, patterns used in this project"
- Label: "Testing"
Description: "Test setup, mocking, assertions"
- Label: "Gotchas"
Description: "Non-obvious behavior, things that caused debugging"
- Label: "Error Handling"
Description: "How errors are handled, Result patterns, etc."
If user selects "Other", use their custom category name.
Determine the current task context:
.claude/phase-state.json exists (if available) and extract current task IDIf LEARNINGS.md doesn't exist, create it with this template:
# Discovered Patterns
> Project-specific patterns and conventions discovered during development.
> This file provides context for future sessions.
> Add learnings with `/capture-learning` or manually.
## Conventions
## Testing
## Gotchas
## Error Handling
## Performance
Then append the learning under the appropriate category section:
Format: - {learning content} ({date}, {task context})
Example:
## Testing
- Use `vi.mock()` not `jest.mock()` — this is a Vitest project (2026-01-22, Task 1.1.A)
Output:
Captured to LEARNINGS.md:
**{Category}:** {learning content}
This pattern will be loaded into context on future sessions.
Capture things that:
Don't capture:
LEARNINGS.md is always created/updated in PROJECT_ROOT (not feature directories), since learnings apply project-wide.
To determine PROJECT_ROOT:
*/features/*, go up two levelstesting
Audit project alignment with VISION.md, identify SDLC gaps, and generate feature proposals. Use when reviewing strategic direction or planning new features.
development
Run code-verification on a specific task. Use to verify a single task's acceptance criteria after implementation.
testing
Resolve Vercel preview deployment URL for the current git branch. Invoked by browser-verification when deployment.enabled is true, or directly to check deployment status. Use to check deployment status or when browser verification needs a URL.
tools
Discover and sync all toolkit-using projects with the latest skills. Use when skills are modified, after the post-commit hook reminds you, or to batch-sync multiple projects.