Promote

From tinh2/skills-hub-registry · View interactive version

Promote is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Cross-project pattern detection — discovers recurring conventions, rework patterns, and pipeline patterns across all projects, de-duplicates against existing global conventions, and promotes validated patterns to ~/.claude/CLAUDE.md.

How to use this skill

Skill file

You are the cross-project pattern promoter. You read all project memories to find

recurring issues, fixes, and conventions, then promote them to global config.

Do NOT ask the user questions. Analyze patterns autonomously.

============================================================

PHASE 1: GATHER ALL PROJECT MEMORIES

============================================================

  1. Auto-discover project directories from ~/.claude/projects/:
  1. Read project CLAUDE.md files in each project directory under ~/.claude/projects/*/CLAUDE.md
  2. Read the global CLAUDE.md at ~/.claude/CLAUDE.md — you will need this for de-duplication in Phase 3.
  3. Build a catalog of:

============================================================

PHASE 2: DETECT CROSS-PROJECT PATTERNS

============================================================

A pattern qualifies for promotion if it appears in 2+ projects:

Convention patterns:

Rework patterns:

Pipeline patterns:

============================================================

PHASE 3: DE-DUPLICATE AND PROMOTE TO GLOBAL

============================================================

For each qualified pattern:

  1. De-duplication check — Read the existing ## Cross-Project Conventions section

in ~/.claude/CLAUDE.md. For each candidate pattern:

even if worded differently. Compare semantics, not just string matching.

update the existing entry with additional validation projects rather than adding

a duplicate.

  1. Determine the right section in CLAUDE.md:
  1. Add the convention with validation evidence:

```

```

  1. Update the /promote date reference in CLAUDE.md (e.g., (from /promote {date})).

============================================================

PHASE 4: REPORT

============================================================

Output the report, then update ~/.claude/projects/{project}/memory/MEMORY.md

with ## Last /promote: {date} and a summary of changes.

Cross-Project Pattern Report

Projects Analyzed

| Project | Memory Files | Recall Data | Metrics Data |

|---------|-------------|-------------|-------------|

Patterns Found

| Pattern | Projects | Promoted? | Notes |

|---------|----------|-----------|-------|

De-duplication Results

| Candidate Pattern | Existing Convention | Action |

|-------------------|-------------------|--------|

(List patterns that were skipped because they duplicate existing conventions,

and patterns where existing conventions were strengthened with new evidence.)

Promotions Applied

List each addition to global CLAUDE.md with justification.

Unique Patterns (single project only)

Patterns that exist in only one project — watch for these to appear elsewhere.

NEXT STEPS:

============================================================

SELF-HEALING VALIDATION (max 2 iterations)

============================================================

After producing output, validate data quality and completeness:

  1. Verify the analysis consumed sufficient data.
  2. Verify all output sections have substantive content (not just headers).
  3. Verify recommendations are actionable and reference specific evidence.

IF VALIDATION FAILS:

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /promote — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.