insight-extraction
БесплатноЗапускает вложенные скриптыНе проверенExtract actionable insights from completed coding sessions. Use when a session completes to capture learnings for future sessions.
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
Insight Extraction Skill
Overview
Analyze completed coding sessions and extract structured learnings for the memory system. Insights help future sessions avoid mistakes, follow established patterns, and understand the codebase faster.
Core principle: Extract ACTIONABLE knowledge, not logs. Every insight should help a future session do something better.
When to Use
Always:
- After completing a coding task
- After fixing bugs
- After discovering new patterns
- After failed attempts (especially valuable)
Exceptions:
- Trivial changes with no learnings
- Documentation-only changes
The Iron Law
NO SESSION END WITHOUT INSIGHT EXTRACTION FOR NON-TRIVIAL WORK
Non-trivial sessions should capture learnings before context is lost.
Input Required
To extract insights, you need:
- Git diff - What files changed and how
- Task description - What was being implemented
- Attempt history - Previous tries (if any), what approaches were used
- Session outcome - Success or failure
Workflow
Phase 1: Gather Session Data
# Get the diff of changes
git diff HEAD~1 --stat
git diff HEAD~1
# Get commit message
git log -1 --pretty=format:"%s%n%n%b"
# Get list of modified files
git diff HEAD~1 --name-only
Phase 2: Analyze File Insights
For each modified file, extract:
- Purpose: What role does this file play?
- Changes made: What was the modification? Focus on the "why" not just "what"
- Patterns used: What coding patterns were applied?
- Gotchas: Any file-specific traps?
Good example:
{
"path": "src/stores/terminal-store.ts",
"purpose": "Zustand store managing terminal session state with immer middleware",
"changes_made": "Added setAssociatedTask action to link terminals with tasks",
"patterns_used": ["Zustand action pattern", "immer state mutation"],
"gotchas": ["State changes must go through actions, not direct mutation"]
}
Bad example (too vague):
{
"path": "src/stores/terminal-store.ts",
"purpose": "A store file",
"changes_made": "Added some code",
"patterns_used": [],
"gotchas": []
}
Phase 3: Extract Patterns
Only extract patterns that are reusable:
- Must apply to more than just this one case
- Include where/when to apply the pattern
- Reference a concrete example in the codebase
Good example:
{
"pattern": "Use e.stopPropagation() on interactive elements inside containers with onClick handlers",
"applies_to": "Any clickable element nested inside a parent with click handling",
"example": "Terminal.tsx header - dropdown needs stopPropagation to prevent focus stealing"
}
Phase 4: Document Gotchas
Must be specific and actionable:
- Include what triggers the problem
- Include how to solve or prevent it
- Avoid generic advice ("be careful with X")
Good example:
{
"gotcha": "Terminal header onClick steals focus from child interactive elements",
"trigger": "Adding buttons/dropdowns to Terminal header without stopPropagation",
"solution": "Call e.stopPropagation() in onClick handlers of child elements"
}
Phase 5: Document Approach Outcome
Capture the learning from success or failure:
- If succeeded: What made this approach work? What was key?
- If failed: Why did it fail? What would have worked instead?
- Alternatives tried: What other approaches were attempted?
This helps future sessions learn from past attempts.
Phase 6: Generate Recommendations
Specific, actionable advice for future work:
- Must be implementable by a future session
- Should be specific to this codebase, not generic
- Focus on what's next or what to watch out for
Good: "When adding more controls to Terminal header, follow the dropdown pattern in this session - use stopPropagation and position relative to header"
Bad: "Write good code" or "Test thoroughly"
Phase 7: Output Structured Insights
Create the structured insight output:
# Session Insights: [Task Name]
## Date
[timestamp]
## Task
[Description of what was being implemented]
## Outcome
[SUCCESS/FAILURE]
## File Insights
### [file-path]
- **Purpose**: [what this file does]
- **Changes**: [what was changed and why]
- **Patterns**: [patterns used]
- **Gotchas**: [things to watch out for]
## Patterns Discovered
### [Pattern Name]
- **Pattern**: [description]
- **Applies to**: [when to use]
- **Example**: [file or code reference]
## Gotchas Discovered
### [Gotcha Name]
- **Issue**: [what to avoid]
- **Trigger**: [what causes it]
- **Solution**: [how to handle]
## Approach Analysis
### What Worked
[Description of successful approach]
### What Failed (if applicable)
[Description of failed approaches and why]
### Alternatives Tried
[List of other approaches attempted]
## Recommendations for Future Sessions
1. [Specific recommendation 1]
2. [Specific recommendation 2]
Save to `.claude/context/memory/le
Установить insight-extraction в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteBashGlobGrepВложенные файлы
FAQ
Что делает скилл insight-extraction?
Extract actionable insights from completed coding sessions. Use when a session completes to capture learnings for future sessions.
Как установить скилл insight-extraction?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл insight-extraction запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic