AGENT SKILL

compound-docs

Capture solved problems as searchable documentation with pattern detection. This skill auto-triggers when users confirm a fix worked ("that worked", "it's fixed", "working now") or manually via /compound command.

License 许可
MIT
所属仓库
bg-szy/TOP-SKILLS
最近更新
2026-11-15
Stars
★ 6
Forks
0

01 前言 Front Matter

name
compound-docs
license
MIT
version
0.1.0-beta
description
Capture solved problems as searchable documentation with pattern detection. This skill auto-triggers when users confirm a fix worked ("that worked", "it's fixed", "working now") or manually via /compound command.
compatibility
opencode

02 资源文件 4

03 SKILL.md 正文

Auto-Invoke Triggers

This skill auto-triggers when the user says:

  • "that worked"
  • "it's fixed"
  • "working now"
  • "problem solved"
  • "that did it"

Manual command: /compound

Workflow

Step 1: Detect Trigger

When a trigger phrase is detected or /compound is invoked:

  1. Confirm the problem is actually solved (not still in progress)
  2. Check if the fix is worth documenting

Skip documentation for trivial fixes:

  • Simple typos
  • Obvious syntax errors (missing semicolon, bracket)
  • Single-line fixes that were immediately obvious

If skipping, briefly explain why: "This was a simple typo fix - skipping documentation."

Step 2: Gather Context

Read schema.yaml to get valid enum values, then extract from the conversation:

Field Required Description
Symptom Yes Error message or observable behavior
Category Yes From schema.yaml category.values (or add new)
Component No From schema.yaml component.values (or add new)
Root cause No From schema.yaml root_cause.values (or add new)
Solution Yes The fix that worked
Prevention No How to avoid this in the future

If a value doesn't exist in schema.yaml:

  1. Add the new value to the appropriate enum in schema.yaml
  2. If it's a new category, create the directory: mkdir -p {output_dir}/{new-category}

If critical info is missing, ask:

To document this fix, I need a few details:

1. Category: What type of issue was this?
   [list current values from schema.yaml]
   Or suggest a new category if none fit

Step 3: Check for Similar Issues

Before creating a new doc, search for similar existing issues:

  1. Keyword match - Search {output_dir}/ for error message fragments or key symptom phrases
  2. File path match - Check if the same files are involved in existing docs
  3. Import/dependency match - Check if the same libraries or modules are mentioned
# Example searches
grep -rl "ErrorMessage" docs/solutions/
grep -l "path/to/file" docs/solutions/**/*.md

If potential matches found:

Found potentially related issues:
- docs/solutions/integration/api-timeout-20250102.md
- docs/solutions/integration/auth-header-missing-20250105.md

Are any of these the same or related issue? (y/n)

If related, add to the related field in frontmatter.

Step 4: Create Documentation

Validate against schema.yaml:

  1. Read schema.yaml for current valid enum values
  2. Ensure all required fields are present
  3. Ensure enum values exist (or add them first)

Generate filename:

  • Format: {sanitized-symptom}-{YYYYMMDD}.md
  • Sanitize: lowercase, replace spaces with hyphens, remove special chars, truncate to 80 chars

Create file at: {output_dir}/{category}/{filename}

Ensure directory exists:

mkdir -p {output_dir}/{category}

Use the Solution Doc Template below.

Step 5: Pattern Promotion

After creating the doc, check if this issue has occurred multiple times.

If similar issues >= threshold (default: 2):

This issue has occurred {N} times:
- {link to issue 1}
- {link to issue 2}
- {link to current issue}

Promote to patterns.md? This surfaces it prominently for future sessions.
1. Yes - Add to patterns
2. No - Keep as regular doc only

If yes: Append to {output_dir}/patterns.md using the Pattern Template below.

Solution Doc Template

---
date: { YYYY-MM-DD }
category: { category }
symptoms:
  - { symptom 1 }
  - { symptom 2 }
component: { component }
root_cause: { root_cause }
tags: [{ keyword1 }, { keyword2 }]
related: []
---

# {Problem Title}

## Problem

{1-2 sentence description of what went wrong}

## Symptoms

- {What you observed - error messages, behavior, etc.}

## What Didn't Work

- {Attempted solution 1} - {Why it failed}
- {Attempted solution 2} - {Why it failed}

## Solution

{Description of the fix}

```{language}
# Before (broken)
{code before}

# After (fixed)
{code after}
```

Why This Works

{Technical explanation of the root cause and why the solution addresses it}

Prevention

{How to avoid this in the future - tests, linting rules, patterns to follow}


## Pattern Template

When adding to `patterns.md`:

```markdown
## {Pattern Name}

**Occurrences:** {N} times ({link1}, {link2}, ...)

### WRONG

```{language}
{code that causes the problem}

CORRECT

{code that fixes it}

Why: {Technical explanation}

When this applies: {Context or conditions when this pattern is relevant}


## Integration

### Reference in AGENTS.md

Add to your project's AGENTS.md to ensure patterns are checked:

```markdown
## Required Reading

Before making changes, review known patterns:
- [Solution Patterns](docs/solutions/patterns.md)

Consuming Solutions

Other workflows can discover and apply documented solutions:

Search by keyword:

grep -rl "keyword" docs/solutions/

Search by category:

ls docs/solutions/deployment/

Search by tag:

grep -l "tags:.*docker" docs/solutions/**/*.md

patterns.md is the primary integration point - check it first for critical patterns before making changes.

Example Scenario

User: "That worked! The Docker build was failing because of the cache issue."

Agent response:

Great! Let me document this fix.

**Reading schema.yaml...**
Current categories: developer-experience, deployment, ui, integration, performance, testing
Current components: (none yet)
Current root_causes: (none yet)

**Gathering context...**

From our conversation:
- Symptom: Docker build failing with "layer not found" error
- Category: deployment
- Component: docker (adding to schema.yaml)
- Root cause: stale-cache (adding to schema.yaml)
- Solution: Added `--no-cache` flag and updated base image tag
- Prevention: Pin base image versions, use `docker system prune` periodically

**Updating schema.yaml...**
Added 'docker' to component.values
Added 'stale-cache' to root_cause.values

**Checking for similar issues...**
No related issues found.

**Creating documentation...**
Created: docs/solutions/deployment/docker-layer-not-found-20250106.md

Documentation complete.

04 同仓库更多 Skills

bg-szy
bg-szy/TOP-SKILLS

serpmaven

Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.

★ 6
bg-szy
bg-szy/TOP-SKILLS

revnu-landing-page-audit

Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: "audit my landing page", "why isn't this page converting", "review my homepage", "my ads get clicks but no signups", "people bounce from the pricing page", "CRO review", "improve conversion rate", "is my hero section clear", "roast my landing page", "rewrite my headline", "what's wrong with this page", "landing page feedback", "make the signup page convert better". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.

★ 6
bg-szy
bg-szy/TOP-SKILLS

revnu-growth-context

Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents/revnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says "set up our marketing context", "who is our ideal customer", "write our ICP", "describe the product for marketing", "positioning doc", "what's our brand voice", "remember this about our customers", "log what we tried", "what have we learned from marketing", "we changed pricing, update the context", "update our growth notes", "summarize the business for the agent", "import my product-marketing.md", "start a growth doc", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.

★ 6
bg-szy
bg-szy/TOP-SKILLS

revnu-get-listed

Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: "best X" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says "get us listed", "which directories should we submit to", "how do we get into best-of lists", "why does ChatGPT recommend competitors and not us", "get mentioned in AI answers", "submit to awesome lists", "get on G2", "where are our competitors listed", "pitch listicle authors", "find backlink opportunities", "launch directories", "get into roundups", "Product Hunt alternatives", "where should we be listed", "get cited by Perplexity". Never submits, pays or posts without a yes. Works without a Revnu account.

★ 6
bg-szy
bg-szy/TOP-SKILLS

revnu-ai-readiness-audit

Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks "is my site ready for AI search", "audit my site for AI answers", "AEO audit", "GEO audit", "why doesn't ChatGPT quote our pricing", "make our pages citable by AI", "do I need llms.txt", "does schema help with ChatGPT", "check our structured data", "is our content visible without JavaScript", "AI SEO audit", "optimize our homepage for AI answers", "LLM SEO check", "why does AI get our product wrong", "fix our site for AI Overviews". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.

★ 6
bg-szy
bg-szy/TOP-SKILLS

proxy-troubleshooting

Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.

★ 6