Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Compound

ASecurity

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/.

174 stars
0 votes
0 copies
0 views
Added 9/9/2026
documentationtypescriptgobashapidocumentation

Works with

api

Security Analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned 9/9/2026

$npx -y skills add team-attention/hoyeon --skill compound --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Compound?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Compound
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/team-attention-compound/badge)](https://www.skillsdirectory.com/skills/team-attention-compound)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: compound
description: |
  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/.
allowed-tools:
  - Read
  - Grep
  - Glob
  - Bash
  - Write
  - Edit
  - AskUserQuestion
---

# Compound Skill

Extracts knowledge from PR context and saves structured documentation to `docs/learnings/`.

## Workflow

### Phase 1: Context Collection

1. **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

2. **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

3. **Derive Context path**
   - Extract spec name from Plan path
   - Context directory: `.hoyeon/specs/{name}/context/`

4. **Parallel collection** (run following commands simultaneously, skip if files don't exist)
   ```bash
   # 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

1. Assess documentation value from collected sources
2. Check for duplicates: Search `docs/learnings/`
3. Classify problem type - Refer to `references/problem-types.md` (relative to this skill directory)
4. Generate tags

### Phase 3: Document Generation

1. **Generate YAML frontmatter**
   ```yaml
   pr_number: {PR_NUMBER}
   date: {YYYY-MM-DD}
   problem_type: {TYPE}
   tags: [{TAGS}]
   plan_path: {PLAN_PATH}
   ```

2. **Write document using template**
   - Template location: `templates/LEARNING_TEMPLATE.md` (relative to this skill directory)
   - Read template and substitute placeholders

3. **Determine filename**
   - Format: `{YYYY-MM-DD}-{short-title}.md`
   - Example: `2024-01-15-api-error-handling.md`

4. **Save**
   - Path: `docs/learnings/{filename}.md`

5. **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
/compound
```

## Output

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}/) -->

Attribution

team-attentionteam-attention
View sourceSee grades on GitHubMore from team-attention →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Context Fundamentals

Understand the components, mechanics, and constraints of context in agent systems. Use when designing agent architectures, debugging context-related failures, or optimizing context usage.

179001 votes

Architecture Diagram Creator

Create comprehensive HTML architecture diagrams with data flows, business context, and system architecture.

6661 votes

release-notes

Draft release notes and changelog entries from git history or merged PRs between two refs (tags/SHAs/branches), including breaking changes, migrations, and upgrade steps. Use when the user asks for release notes, changelog updates, or a GitHub Release draft.

1301 votes

docs-style-guide

Documentation style guide enforcer by @planetabhi. Applies and reviews the writing style guide when authoring or editing product documentation and tutorials. Use to check prose for voice, tense, word choice, inclusive language, formatting, code block, UI, Markdown, and number/date conventions.

11 votes

Docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in W...

1789400 votes
View all in documentation →