staged-content-refinement

Consolidate and refine extracted skills and docs from multiple projects into unified, project-agnostic patterns. Use when staging folder has content from multiple projects ready for consolidation. Triggers on "refine staged content", "consolidate staged skills", "process staging", "merge extracted patterns".

7 stars

Best use case

staged-content-refinement is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Consolidate and refine extracted skills and docs from multiple projects into unified, project-agnostic patterns. Use when staging folder has content from multiple projects ready for consolidation. Triggers on "refine staged content", "consolidate staged skills", "process staging", "merge extracted patterns".

Teams using staged-content-refinement should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/refinement/SKILL.md --create-dirs "https://raw.githubusercontent.com/wpank/ai/main/skills/refinement/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/refinement/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How staged-content-refinement Compares

Feature / Agentstaged-content-refinementStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Consolidate and refine extracted skills and docs from multiple projects into unified, project-agnostic patterns. Use when staging folder has content from multiple projects ready for consolidation. Triggers on "refine staged content", "consolidate staged skills", "process staging", "merge extracted patterns".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Staged Content Refinement

Process extracted skills and docs from multiple projects into consolidated, project-agnostic patterns.


## Installation

### OpenClaw / Moltbot / Clawbot

```bash
npx clawhub@latest install refinement
```


---

## Before Starting

1. Verify staging has content from multiple projects:
   - `ai/staging/skills/` — Extracted skills
   - `ai/staging/docs/` — Extracted methodology docs

2. Load quality criteria: [`../extraction/references/skill-quality-criteria.md`](../extraction/references/skill-quality-criteria.md)

---

## Refinement Process

### Phase 1: Inventory

Scan all staged content and catalog what exists.

**For skills:**
```
ai/staging/skills/
├── [project-a]-[category]/
├── [project-b]-[category]/
└── ...
```

**For docs:**
```
ai/staging/docs/
├── [project-a]-summary.md
├── [project-a]-design-system.md
├── [project-b]-summary.md
└── ...
```

**Create inventory:**

| Source Project | Type | Content | Common Patterns? |
|----------------|------|---------|------------------|
| project-a | skill | design-system | Yes - colors, typography |
| project-b | skill | design-system | Yes - similar token structure |
| project-a | doc | summary | Methodology insights |

---

### Phase 2: Pattern Analysis

Identify patterns that appear across multiple projects.

**Look for:**

1. **Design system patterns** (highest priority)
   - Common token structures
   - Similar aesthetic approaches
   - Shared color/typography patterns

2. **Architecture patterns**
   - Similar folder structures
   - Common component organization
   - Shared data flow patterns

3. **Workflow patterns**
   - Common Makefile targets
   - Similar CI/CD approaches
   - Shared dev setup patterns

4. **Methodology insights**
   - Decision-making patterns
   - Trade-offs that appear repeatedly
   - Common anti-patterns discovered

**Questions to answer:**

- What patterns appear in 2+ projects?
- What's project-specific vs generalizable?
- What methodology insights can update the main docs?

---

### Phase 2.5: Conflict Detection

Before consolidating, check for conflicts with existing skills.

**Scan existing skills:**
```bash
ls ai/skills/*/
```

**For each staged skill, check:**

| Check | How |
|-------|-----|
| Duplicate name | Does a skill with same name exist in `ai/skills/`? |
| Similar purpose | Does description overlap with existing skill? |
| Overlapping triggers | Do "When to Use" triggers conflict? |

**Conflict resolution:**

| Conflict Type | Resolution |
|---------------|------------|
| Exact duplicate | Skip staged skill, keep existing |
| Similar but better | Update existing skill with new insights |
| Similar but different | Keep both, clarify distinct purposes |
| No conflict | Proceed with promotion |

**Run overlap check:**
```
/check-overlaps
```

**Document conflicts:**
- Note which existing skills overlap
- Decide: merge into existing vs create new
- Update existing skills if merging

---

### Phase 3: Consolidation

Merge similar patterns into unified, project-agnostic skills.

**For each pattern group:**

1. **Identify the core** — What's common across all instances?
2. **Strip project specifics** — Remove project names, specific values
3. **Generalize** — Make it applicable to any project
4. **Enhance** — Add insights learned from seeing multiple implementations

**Example consolidation:**

```
Staged:
├── project-a-design-system/  (retro-futuristic tokens)
├── project-b-design-system/  (video game UI tokens)
└── project-c-design-system/  (minimal dark tokens)

Consolidated:
└── design-system-patterns/   (how to build distinctive design systems)
    - Token structure patterns
    - Aesthetic direction documentation
    - Common anti-patterns across projects
```

**Consolidation rules:**

| Scenario | Action |
|----------|--------|
| Same pattern, different values | Create pattern skill with examples |
| Same pattern, same approach | Merge into single skill |
| Unique pattern, high value | Keep as standalone skill |
| Unique pattern, low value | Archive or discard |

---

### Phase 4: Methodology Updates

Extract insights to update the main methodology docs.

**Review staged docs for:**

1. **New patterns** not in current methodology
2. **Refinements** to existing approaches
3. **Anti-patterns** discovered across projects
4. **Decision rationale** worth capturing

**Update locations:**

| Insight Type | Update Location |
|--------------|-----------------|
| Design philosophy | `docs/METHODOLOGY.md` → Design & Visual Philosophy |
| Tech patterns | `docs/TECH-STACK.md` → Patterns to Extract |
| Workflow improvements | `docs/WORKFLOW.md` |
| Architecture patterns | `docs/ARCHITECTURE.md` |

---

### Phase 5: Promotion

Move refined skills to active locations.

**Skill promotion:**
```bash
# From staging to active
mv ai/staging/skills/[refined-skill]/ ai/skills/[refined-skill]/
```

**Doc updates:**
- Update main docs with methodology insights
- Archive or delete processed staging content

**Post-promotion:**
- Verify skills have proper descriptions
- Test skill activation with sample prompts
- Clean up staging folder

---

### Phase 6: Testing

After promotion, verify skills work correctly.

**Activation testing:**
For each promoted skill, test that it activates on expected triggers:

```
Test: "I need to [trigger from When to Use]"
Expected: Skill should be suggested/activated
```

**Quality verification:**
- [ ] Description triggers correctly
- [ ] Code examples are valid and runnable
- [ ] NEVER Do section is actionable
- [ ] Related skills are linked correctly

**Rollback if issues:**
```bash
# If skill has problems, move back to staging
mv ai/skills/[category]/[skill]/ ai/staging/skills/
```

**Document test results:**
- Note any activation issues
- Record false positives (activates when shouldn't)
- Record false negatives (doesn't activate when should)

---

## Error Handling

| Issue | Resolution |
|-------|------------|
| Staging empty | Nothing to refine; run extraction first |
| No common patterns | Promote as individual skills if quality passes |
| Merge conflict | Document conflict, keep both versions temporarily |
| Quality check fails | Return to Phase 3 to improve skill |
| Activation test fails | Revise description keywords |

---

## Output Locations

**Refined skills go to:**
```
ai/skills/           # Cursor-specific skills
ai/skills/           # Claude Code skills (if applicable)
```

**Methodology updates go to:**
```
docs/
├── METHODOLOGY.md        # Philosophy and approach
├── TECH-STACK.md         # Technology patterns
├── ARCHITECTURE.md       # Skill/agent architecture
└── WORKFLOW.md           # Processes
```

**Staging cleanup:**
```
ai/staging/skills/        # Clear after processing
ai/staging/docs/          # Clear after processing
ai/archive/               # (optional) Keep for reference
```

---

## Consolidation Examples

### Design Systems

**Before (3 project-specific skills):**
- `project-a-design-system` — Retro-futuristic tokens
- `project-b-design-system` — Video game UI tokens  
- `project-c-design-system` — Cyberpunk terminal tokens

**After (1 consolidated skill):**
- `distinctive-design-systems` — How to create design systems with personality
  - Token structure patterns
  - Aesthetic documentation approach
  - Anti-patterns (generic bootstrap, "clean" without personality)
  - Examples from different aesthetic directions

### Architecture

**Before (multiple docs):**
- `project-a-architecture.md`
- `project-b-architecture.md`

**After:**
- Update `docs/ARCHITECTURE.md` with common patterns
- Create skill only if patterns are unique enough

---

## NEVER Do

- **NEVER keep project-specific details** in consolidated skills
- **NEVER create redundant skills** — Merge similar patterns
- **NEVER skip methodology updates** — Insights should flow back to docs
- **NEVER promote low-quality skills** — Must pass quality criteria
- **NEVER leave staging cluttered** — Clean up after processing

---

## Quality Check

Before finishing refinement:

- [ ] All staged content reviewed?
- [ ] Conflict detection completed (Phase 2.5)?
- [ ] Common patterns identified and consolidated?
- [ ] Consolidated skills are project-agnostic?
- [ ] Methodology docs updated with insights?
- [ ] Refined skills promoted to active locations?
- [ ] Activation testing completed (Phase 6)?
- [ ] Staging folder cleaned up?

---

## Related Skills

- **Agent:** [`ai/agents/refinement/`](../../agents/refinement/) — Autonomous refinement workflow
- **Command:** [`/refine-staged`](../../commands/refinement/refine-staged.md) — Quick refinement command
- **Command:** [`/promote-skill`](../../commands/refinement/promote-skill.md) — Single skill promotion
- **Previous step:** [`ai/skills/extraction/`](../extraction/) — Pattern extraction
- **Quality criteria:** [`../extraction/references/skill-quality-criteria.md`](../extraction/references/skill-quality-criteria.md)

Related Skills

Content Strategy

7
from wpank/ai

Plan content aligned with user personas and journey stages. Use when asked to "plan content," "create content strategy," "build editorial calendar," "map content to personas," "audit existing content," or when aligning marketing/docs content with user journeys defined in persona docs.

schema-markup

7
from wpank/ai

Add, fix, or optimize schema markup and structured data. Use when the user mentions schema markup, structured data, JSON-LD, rich snippets, schema.org, FAQ schema, product schema, review schema, or breadcrumb schema.

prompt-engineering

7
from wpank/ai

Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production. Use when optimizing prompts, improving LLM outputs, designing production prompt templates, or building AI-powered features.

professional-communication

7
from wpank/ai

Write effective professional messages for software teams. Use when drafting emails, Slack/Teams messages, meeting agendas, status updates, or translating technical concepts for non-technical audiences. Triggers on email, slack, teams, message, meeting agenda, status update, stakeholder communication, escalation, jargon translation.

persona-docs

7
from wpank/ai

Create persona documentation for a product or codebase. Use when asked to create persona docs, document target users, define user journeys, document onboarding flows, or when starting a new product and needing to define its audience. Persona docs should be the first documentation created for any product.

mermaid-diagrams

7
from wpank/ai

Create software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize, model, map out, or show the flow of a system.

game-changing-features

7
from wpank/ai

Find 10x product opportunities and high-leverage improvements. Use when the user wants strategic product thinking, mentions 10x, wants to find high-impact features, or asks what would make a product dramatically more valuable.

clear-writing

7
from wpank/ai

Write clear, concise prose for humans — documentation, READMEs, API docs, commit messages, error messages, UI text, reports, and explanations. Combines Strunk's rules for clearer prose with technical documentation patterns, structure templates, and review checklists.

brainstorming

7
from wpank/ai

Explore ideas before implementation through collaborative dialogue. Use before any creative work — creating features, building components, adding functionality, or modifying behavior. Turns ideas into fully formed designs and specs through structured conversation.

Article Illustrator

7
from wpank/ai

When the user wants to add illustrations to an article or blog post. Triggers on: "illustrate article", "add images to article", "generate illustrations", "article images", or requests to visually enhance written content. Analyzes article structure, identifies positions for visual aids, and generates illustrations using a Type x Style two-dimension approach.

subagent-driven-development

7
from wpank/ai

Execute implementation plans by dispatching a fresh subagent per task with two-stage review (spec compliance then code quality). Use when you have an implementation plan with mostly independent tasks and want high-quality, fast iteration within a single session.

skill-judge

7
from wpank/ai

Evaluate Agent Skill quality against official specifications. Use when reviewing SKILL.md files, auditing skill packages, improving skill design, or checking if a skill follows best practices. Provides 8-dimension scoring (120 points) with actionable improvements. Triggers on review skill, evaluate skill, audit skill, improve skill, skill quality, SKILL.md review.