Skip to main content
skill Claude Code

promote — Claude Code skill: what it does, how to install

Graduates proven patterns from auto-memory into CLAUDE.md or .claude/rules/. Useful when recurring project instructions need strict enforcement.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add alirezarezvani/claude-skills
/plugin install self-improving-agent@claude-code-skills
Open on GitHub

What promote does

This skill searches MEMORY.md for patterns you repeated during development and turns them into enforced project rules. Instead of keeping descriptive notes about what went wrong, it distills entries into concise, imperative instructions with exact commands. For example, a note about dependency issues becomes a single line requiring pnpm install.

Target location depends on scope. Project-wide rules go directly into ./CLAUDE.md, global conventions move to ~/.claude/CLAUDE.md, and specific paths route to .claude/rules/ with frontmatter glob filters. When CLAUDE.md approaches its 200-line ceiling, the skill suggests splitting directives into .claude/rules/. Once confirmed, it deletes the source entry from memory to prevent bloat.

Install this if you find yourself correcting Claude Code on the same architectural decisions. Single-file projects or short experiments will not benefit from automated rule graduation.

What it helps with

  • convert recurring notes in MEMORY.md into permanent rules in CLAUDE.md
  • scope directory-specific guidelines into .claude/rules/ with file paths
  • clean promoted entries from MEMORY.md to stay within line limits
  • distill descriptive notes into concise imperative instructions

Example prompts for the agent

  • /si:promote Use pnpm instead of npm
  • /si:promote API validation rules --target rules/api.md --paths "src/api/**/*.ts"
  • /si:promote testing guidelines --target rules/testing.md

How to install promote

1Plugin marketplace

/plugin marketplace add alirezarezvani/claude-skills
/plugin install self-improving-agent@claude-code-skills

This installs the whole self-improving-agent plugin with all its skills

2Skills CLI (Vercel)

npx skills add alirezarezvani/claude-skills --skill promote -a claude-code

3Manually: put the files in place

~/.claude/skills/promote/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/promote/

From the same set349

The whole set →
engineering-skills Alireza Rezvani An engineering skill index for Claude Code that helps you select one specialist SKILL.md for the task at hand. It covers architecture, testing, DevOps, and data work. Claude Code 2,387installs finance-skills Alireza Rezvani Routes ambiguous finance prompts to the right bundled skill: financial-analyst, saas-metrics-coach, or month-end-close. Claude Code 2,312installs marketing-skills Alireza Rezvani A directory and router for marketing skills in Claude Code. It picks the right specialist skill for SEO, content, CRO, channels, and related tasks. Claude Code 2,264installs business-growth-skills Alireza Rezvani Routes growth and revenue prompts to the right specialized skill across customer success, sales engineering, RevOps, and proposals in Claude Code. Claude Code 2,189installs engineering-advanced-skills Alireza Rezvani An index of 37 engineering skills for architecture, automation, reliability, and platform work. Use it when a project needs task-specific engineering workflows. Claude Code 2,019installs product-skills Alireza Rezvani Product work orchestrator for Claude Code. Routes queries across 16 domain lanes and validates discovery trees with deterministic scripts. Claude Code 1,994installs pm-skills Alireza Rezvani Routes project-delivery requests across 8 PM sub-skills for Jira, Confluence, sprints, reporting, and team communication. Useful for controlled delivery work. Claude Code 1,975installs senior-backend Alireza Rezvani Scaffolds backend APIs, detects database bottlenecks, and runs load tests. Useful when designing Express routes, optimizing PostgreSQL, or preparing for production. Claude Code 1,674installs

Similar

superself fxylabs Manages project state via the self CLI: reads context, tracks work units, reports commits, and records decisions in an event log. Useful for Superself projects. Claude Code CX Codex Cursor 1,400installs prompt-optimizer official github Converts rough drafts, tasks, and half-formed ideas into finished, copy-pasteable chat prompts without placeholder variables. GitHub Copilot 467installs find-skills vercel-labs Discovers and installs agent skills from skills.sh directly inside your coding assistant. Handy when you need domain-specific workflows for a project. Claude Code CX Codex Cursor +1 4,000,000installs grill-me Matt Pocock grill-me interviews you about a plan or design to expose gaps and sharpen decisions. Use it before implementation starts. Claude Code 1,424,476installs grill-with-docs Matt Pocock This skill interviews you about a plan or design and creates ADRs and a glossary along the way. Use it when decisions need sharper definition. Claude Code 1,219,756installs handoff Matt Pocock Creates a handoff document from the current conversation so another agent can continue the work. Use it when a task moves to a new session or agent. Claude Code 1,038,491installs grilling Matt Pocock Stress-test a plan, decision, or idea through structured rounds of questions. Use it when you need to expose assumptions before acting. Claude Code 979,543installs teach Matt Pocock Turns the current directory into a learning workspace and keeps progress across sessions. Use it when learning needs to support a concrete goal in your project. Claude Code 862,247installs

Questions about promote

How do I install promote in Claude Code?

Run npx skills add alirezarezvani/claude-skills --skill promote -a claude-code in your terminal, or install it with /plugin marketplace add alirezarezvani/claude-skills inside Claude Code.

What does the promote skill do?

It finds verified learnings in MEMORY.md, condenses them into imperative instructions, writes them to CLAUDE.md or .claude/rules/, and cleans the old entry from auto-memory.

When does it write to .claude/rules/ instead of CLAUDE.md?

It targets .claude/rules/ when guidelines apply to specific paths or file patterns, or when CLAUDE.md exceeds its 200-line limit.

Source text

SKILL.md · MIT
---
name: "promote"
description: "Graduate a proven pattern from auto-memory (MEMORY.md) to CLAUDE.md or .claude/rules/ for permanent enforcement. Use when the user runs /si:promote or asks to make a learned behavior permanent."
---

# /si:promote — Graduate Learnings to Rules

Moves a proven pattern from Claude's auto-memory into the project's rule system, where it becomes an enforced instruction rather than a background note.

## Usage

```
/si:promote <pattern description>                    # Auto-detect best target
/si:promote <pattern> --target claude.md             # Promote to CLAUDE.md
/si:promote <pattern> --target rules/testing.md      # Promote to scoped rule
/si:promote <pattern> --target rules/api.md --paths "src/api/**/*.ts"  # Scoped with paths
```

## Workflow

### Step 1: Understand the pattern

Parse the user's description. If vague, ask one clarifying question:
- "What specific behavior should Claude follow?"
- "Does this apply to all files or specific paths?"

### Step 2: Find the pattern in auto-memory

```bash
# Search MEMORY.md for related entries
MEMORY_DIR="$HOME/.claude/projects/$(pwd | sed 's|/|%2F|g; s|%2F|/|; s|^/||')/memory"
grep -ni "<keywords>" "$MEMORY_DIR/MEMORY.md"
```

Show the matching entries and confirm they're what the user means.

### Step 3: Determine the right target

| Pattern scope | Target | Example |
|---|---|---|
| Applies to entire project | `./CLAUDE.md` | "Use pnpm, not npm" |
| Applies to specific file types | `.claude/rules/<topic>.md` | "API handlers need validation" |
| Applies to all your projects | `~/.claude/CLAUDE.md` | "Prefer explicit error handling" |

If the user didn't specify a target, recommend one based on scope.

### Step 4: Distill into a concise rule

Transform the learning from auto-memory's note format into CLAUDE.md's instruction format:

**Before** (MEMORY.md — descriptive):
> The project uses pnpm workspaces. When I tried npm install it failed. The lock file is pnpm-lock.yaml. Must use pnpm install for dependencies.

**After** (CLAUDE.md — prescriptive):
```markdown
## Build & Dependencies
- Package manager: pnpm (not npm). Use `pnpm install`.
```

**Rules for distillation:**
- One line per rule when possible
- Imperative voice ("Use X", "Always Y", "Never Z")
- Include the command or example, not just the concept
- No backstory — just the instruction

### Step 5: Write to target

**For CLAUDE.md:**
1. Read existing CLAUDE.md
2. Find the appropriate section (or create one)
3. Append the new rule under the right heading
4. If file would exceed 200 lines, suggest using `.claude/rules/` instead

**For `.claude/rules/`:**
1. Create the file if it doesn't exist
2. Add YAML frontmatter with `paths` if scoped
3. Write the rule content

```markdown
---
paths:
  - "src/api/**/*.ts"
  - "tests/api/**/*"
---

# API Development Rules

- All endpoints must validate input with Zod schemas
- Use `ApiError` class for error responses (not raw Error)
- Include OpenAPI JSDoc comments on handler functions
```

### Step 6: Clean up auto-memory

After promoting, remove or mark the original entry in MEMORY.md:

```bash
# Show what will be removed
grep -n "<pattern>" "$MEMORY_DIR/MEMORY.md"
```

Ask the user to confirm removal. Then edit MEMORY.md to remove the promoted entry. This frees space for new learnings.

### Step 7: Confirm

```
✅ Promoted to {{target}}

Rule: "{{distilled rule}}"
Source: MEMORY.md line {{n}} (removed)
MEMORY.md: {{lines}}/200 lines remaining

The pattern is now an enforced instruction. Claude will follow it in all future sessions.
```

## Promotion Decision Guide

### Promote when:
- Pattern appeared 3+ times in auto-memory
- You corrected Claude about it more than once
- It's a project convention that any contributor should know
- It prevents a recurring mistake

### Don't promote when:
- It's a one-time debugging note (leave in auto-memory)
- It's session-specific context (session memory handles this)
- It might change soon (e.g., during a migration)
- It's already covered by existing rules

### CLAUDE.md vs .claude/rules/

| Use CLAUDE.md for | Use .claude/rules/ for |
|---|---|
| Global project rules | File-type-specific patterns |
| Build commands | Testing conventions |
| Architecture decisions | API design rules |
| Team conventions | Framework-specific gotchas |

## Tips

- Keep CLAUDE.md under 200 lines — use rules/ for overflow
- One rule per line is easier to maintain than paragraphs
- Include the concrete command, not just the concept
- Review promoted rules quarterly — remove what's no longer relevant

© Alireza Rezvani · MIT · alirezarezvani/claude-skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor