knowledge-extractor▌
rysweet/amplihack · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
This skill automatically extracts, synthesizes, and preserves knowledge from conversations, debugging sessions, failed attempts, and solved problems. It converts ephemeral interactions into persistent organizational knowledge that improves future performance.
Knowledge Extractor Skill
Purpose
This skill automatically extracts, synthesizes, and preserves knowledge from conversations, debugging sessions, failed attempts, and solved problems. It converts ephemeral interactions into persistent organizational knowledge that improves future performance.
When to Use This Skill
- Session End Analysis: Extract learnings before session context is lost
- After Complex Debugging: Capture root causes and solutions while fresh
- Following Failed Attempts: Document what didn't work and why
- Successful Problem Solving: Preserve solutions for future reuse
- New Pattern Discovery: Identify patterns that should be documented
- Repeated Workflows: Recognize when to create new specialized agents
- Cross-Session Learning: Build organizational memory from individual sessions
Core Philosophy: Knowledge Preservation
Session Context: Ephemeral conversation context that will be lost without active preservation Persistent Knowledge: Structured learnings that improve future performance Pattern Recognition: Identifying when solutions are repeated and should be automated Organizational Growth: Converting individual learning into system-wide improvement
Knowledge Extraction Framework
Three Types of Knowledge Extraction
1. Discoveries - Novel Insights and Root Causes
What it captures: Problems encountered, root causes identified, solutions implemented
When to extract:
- After solving a complex bug
- When debugging reveals unexpected behavior
- When discovering wrong assumptions
- After identifying missing functionality
- When learning why something failed
Format for DISCOVERIES.md:
## [Brief Title] (YYYY-MM-DD)
### Issue
What problem or challenge was encountered?
### Root Cause
Why did this happen? What was the underlying issue?
### Solution
How was it resolved? Include code examples if relevant.
### Key Learnings
What insights were gained? What should be remembered?
### Prevention
How can this be avoided in the future?
Quality Criteria:
- ✅ Specific problem, not generic advice
- ✅ Root cause clearly identified
- ✅ Working solution included
- ✅ Learning generalized for reuse
- ✅ Prevention strategy documented
2. Patterns - Reusable Solutions
What it captures: Proven solutions to recurring problems, architectural approaches, design patterns
When to extract:
- After solving a problem similar to known patterns
- When recognizing a repeated problem type
- When implementing a proven solution
- When discovering a best practice that works
- When solution applies across multiple contexts
Format for PATTERNS.md:
## Pattern: [Name]
### Challenge
What problem does this pattern solve?
### Solution
How does the pattern work? Include code/examples.
### Key Points
- Main insight 1
- Main insight 2
- When to use / when not to use
### When to Use
Specific scenarios where this pattern applies.
### Real Impact
Where has this pattern been used successfully?
### Related Patterns
Links to similar or complementary patterns.
Quality Criteria:
- ✅ General enough to apply to multiple situations
- ✅ Problem clearly defined
- ✅ Solution has proven track record
- ✅ Working code examples
- ✅ Clear when/when-not-to-use guidance
3. Agent Creation - Automation of Repeated Workflows
What it captures: Workflows that are repeated frequently, specialized expertise areas, complex multi-step processes
When to extract:
- After performing the same workflow 2-3 times
- When recognizing a specialized skill area
- When workflow has clear inputs/outputs
- When automating would save significant time
- When problem domain is narrow and well-defined
Agent Creation Trigger Checklist:
- Same workflow repeated 2+ times
- Workflow takes 30+ minutes to execute
- Workflow has clear specialized focus
- Workflow can be automated with current tools
- Problem domain is narrow and well-defined
- Would be high-value to automate
Example Agent Creation:
## Recommended New Agent: [domain]-[specialty]
### Problem
What repeated workflow would this agent handle?
### Scope
What's in scope | What's explicitly out of scope
### Inputs
What information does the agent need?
### Process
Step-by-step workflow the agent follows
### Outputs
What does the agent produce?
### Value
How much time/effort does this save?
### Integration
Where in the workflow does this fit?
Step-by-Step Extraction Process
Step 1: Session Analysis (5 minutes)
Review entire conversation/session:
1. What was the original problem/request?
2. What approaches were tried?
3. Which attempts failed and why?
4. What succeeded and why?
5. What was learned in the process?
6. What surprised you?
7. What took longer than expected?
8. What would have helped?
Step 2: Pattern Recognition (5 minutes)
Identify patterns in the work:
1. Have I seen this problem before? (→ DISCOVERIES)
2. Is this a generalizable solution? (→ PATTERNS)
3. Would this be worth automating? (→ AGENT)
4. What was the root cause? (Why, not just what)
5. What should others know about this?
6. What should be remembered to avoid repetition?
Step 3: Knowledge Extraction (10 minutes)
Extract and structure knowledge:
For DISCOVERIES.md:
- Specific issue encountered
- Root cause analysis
- Solution implemented
- Key learnings generalized
- Prevention strategy
For PATTERNS.md:
- Problem the pattern solves
- How the pattern works
- When to use / when not to use
- Working code examples
- Related patterns
For New Agent:
- Repeated workflow identified
- Clear scope and boundaries
- Input/output requirements
- Step-by-step process
- Expected value/time savings
Step 4: Integration (3 minutes)
Place knowledge in correct locations:
Memory → Store discovery using store_discovery() from amplihack.memory.discoveries
PATTERNS.md → New pattern in appropriate section
Agent → Create in .claude/agents/amplihack/specialized/
Step 5: Validation (2 minutes)
Ensure quality:
[ ] Entry is specific, not generic
[ ] Entry follows template format
[ ] Examples/code provided
[ ] Quality sufficient for reuse
[ ] Grammar and clarity checked
[ ] Related items cross-referenced
Usage Examples
Example 1: Extract Discovery After Bug Fix
Scenario: Just spent 45 minutes debugging why pre-commit hooks weren't working
User: Extract what we learned from debugging the pre-commit issue.
Claude:
1. Analyzes conversation showing:
- Initial problem: hooks appeared to run but didn't modify files
- False leads: blamed merge conflicts, tool versions
- Root cause found: Hooks couldn't write to files due to cloud sync lock
- Solution: Added exponential backoff retry logic
- Time to discover: 45 minutes
2. Creates DISCOVERIES.md entry:
- Issue: Pre-commit hooks silently failing
- Root Cause: Cloud sync (OneDrive) file locks
- Solution: Exponential backoff retry (0.1s, 0.2s, 0.4s...)
- Key Learning: Cloud sync issues silent - need defensive coding
- Prevention: Add retry logic for file I/O, test with cloud storage
3. Offers to also:
- Add pattern for "Resilient File I/O" to PATTERNS.md
- Suggest new agent for cloud-sync issue detection
Example 2: Extract Pattern from Successful Implementation
Scenario: Just finished implementing module regeneration strategy
User: Extract the pattern we discovered for building regeneratable modules.
Claude:
1. Analyzes implementation showing:
- Clear __all__ exports defining public interface
- Self-contained module structure
- Type-hinted functions with docstrings
- Comprehensive test coverage
- Working examples
2. Creates PATTERNS.md entry:
- Pattern: Module Regeneration Structure
- Challenge: Modules become tightly coupled, hard to regenerate
- Solution: Brick & studs design with __all__ public API
- Key Points: Clear contracts, single responsibility, testable behavior
- When to Use: Any utility module, anything that might be regenerated
- Real Impact: Enables AI to rebuild modules without breaking system
3. Cross-references:
- Relates to "Bricks & Studs Module Design"
- Enables "Builder Agent Workflow"
Example 3: Identify New Agent Creation Opportunity
Scenario: Just debugged CI failure using 5-step diagnostic process for 3rd time
User: We keep using the same CI debugging process. Should we automate it?
Claude:
1. Analyzes past sessions:
- Session 1: 45 minutes CI debugging (version mismatch issue)
- Session 2: 30 minutes CI debugging (pre-commit hook issue)
- Session 3: 25 minutes CI debugging (merge conflict issue)
- Pattern: Same 5-step process each time
2. Recommends new agent:
- Name: ci-diagnostic-workflow
- Problem: Each CI failure requires manual diagnosis, takes 30-45 min
- Scope: Diagnoses CI failures, suggests fixes (doesn't auto-fix)
- Process:
1. Check environment (Python version, tool versions)
2. Analyze CI logs for error patterns
3. Detect common issues (conflicts, missing deps)
4. Suggest solutions
5. Coordinate parallel diagnostic agents
- Value: Reduce diagnosis time from 45 min → 15 min
3. Proposes creating:
- .claude/agents/amplihack/ci-diagnostic-workflow.md
- Can delegate to: fix-agent for implementation
Example 4: Multi-Level Extraction
Scenario: Complex architectural decision with multiple learnings
User: Extract everything we learned from deciding on the memory architecture.
Claude:
1. Session involved:
- 2 failed approaches (too complex, wrong threat model)
- 1 successful approach (simple, fits threat model)
- Discovery of meta-pattern for architecture decisions
2. Creates THREE extractions:
DISCOVERIES.md:
- Issue: Pattern Applicability Analysis
- Root Cause: Importing patterns without validating threat match
- Solution: Five-phase applicability analysis framework
- Learning: Threat model match is critical first check
PATTERNS.md:
- New Pattern: Threat Model Precision Principle
- Challenge: Fault tolerance mechanisms mismatch problem space
- Solution: Validate threat model before adopting patterns
- When: Before adopting any "best practice" from different domain
Recommended Agent:
- Name: pattern-applicability-analyzer
- Automate: Quick assessment of pattern applicability
- Value: Prevent adopting wrong patterns early
Knowledge Quality Checklist
Before finalizing an extraction, verify:
For DISCOVERIES.md
- Issue is specific, not generic ("Pre-commit hooks failing" not "Tools broken")
- Root cause is identified (Why, not just what)
- Solution is working/proven
- Learning is generalized (applies beyond this specific case)
- Prevention strategy is actionable
- No speculation or future-proofing
- Code examples provided where relevant
For PATTERNS.md
- Problem is clear and recognizable
- Solution has proven track record (used 2+ times successfully)
- When/when-not-to-use guidance is clear
- Pattern is general enough for reuse
- Code examples are working and clear
- Related patterns are cross-referenced
- Real impact or usage is documented
For New Agent
- Workflow has been repeated 2+ times
- Would save 30+ minutes per execution
- Problem domain is narrow and well-defined
- Inputs and outputs are clear
- Step-by-step process documented
- High-value worth the automation effort
- Clear where it fits in workflow
Integration with System
Discovery Memory Lifecycle
- Extraction: Stored in memory via
store_discovery()during session - Visibility: Retrieved by
get_recent_discoveries()at session start - Action: Agents can query memory when solving similar problems
- Prevention: Prevents repeating same mistakes across sessions
- Evolution: Updated when better solution found
PATTERNS.md Lifecycle
- Extraction: Added to PATTERNS.md when pattern proven
- Catalog: Becomes part of available patterns library
- Usage: Referenced in relevant agent instructions
- Teaching: Used in do
How to use knowledge-extractor on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add knowledge-extractor
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches knowledge-extractor from GitHub repository rysweet/amplihack and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate knowledge-extractor. Access the skill through slash commands (e.g., /knowledge-extractor) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.7★★★★★56 reviews- ★★★★★Aditi Harris· Dec 24, 2024
Keeps context tight: knowledge-extractor is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Carlos Kapoor· Dec 16, 2024
knowledge-extractor is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Carlos Shah· Dec 16, 2024
Useful defaults in knowledge-extractor — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Kaira Menon· Dec 12, 2024
Solid pick for teams standardizing on skills: knowledge-extractor is focused, and the summary matches what you get after install.
- ★★★★★Chaitanya Patil· Dec 8, 2024
knowledge-extractor fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Ishan Mensah· Dec 4, 2024
I recommend knowledge-extractor for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Piyush G· Nov 27, 2024
Registry listing for knowledge-extractor matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Mia Verma· Nov 15, 2024
knowledge-extractor has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Aditi Garcia· Nov 15, 2024
Solid pick for teams standardizing on skills: knowledge-extractor is focused, and the summary matches what you get after install.
- ★★★★★Carlos Johnson· Nov 11, 2024
Useful defaults in knowledge-extractor — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
showing 1-10 of 56