Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

learn-from-pr

БесплатноБез исполняемых скриптовНе проверен

Analyzes a completed PR to extract lessons learned from agent behavior. Use after any PR with agent involvement - whether the agent failed, succeeded slowly…

dotnetот dotnet★ 23 319 звёзд на GitHub

Об этом скилле

Learn From PR

Extracts lessons learned from a completed PR to improve repository documentation and agent capabilities.

Inputs

Input Required Source
PR number or Issue number Yes User provides (e.g., "PR #33352" or "issue 33352")

Outputs

  1. Learning Analysis - Structured markdown with:

    • What happened (problem, attempts, solution)
    • Fix location analysis (attempted vs actual)
    • Failure modes identified
    • Prioritized recommendations
  2. Actionable Recommendations - Each with:

    • Category, Priority, Location, Specific Change, Why It Helps

Completion Criteria

The skill is complete when you have:

  • Gathered PR diff and metadata
  • Analyzed fix location (attempted vs actual)
  • Identified failure modes
  • Generated at least one concrete recommendation
  • Presented findings to user

When to Use

  • After agent failed to find the right fix
  • After agent succeeded but took many attempts
  • After agent succeeded quickly (to understand what worked)
  • When asked "what can we learn from PR #XXXXX?"

When NOT to Use

  • Before PR is finalized (use pr-finalize first)
  • For trivial PRs (typo fixes, simple changes)
  • When no agent was involved (nothing to analyze)

Workflow

Step 1: Gather Data

# Required: Get PR info
gh pr view XXXXX --json title,body,files
gh pr diff XXXXX

Analyze the PR to extract learning:

  1. PR discussion - Comments reveal what was tried
  2. Commit history - Multiple commits may show iteration
  3. Code complexity - Non-obvious fixes suggest learning opportunities
  4. Similar past issues - Search for related bugs

Focus on: "What would have helped an agent find this fix faster?"

Step 2: Fix Location Analysis

Critical question: Did agent attempts target the same files as the final fix?

# Where did final fix go?
gh pr view XXXXX --json files --jq '.files[].path' | grep -v test
Scenario Implication
Same files Agent found right location
Different files Major learning opportunity - document why

If different files: Answer these questions:

  • Why did agent think that was the right file?
  • What search would have found the correct file?

Step 3: Analyze Outcome

Determine which scenario applies and look for the relevant patterns:

Scenario A: Agent Failed

Pattern Indicator
Wrong file entirely All attempts in File A, fix in File B
Tunnel vision Only looked at file mentioned in error
Trusted issue title Issue said "crash in X" so only looked at X
Pattern not generalized Fixed one instance, missed others
Didn't search codebase Never found similar code patterns
Missing platform knowledge Didn't know iOS/Android/Windows specifics
Wrong abstraction layer Fixed handler when problem was in core
Misread error message Error pointed to symptom, not cause
Incomplete context Didn't read enough surrounding code
Over-engineered Complex fix when simple one existed

Scenario B: Agent Succeeded Slowly (many attempts)

Pattern Indicator
Correct file, wrong approach Found right file but tried wrong fixes first
Needed multiple iterations Each attempt got closer but wasn't quite right
Discovery was slow Eventually found it but search was inefficient
Missing domain knowledge Had to learn something that could be documented

Key question: What would have gotten agent to the solution faster?

Scenario C: Agent Succeeded Quickly

Pattern Indicator
Good search strategy Found right file immediately
Understood the pattern Recognized similar issues from past
Documentation helped Existing docs pointed to solution
Simple, minimal fix Didn't over-engineer

Key question: What made this work? Should we reinforce this pattern?

Step 4: Find Improvement Locations

# Discover where agent guidance lives
find .github/instructions -name "*.instructions.md" 2>/dev/null
find .github/skills -name "SKILL.md" 2>/dev/null
ls docs/design/ 2>/dev/null
ls .github/copilot-instructions.md 2>/dev/null
Location When to Add Here
.github/instructions/*.instructions.md Domain-specific AI guidance (testing patterns, platform rules)
.github/skills/*/SKILL.md Skill needs new step, checklist, or improved workflow
/docs/design/*.md Detailed architectural documentation
.github/copilot-instructions.md General AI workflow guidance
Code comments Non-obvious code behavior

Step 5: Generate Recommendations

For each recommendation, provide:

  1. Category: Instruction file / Skill / Architecture doc / Inline comment / Linting issue
  2. Priority: High (prevents cla
Полный SKILL.md на GitHub

Установить learn-from-pr в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл learn-from-pr?

Analyzes a completed PR to extract lessons learned from agent behavior. Use after any PR with agent involvement - whether the agent failed, succeeded slowly, or succeeded quickly. Identifies patterns to reinforce or fix, and generates actionable recommendations for instruction files, skills, and documentation.

Как установить скилл learn-from-pr?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл learn-from-pr запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить learn-from-pr с