Agent skill
plugin-apply-lessons-learned
Apply accumulated lessons learned to component documentation
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/plugin-apply-lessons-learned
SKILL.md
Apply Lessons Learned Skill
Read lessons learned via manage-lessons skill and apply them to component documentation.
Usage
# Apply lessons to specific component
/plugin-apply-lessons-learned command=maven-build-and-fix
/plugin-apply-lessons-learned agent=maven-builder
/plugin-apply-lessons-learned skill=builder-maven-rules
# Apply all unapplied lessons across components
/plugin-apply-lessons-learned --all
# List unapplied lessons (dry-run)
/plugin-apply-lessons-learned --list
# Show usage
/plugin-apply-lessons-learned
WORKFLOW
Step 1: Parse Parameters
- Extract component type and name, or flags (--all, --list)
- Validate parameter syntax
Step 2: Load Lessons Learned Skill
Skill: plan-marshall:manage-lessons
Step 3: Query Unapplied Lessons
- Use
query-lessons.pyscript to filter lesson files - For specific component: Filter by
component.name - For --all: Filter all where
applied: false - For --list: Display lessons without applying
Step 4: For Each Unapplied Lesson
a. Locate component source:
- Commands:
marketplace/bundles/{bundle}/commands/{name}.md - Agents:
marketplace/bundles/{bundle}/agents/{name}.md - Skills:
marketplace/bundles/{bundle}/skills/{name}/SKILL.md
b. Analyze lesson category:
bug: Add to CRITICAL RULES or error handling sectionimprovement: Add to workflow or suggest enhancementpattern: Add to best practices or examplesanti-pattern: Add to warnings or "do not" section
c. Determine appropriate placement:
- Read component documentation
- Find relevant section for lesson category
- Prepare edit that integrates lesson naturally
d. Apply lesson:
- Edit component documentation
- Integrate lesson content (not raw JSON, but natural prose)
- Maintain document structure and formatting
e. Mark lesson applied:
- Edit lesson file frontmatter: Change
applied: falsetoapplied: true
Step 5: Report Results
- Number of lessons applied per component
- Any lessons that couldn't be applied (with reason)
- Components updated
PARAMETERS
Component targeting (mutually exclusive with flags):
command={name}- Apply lessons for specific commandagent={name}- Apply lessons for specific agentskill={name}- Apply lessons for specific skill
Flags:
--all- Apply all unapplied lessons across all components--list- List unapplied lessons without applying (dry-run)
Error Handling:
- No parameters → Display usage
- Component not found → Error with suggestion
- No lessons file → Report "no lessons recorded"
- No unapplied lessons → Report "nothing to apply"
LESSON APPLICATION RULES
Bug Lessons
Add to component's error handling or critical rules section:
## CRITICAL RULES
- **Paths with spaces**: Quote all paths in Bash calls to handle spaces correctly
Improvement Lessons
Add as enhancement notes or workflow refinements:
### Step 3: Process Files
**Enhancement**: Add progress indicator every 50 files for large batches.
Pattern Lessons
Add to examples or best practices:
## Best Practices
- Validate all inputs in Step 1 before processing to catch errors early
Anti-Pattern Lessons
Add to warnings or "avoid" sections:
## CRITICAL RULES
**Avoid:**
- Do NOT modify files during glob iteration - collect list first, then process
OUTPUT FORMAT
## Applied Lessons
### command/maven-build-and-fix
- [2025-11-25-001] bug: Paths with spaces → Added to CRITICAL RULES
- [2025-11-25-002] improvement: Progress indicator → Added enhancement note
### agent/maven-builder
- [2025-11-24-001] pattern: Verify phase → Added to best practices
## Summary
- Components updated: 2
- Lessons applied: 3
- Lessons skipped: 0
Related
plan-marshall:manage-lessons- Skill for lesson storage/retrieval/plugin-maintain- General component maintenance/plugin-doctor- Diagnose component issues
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?