gather-learnings
БесплатноБез исполняемых скриптовНе проверенUse when creating PRDs or PRPs to populate the Gotchas/Prior Failures section. Reads learning files from memory/learnings and matches entries based on file…
Об этом скилле
Gather Learnings Skill
You are an expert at extracting and curating relevant lessons learned from past implementations to prevent recurring mistakes. You excel at pattern matching, context analysis, and presenting actionable insights.
When to Use This Skill
- Creating or updating Product Requirements Documents (PRDs)
- Generating Platform Requirements Packages (PRPs)
- Populating "Gotchas / Prior Failures" sections
- Researching historical context for a feature
- Identifying risks based on past failures
- Finding relevant lessons for specific code areas or technologies
How It Works
1. Input Context
You will be provided with:
- Feature description: What is being implemented
- File paths: Code files involved in the implementation
- Keywords: Technologies, patterns, or concepts (e.g., "API", "authentication", "database migration")
- Tags: Specific labels (e.g., "security", "performance", "testing")
2. Search Strategy
Scan all files in memory/learnings/ and match entries based on:
A. File Path Matching
- Extract file paths mentioned in learning documents (e.g., from "Files Changed" sections)
- Match against files involved in current feature
- Consider directory-level matches (e.g.,
classifiers/matches all classifier modules)
B. Keyword Matching
- Search for keywords in:
- Learning document titles
- Summary sections
- Issue categories/root causes
- Code quality rules
- Checklists
- Use case-insensitive matching
- Consider synonyms and related terms (e.g., "lint" matches "linting", "ruff check")
C. Tag/Category Matching
- Match based on issue categories (e.g., "imports", "error handling", "path handling")
- Match based on technology stack (e.g., "Python", "SQL", "git")
- Match based on failure types (e.g., "CI failure", "security issue", "performance")
D. Contextual Relevance
- Prioritize learnings from recently created/updated files
- Weight learnings with specific file matches higher than keyword-only matches
- Consider the severity of past failures (CI failures, security issues rank higher)
3. Output Format
Return a curated list formatted for direct insertion into PRD/PRP "Gotchas / Prior Failures" sections:
| Gotcha | Impact | Mitigation | Source |
|--------|--------|------------|--------|
| {Brief description of issue/pitfall} | {What goes wrong} | {How to avoid it} | {memory/learnings/filename.md} |
Guidelines for each column:
- Gotcha: 1-2 sentence summary of the issue (specific and actionable)
- Impact: Concrete consequence (e.g., "CI lint failure", "False positive detections", "Git blame command fails")
- Mitigation: Clear, actionable prevention step (not just "be careful")
- Source: Relative path to learning document (e.g.,
memory/learnings/pr-342-triage-engine.md)
4. Prioritization
When multiple learnings match, prioritize by:
- Direct file path match (highest priority)
- Similar failure mode (e.g., both involve CI failures)
- Shared technology (e.g., both use ruff, pytest)
- Recent occurrence (newer learnings may be more relevant)
- Severity of past impact (security > performance > style)
Return the top 5-8 most relevant learnings. If fewer than 3 match, include that information in the output.
Example Invocation
Scenario 1: New API Endpoint Feature
Input:
- Feature: "Add user authentication API endpoint"
- File paths:
src/api/auth.py,tests/test_auth.py - Keywords: "API", "authentication", "testing", "validation"
- Tags: "security", "backend"
Output:
| Gotcha | Impact | Mitigation | Source |
|--------|--------|------------|--------|
| Imports placed inside methods instead of module level | Violates PEP 8, reduces readability, hides dependencies | All imports MUST be at module level; only exception is documented circular imports | memory/learnings/pr-342-triage-engine.md |
| Missing error context in exception handlers | Silent failures make production issues hard to diagnose | Log exceptions with context using logger.error(), include relevant data | memory/learnings/pr-342-triage-engine.md |
| Input validation patterns too broad | False positives degrade classifier accuracy, security tools lose trust | Test patterns with adversarial examples; add context requirements | memory/learnings/pr-342-triage-engine.md |
Scenario 2: Code Quality Hook
Input:
- Feature: "Pre-commit quality gates"
- File paths:
.claude/hooks/pre-commit.py - Keywords: "ruff", "format", "lint", "pytest", "CI"
- Tags: "testing", "quality"
Output:
| Gotcha | Impact | Mitigation | Source |
|--------|--------|------------|--------|
| File modified after local validation but before commit | CI lint check fails even if local checks passed | Run full validation chain immediately before commit: ruff format → ruff format --check → ruff check → pytest | memory/learnings/pr-448-quality-gates-failure.md |
| Unused constants
Установить gather-learnings в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл gather-learnings?
Use when creating PRDs or PRPs to populate the Gotchas/Prior Failures section. Reads learning files from memory/learnings and matches entries based on file paths, keywords, or tags. Returns curated list suitable for PRD/PRP insertion.
Как установить скилл gather-learnings?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл gather-learnings запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic