Extract learnings and generate project-specific customizations (CLAUDE.md, commands, skills, hooks). Use when user says "learn", "extract learnings", "what did we learn", "save learnings", "adapt config", or wants to improve Claude Code based on conversation patterns.
From dev-toolsnpx claudepluginhub alexei-led/cc-thingz --plugin dev-toolsThis skill is limited to using the following tools:
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.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Extract actionable learnings and generate project-specific customizations. Adapts Claude Code to project patterns over time.
<!-- CC-ONLY: begin -->Use TaskCreate to track these 8 phases:
<!-- CC-ONLY: end -->Find ALL project customization files:
# Run these in parallel via Glob
.claude/CLAUDE.md OR CLAUDE.md # Instructions
.claude/commands/*.md # Commands
.claude/skills/*/SKILL.md # Skills
.claude/settings.json # Hooks
.claude/rules/*.md # Rules
Record counts for budget tracking later.
Analyze conversation for these signal types:
| Signal | Look For |
|---|---|
| Corrections | "no", "wrong", "actually...", "instead..." |
| Direct guidance | "always", "prefer", "use X", "never" |
| Repeated explains | Same thing clarified 2+ times |
| Project quirks | Unexpected behaviors, edge cases, workarounds |
| Commands/workflows | Specific commands, sequences that worked |
| Signal | Look For | Confidence |
|---|---|---|
| Repeated task | Same request 3+ times in session/history | HIGH |
| "I always" pattern | "I always run X before Y" | HIGH |
| Multi-step sequence | "first lint, then test, then build" | MEDIUM |
| Template request | "create a new X like we discussed" | MEDIUM |
| Workflow mention | "my workflow is X then Y then Z" | HIGH |
| Signal | Look For | Confidence |
|---|---|---|
| Complex multi-tool | Workflow spanning 3+ files with analysis | HIGH |
| Agent orchestration | "spawn agents to check X and Y in parallel" | HIGH |
| Domain expertise | Detailed tech discussion needing reference docs | MEDIUM |
| Progressive need | "for basic use X, for advanced see Y" | MEDIUM |
| Signal | Look For | Confidence |
|---|---|---|
| Blocking rule | "never do X", "always block Y" | HIGH |
| Validation need | "always run linter after edit" | HIGH |
| Format requirement | "use prettier on save", "format on edit" | MEDIUM |
| Approval pattern | "ask before destructive commands" | MEDIUM |
If $ARGUMENTS contains topic: Extract ONLY learnings related to that topic.
If $ARGUMENTS contains --dry-run: Show what would be created, don't write.
Sort extractions into buckets:
Instructions: [list of instruction candidates]
Commands: [list of command candidates with names]
Skills: [list of skill candidates with names]
Hooks: [list of hook candidates with events]
Apply confidence threshold: Only include HIGH confidence for commands/skills/hooks. MEDIUM confidence items go to instructions in CLAUDE.md instead.
| Pattern | Example |
|---|---|
Use X | Use prepared statements for SQL |
Prefer X over Y | Prefer explicit returns over bare err |
When X -> do Y | When tests fail -> check CI logs first |
X requires Y | Auth endpoints require Bearer token |
Run: \...`` | Run: kubectl rollout restart deploy/api |
Note: X | Note: Get() returns nil, nil when absent |
One instruction per line. Max 80 chars.
---
description: { 1-line description }
allowed-tools: { tools needed, e.g., Bash(make *), Read }
argument-hint: { optional args }
---
# {Command Name}
{Brief purpose}
## Steps
1. {step from conversation}
2. {step from conversation}
## Context
{Any relevant @ references or bash context}
---
name: { kebab-case-name }
description: { when to use, triggers }
user-invocable: true
context: fork
allowed-tools: { restrictions if any }
---
# {Skill Name}
{Purpose}
## When to Use
- {scenario 1}
- {scenario 2}
## Workflow
1. {step 1}
2. {step 2}
{
"EventType": [
{
"matcher": "ToolPattern",
"hooks": [
{
"type": "command",
"command": "command-here",
"timeout": 30
}
]
}
]
}
Default to PostToolUse (non-blocking) unless explicit blocking requirement.
For each artifact type:
| Scenario | Action |
|---|---|
| New adds specificity | Update existing with concrete details |
| New adds example | Append example to existing |
| Both have value | Combine into single comprehensive item |
| New is subset of existing | Keep existing, skip new |
| Name collision (cmd/skill) | Merge content into existing file |
Prefer updating existing over creating new.
Recommended limits:
| Artifact | Limit | Why |
|---|---|---|
| CLAUDE.md | 200 lines | Context efficiency |
| Commands | 10 | Discoverability |
| Skills | 5 | Complexity management |
| Hooks | 5 | Debugging simplicity |
If exceeding budget:
Show ALL proposed changes:
## Proposed Changes
### CLAUDE.md (instructions)
Target: `.claude/CLAUDE.md`
Lines: X/200
**Updates:**
- [old] -> [merged]
**Additions:**
- New instruction
### Commands
- `/pre-commit` - Run checks before commit
-> `.claude/commands/pre-commit.md`
### Skills
~ `auth-patterns` - Updated with OAuth2 flow
-> `.claude/skills/auth-patterns/SKILL.md`
### Hooks
- PostToolUse[Edit|Write]: Run prettier
-> `.claude/settings.json`
---
Rollback: `git checkout .claude/`
STOP:
<!-- CC-ONLY: begin -->Use AskUserQuestion:
| Header | Question | Options |
|---|---|---|
| Action | Apply these customizations? | Apply all / Select items / Edit first / No |
If "Select items": Show multi-select for each category.
Based on confirmation:
hooks object| Section | Content |
|---|---|
| Patterns | Architecture, naming, structure |
| Code Style | Formatting, idioms, conventions |
| Workflows | Build, test, deploy commands |
| Gotchas | Edge cases, quirks, known issues |
LEARNED
=======
Target: .claude/
Instructions: (CLAUDE.md)
~ "Use error wrapping" -> "Wrap errors: fmt.Errorf(\"op: %w\", err)"
+ "Note: API returns nil, nil when absent"
Commands: (commands/)
+ /pre-commit - Run lint, test, build
Skills: (skills/)
+ auth-patterns - OAuth2 and JWT handling
Hooks: (settings.json)
+ PostToolUse[Edit]: prettier --write
Budget: 45/200 instructions | 3/10 commands | 1/5 skills | 1/5 hooks