Back to list
Spectaculous-Code

opi

by Spectaculous-Code

0🍴 0📅 Jan 25, 2026

SKILL.md


name: opi description: | Extract learnings from recent git commits and current conversation. Analyzes fixes, refactors, and corrections to propose entries for learnings files.

Use when:

  • User says "/opi" or "opi"
  • "What did we learn?"
  • "Extract learnings"
  • "Update learnings"
  • End of session reflection

Triggers: "opi", "learn", "oppia", "mitä opittiin", "extract learnings"

Opi - Learning Extractor

Automatically extract learnings from recent work to improve future Claude sessions.

Workflow

Step 1: Gather Sources

Run these commands to collect learning material:

# Recent commits (last 20)
git log --oneline -20

# Today's commits with details
git log --since="midnight" --format="%h %s"

# Commits with "fix", "korjaus", "refactor"
git log --oneline -50 | grep -iE "(fix|korja|refactor|bugfix)"

Step 2: Analyze Fix Commits

For each fix/refactor commit, examine what changed:

git show <commit-hash> --stat
git show <commit-hash> -- "*.tsx" "*.ts"  # Code changes

Look for patterns:

  • What was wrong? (the bug/issue)
  • What fixed it? (the solution)
  • Why? (root cause)

Step 3: Check Current Conversation

Review current conversation for:

  • User corrections ("ei, tee näin..." / "no, do it this way...")
  • Failed attempts that were fixed
  • Non-obvious solutions discovered
  • Repeated patterns

Step 4: Categorize Learnings

Determine where each learning belongs:

Learning TypeDestination
React/TypeScript pattern.claude/LEARNINGS.md
Supabase/DB pattern.claude/LEARNINGS.md
CI/CD specificci-doctor/references/learnings.md
Lint specificlint-fixer/references/learnings.md
Test specifictest-writer/references/learnings.md
Skill-specific[skill]/references/learnings.md

Step 5: Propose Learnings

Format each learning proposal:

## Proposed Learning

**Source:** commit abc123 / conversation
**Category:** [Global / Skill-specific]
**File:** [target file path]

### [Issue Title]
- **Pattern:** What triggers this
- **Wrong:** ❌ The incorrect approach
- **Right:** ✅ The correct approach
- **Why:** Root cause

Step 6: Get Approval & Write

  1. Present all proposed learnings to user
  2. User approves/rejects each
  3. Write approved learnings to appropriate files
  4. Commit changes

Learning Quality Criteria

Only propose learnings that are:

  • Non-obvious - Claude wouldn't know this without being told
  • Actionable - Can be applied in future situations
  • Specific - Has concrete wrong/right examples
  • Recurring - Likely to come up again

Skip:

  • Typo fixes
  • One-off configuration issues
  • Project-specific constants
  • Things Claude already knows

Example Session

User: /opi

Claude: Let me analyze recent commits...

Found 3 potential learnings:

1. **useCallback for useEffect deps** (commit a1b2c3)
   - Source: AdminTranslationsPage infinite loop fix
   - File: .claude/LEARNINGS.md
   - Pattern: Functions in useEffect deps cause re-renders

2. **GitHub API dismiss format** (commit d4e5f6)
   - Source: CodeQL alert dismissal
   - File: ci-doctor/references/learnings.md
   - Pattern: Use "false positive" not "false_positive"

3. **Controlled Tabs state** (conversation)
   - Source: Feedback popup tab fix
   - File: .claude/LEARNINGS.md
   - Pattern: Radix Tabs need value+onValueChange for control

Add these learnings? [Y/n for each]

Commands Reference

# Commits since specific date
git log --since="2025-01-10" --oneline

# Commits by pattern
git log --all --oneline | grep -i "fix"

# Show specific commit
git show <hash> --name-only

# Diff for a commit
git diff <hash>^..<hash>

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon