
Promote
Turn a pattern Claude already learned in MEMORY.md into a permanent CLAUDE.md or scoped .claude/rules/ instruction so it is enforced on every session.
Overview
Promote is an agent skill most often used in Build (also Operate, Ship) that graduates proven patterns from Claude auto-memory into CLAUDE.md or .claude/rules/ for permanent enforcement.
Install
npx skills add https://github.com/alirezarezvani/claude-skills --skill promoteWhat is this skill?
- Parses a pattern description and confirms the exact MEMORY.md entries before promoting
- Routes by scope: whole project → CLAUDE.md, topic/path → .claude/rules/<topic>.md
- Supports --target and --paths for scoped enforcement (e.g. src/api/**/*.ts)
- Searches project memory via encoded MEMORY_DIR and grep on MEMORY.md
- Asks one clarifying question when the behavior or file scope is vague
- 3-step workflow: understand pattern, find in MEMORY.md, determine target
Adoption & trust: 1.5k installs on skills.sh; 17.5k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You keep re-teaching Claude the same project habit because it lives only as a MEMORY.md note, not as an enforced rule.
Who is it for?
Solo builders on Claude Code who have validated a convention in MEMORY.md and want it locked into project rules with optional path scope.
Skip if: One-off experiments you have not repeated, or teams that manage policy outside CLAUDE.md/.claude/rules and do not want repo-local agent instructions changed.
When should I use this skill?
A proven pattern in auto-memory should become permanent enforcement in CLAUDE.md or .claude/rules/.
What do I get? / Deliverables
The chosen pattern is written into CLAUDE.md or a scoped rules file so future sessions follow it by default instead of relying on memory grep.
- Updated CLAUDE.md or .claude/rules/<topic>.md with the promoted pattern
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Build because the deliverable is project agent configuration (CLAUDE.md and rules), which is core agent-tooling setup. Subphase agent-tooling fits graduating auto-memory into enforced agent instructions and path-scoped rules.
Where it fits
After weeks of 'use pnpm not npm' showing up in memory, promote it to CLAUDE.md for the whole repo.
Promote API validation rules into .claude/rules/api.md with --paths src/api/**/*.ts.
Codify a repeated review checklist from MEMORY into rules/testing.md before the next release pass.
When on-call fixes keep resurfacing the same guardrail, promote it so new sessions do not regress.
How it compares
Use instead of manually copying MEMORY snippets into CLAUDE.md without confirming scope, target file, or path globs.
Common Questions / FAQ
Who is promote for?
Indie and solo developers using Claude Code who want durable, enforced coding and workflow rules derived from patterns Claude already stored in project memory.
When should I use promote?
Use it in Build when hardening agent-tooling after a convention sticks; in Ship when promoting review or testing habits into rules; in Operate when iterating on how the agent should behave in this repo—once the pattern is proven, not on first try.
Is promote safe to install?
It edits CLAUDE.md and .claude/rules and reads MEMORY.md via shell grep; review the Security Audits panel on this page and inspect diffs before merging rule changes.
SKILL.md
READMESKILL.md - Promote
# /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/ |