compound
Skill173 starsChanged 8 months agoMITView on GitHub
This skill should be used when the user says "/compound", "compound this", "document learnings", "save what we learned", or after completing a PR. Extracts knowledge from PR context and saves to docs/learnings/.
We split this skill into the rules it gives an agent
5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Use PR number if provided as argument
- Distinctive: line 51
If no context files exist AND no PR comments → Notify user and request manual input
- Very specific: line 94
Check for duplicates: Search docs/learnings/
- Distinctive: line 111
Read template and substitute placeholders
- Distinctive: line 121
Add new document link to Related section of existing documents
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Compound Skill
Extracts knowledge from PR context and saves structured documentation to docs/learnings/.
Workflow
Phase 1: Context Collection
- Identify PR number/branch
- Use PR number if provided as argument
- Otherwise, find PR from current branch:
gh pr view --json number,body,title - If no PR exists: Prompt user to enter PR number directly or confirm proceeding without PR
- Extract Plan path
- Find Plan path pattern in PR body:
.hoyeon/specs/{name}/PLAN.md - Regex:
\.hoyeon/specs/[^/]+/PLAN\.md - If no Plan path found: Prompt user to enter spec name directly or select from
.hoyeon/specs/directory listing
- Find Plan path pattern in PR body:
- Derive Context path
- Extract spec name from Plan path
- Context directory:
.hoyeon/specs/{name}/context/
- Parallel collection (run following commands simultaneously, skip if files don't exist)
# Context files (treat as empty if not found) cat .hoyeon/specs/{name}/context/learnings.json 2>/dev/null || echo "" cat .hoyeon/specs/{name}/context/decisions.md 2>/dev/null || echo "" cat .hoyeon/specs/{name}/context/issues.json 2>/dev/null || echo "" # PR comments and reviews (collect as JSON for stability) gh pr view {pr_number} --json comments,reviews
Error Handling:
- If no context files exist AND no PR comments → Notify user and request manual input
- At least 1 source required to proceed with document generation
Phase 2: Knowledge Extraction & Classification
2.1 Extract Valuable Feedback from PR Comments
Criteria for valuable feedback:
- Code improvement suggestions
- Bug/issue identification
- Pattern/best practice mentions
- "This would be better" type advice
- Comments left with approval
Filter out:
- Simple questions ("What is this?")
- Confirmation requests ("Is this correct?")
- Approval-only comments ("LGTM", "Approved")
- Bot comments
Extraction keywords:
- "suggest", "recommend", "better", "instead"
- "pattern", "practice", "convention"
- "issue", "bug", "fix"
- "learned", "TIL", "note"
Extracted information:
- author
- body
- file_path (if inline comment)
- created_at
2.2 Analyze Context Files
| File | Purpose |
| learnings.json | Structured learnings |
| decisions.md | Decision rationale |
| issues.json | Structured issues |
2.3 Synthesize
- Assess documentation value from collected sources
- Check for duplicates: Search
docs/learnings/ - Classify problem type - Refer to
references/problem-types.md(relative to this skill directory) - Generate tags
Phase 3: Document Generation
- Generate YAML frontmatter
pr_number: {PR_NUMBER} date: {YYYY-MM-DD} problem_type: {TYPE} tags: [{TAGS}] plan_path: {PLAN_PATH} - Write document using template
- Template location:
templates/LEARNING_TEMPLATE.md(relative to this skill directory) - Read template and substitute placeholders
- Template location:
- Determine filename
- Format:
{YYYY-MM-DD}-{short-title}.md - Example:
2024-01-15-api-error-handling.md
- Format:
- Save
- Path:
docs/learnings/{filename}.md
- Path:
- Add cross-references (if related documents exist)
- Add new document link to Related section of existing documents
Usage Examples
# Specify PR number
/compound 123
# Use PR from current branch
/compoundOutput
Outputs the created document path and summary:
Created: docs/learnings/2024-01-15-api-error-handling.md
Summary:
- Problem Type: error-handling
- Tags: api, typescript, validation
- Sources: learnings.json, 2 PR comments<!-- TODO: Future extensions --><!-- - [ ] Session ID based user feedback collection --><!-- - [ ] CLAUDE.md auto-update suggestions --><!-- - [ ] Detect existing document UPDATEs --><!-- - [ ] Auto-categorization by problem_type (docs/solutions/{type}/) -->Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- m-xlsea/ruoyi-plus-soybean★ 328same name
- garagon/nanostack★ 206same name
- ai-native-camp/camp-2★ 19same name
- rcelebrone/DotAgents★ 15same name
- minhtran3124/agent-harness★ 9same name
- Andamio-Platform/coach★ 6same name
- chrislacey89/skills★ 3same name
- toverux/cantrips★ 3same name
- Artifacts7/newsletter-context-kit★ 2same name
- dirkkok101/skills★ 2same name
7 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use brainstorm, ship and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
nicodianskSkillbrainstorm
Use when starting creative work - creating features, building components, adding functionality, or modifying behavior. Explores requirements through Socratic dialogue before any implementation.
Also in 3 projects that use this
AWSSkillship
Finalize dev work on an issue branch — update docs, push, and open a PR.
Also in 3 projects that use this
NVIDIASkillresearch
Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.
Also in 3 projects that use this
GoogleSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
In this repository27 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-ossSkill
- blueprintSkill
- browser-workSkill
- bugfixSkill
- checkSkill
- clarifySkill
- councilSkill
- deep-researchSkill
- dev-scanSkill
- discussSkill
- executeSkill
- google-searchSkill
- issueSkill
- mirrorSkill
- qaSkill
- ralphSkill
- reference-seekSkill
- rulphSkill
- scaffoldSkill
- skill-session-analyzerSkill
- specifySkill
- stepbackSkill
- tech-decisionSkill
- tribunalSkill
- ultraworkSkill
- verifySkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

