Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Learn patterns from a specific GitHub repository. Clones, analyzes code structure, extracts patterns, and populates procedural memory. Use for: targeted learning from known quality repos, quick knowledge acquisition, specific pattern extraction. Triggers: /repo-learn, /curator-repo-learn, 'learn from repo'.
.claude/skills/majiayu000-curator-repo-learn/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-17 | ✗→✓ | ▲ Improved | 80% | 0% |
| case-23 | ✗→✓ | ▲ Improved | 102% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 99% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 37% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 33% | 0% |
Single Repository Pattern Extraction - Learn from a specific GitHub repository.
Priorities (ordered): accuracy → relevance → speed → coverage
Scope: Clone repository, analyze structure, extract patterns, update procedural memory.
Optimal Scenario: B (Custom Subagents)
| Criterion | Weight | Score | Rationale | |-----------|--------|-------|-----------| | Coordination Need | 25% | 2/10 | Independent operation | | Specialization Need | 25% | 9/10 | Requires pattern recognition | | Quality Gate Need | 20% | 6/10 | Moderate validation needed | | Tool Restriction Need | 15% | 3/10 | Standard tools sufficient | | Scalability | 15% | 2/10 | Single repo focus | | Total | 100% | 5.2/10 | Scenario B optimal |
yaml# Direct Subagent Spawn Task(subagent_type="ralph-researcher", prompt=""" Analyze repository ${REPO_URL}: 1. Clone repository (shallow) 2. Detect domain and language 3. Scan for: - Function/method patterns - Class/interface definitions - Configuration patterns - Error handling patterns - Testing patterns 4. Extract rules with: - domain: <detected> - category: <detected> - confidence: 0.75-0.95 - source_repo: ${REPO_URL} - source_file: <path> 5. Update ~/.ralph/procedural/rules.json 6. Create manifest with files[] array Return: patterns extracted, rules added, domain detected """)
bash/repo-learn https://github.com/owner/repo
bash/repo-learn https://github.com/nestjs/nest --domain backend
bash/repo-learn https://github.com/vercel/next.js --lang typescript
┌─────────────────────────────────────────────────────────────┐
│ REPO-LEARN PIPELINE │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. VALIDATE URL │
│ ├── Check GitHub format │
│ └── Verify repository exists │
│ │
│ 2. CLONE REPOSITORY │
│ ├── Shallow clone (--depth 1) │
│ └── Store in ~/.ralph/curator/corpus/learning/ │
│ │
│ 3. DETECT METADATA │
│ ├── Domain (backend, frontend, etc.) │
│ ├── Language (typescript, python, etc.) │
│ └── Framework indicators │
│ │
│ 4. SCAN FILES │
│ ├── Source files (*.ts, *.py, etc.) │
│ ├── Configuration files │
│ └── Documentation files │
│ │
│ 5. EXTRACT PATTERNS │
│ ├── Function signatures │
│ ├── Class structures │
│ ├── Import patterns │
│ ├── Error handling patterns │
│ └── Configuration patterns │
│ │
│ 6. CREATE RULES │
│ ├── rule_id: unique identifier │
│ ├── domain: detected or specified │
│ ├── category: sub-domain │
│ ├── confidence: 0.75-0.95 │
│ ├── source_repo: repository URL │
│ ├── source_file: file path │
│ └── behavior: pattern description │
│ │
│ 7. UPDATE PROCEDURAL MEMORY │
│ ├── Backup existing rules.json │
│ ├── Merge new rules (unique_by rule_id) │
│ └── Update manifest │
│ │
│ 8. CREATE MANIFEST (GAP-C01 FIX) │
│ ├── files[]: processed file list │
│ ├── patterns_extracted: count │
│ ├── detected_domain: domain │
│ └── detected_language: language │
│ │
└─────────────────────────────────────────────────────────────┘Automatic domain detection from repository content:
bash# Domain Keywords backend: api, server, rest, graphql, controller, service frontend: react, vue, angular, component, hook, state database: sql, query, schema, migration, orm, prisma security: auth, jwt, token, encrypt, hash, csrf testing: test, spec, jest, vitest, mock, coverage devops: docker, kubernetes, ci, deploy, pipeline hooks: hook, lifecycle, callback, trigger, event general: config, util, helper, common, shared
json{ "repository": "https://github.com/nestjs/nest", "learned_at": "2026-02-14T22:00:00Z", "detected_domain": "backend", "detected_language": "typescript", "files": [ "packages/core/nest-application.ts", "packages/core/nest-factory.ts", "packages/common/services/logger.service.ts" ], "patterns_extracted": 12, "rules_added": [ { "rule_id": "rule-backend-1739566800-abc123", "domain": "backend", "category": "backend", "source_repo": "https://github.com/nestjs/nest", "source_file": "packages/core/nest-application.ts", "behavior": "Classes: class NestApplication. Functions: async initialize, async dispose.", "confidence": 0.85 } ] }
| Error | Recovery | |-------|----------| | Invalid URL | Show usage, exit | | Repository not found | Suggest alternatives, exit | | Clone failure | Retry with different depth | | No patterns found | Log warning, return empty | | Rules merge failure | Restore from backup |
bash# Quick learning without full pipeline /curator quick --repo owner/repo # Full pipeline for comprehensive learning /curator full --type backend --lang typescript # Single repo learning (this skill) /repo-learn https://github.com/owner/repo
/curator - Full pipeline (Scenario C)/smart-fork - Pattern extraction and forking/research - Repository research| File | Purpose | |------|---------| | .claude/scripts/curator-learn.sh | Pattern extraction (GAP-C01, GAP-C02 fixed) | | .claude/scripts/curator-ingest.sh | Repository cloning | | .claude/scripts/backfill-domains.sh | Domain backfill for existing rules | | ~/.ralph/procedural/rules.json | Procedural memory |
Esta skill genera reportes automáticos completos para trazabilidad:
Cuando esta skill completa, se genera automáticamente:
docs/actions/curator-repo-learn/{timestamp}.md.claude/metadata/actions/curator-repo-learn/{timestamp}.jsonCada reporte incluye:
bash# Listar todos los reportes de esta skill ls -lt docs/actions/curator-repo-learn/ # Ver el reporte más reciente cat $(ls -t docs/actions/curator-repo-learn/*.md | head -1) # Buscar reportes fallidos grep -l "Status: FAILED" docs/actions/curator-repo-learn/*.md
bashsource .claude/lib/action-report-lib.sh start_action_report "curator-repo-learn" "Task description" # ... ejecución ... complete_action_report "success" "Summary" "Recommendations"
Other measured skills in the registry, with their headline benchmark lift.