PluginBench
Skill
Pass
Audit score 90

promote

alirezarezvani/claude-skills

Graduate proven patterns from auto-memory to permanent project rules.

What is promote?

Moves a pattern from Claude's auto-memory (MEMORY.md) into the project's rule system (CLAUDE.md or .claude/rules/) where it becomes an enforced instruction. Use when a learned behavior should apply to all future sessions and contributors.

  • Search and extract patterns from MEMORY.md auto-memory
  • Distill descriptive notes into concise, imperative rules
  • Write rules to CLAUDE.md for global project scope or .claude/rules/ for file-type-specific scope
  • Support scoped rules with path patterns for targeted enforcement
  • Clean up promoted entries from auto-memory to free space
  • Recommend appropriate target (CLAUDE.md vs rules/) based on pattern scope

How to install promote

npx skills add https://github.com/alirezarezvani/claude-skills --skill promote
Prerequisites
  • MEMORY.md auto-memory file in the project
  • CLAUDE.md or .claude/rules/ directory structure in place
  • User runs /si:promote command or requests pattern promotion
Claude Code
Cursor
Windsurf
Cline

How to use promote

  1. 1.Run /si:promote <pattern description> to initiate promotion
  2. 2.Clarify the pattern scope if the description is vague
  3. 3.Confirm the matching entries found in MEMORY.md
  4. 4.Accept the recommended target (CLAUDE.md or .claude/rules/) or specify --target manually
  5. 5.Review the distilled rule in imperative format before writing
  6. 6.Confirm removal of the original entry from MEMORY.md
  7. 7.Verify the promotion succeeded and memory space was freed

Use cases

Good for
  • Promote a package manager preference (e.g., pnpm) from a one-time note to a permanent build rule
  • Graduate API validation patterns learned through corrections into a scoped rules file
  • Move architecture decisions that appeared multiple times in memory into CLAUDE.md
  • Enforce team conventions discovered during development as project-wide instructions
  • Convert debugging insights into permanent gotchas rules for specific file types
Who it's for
  • Development teams using Claude Code or Cursor with .claude/ project config
  • Projects with MEMORY.md auto-memory enabled seeking to formalize learned patterns
  • Teams wanting to enforce conventions across sessions and contributors
  • Projects using .claude/rules/ for scoped, file-type-specific instructions

promote FAQ

When should I promote a pattern vs. leave it in auto-memory?

Promote when a pattern appeared 3+ times, you corrected Claude about it multiple times, it's a project convention others should know, or it prevents recurring mistakes. Don't promote one-time debugging notes, session-specific context, or patterns likely to change soon.

What's the difference between CLAUDE.md and .claude/rules/?

Use CLAUDE.md for global project rules (build commands, architecture, team conventions). Use .claude/rules/ for file-type-specific patterns (API design, testing conventions, framework gotchas). Keep CLAUDE.md under 200 lines and overflow to rules/.

How do I scope a rule to specific file paths?

Use the --paths flag or add a YAML frontmatter block to the rule file with paths patterns, e.g., `paths: ["src/api/**/*.ts", "tests/api/**/*"]`. This ensures the rule applies only to matching files.

Can I promote patterns to my global ~/.claude/CLAUDE.md?

Yes, use --target ~/.claude/CLAUDE.md for patterns that apply across all your projects, such as preferred error handling styles or coding conventions you want everywhere.

What happens to the original entry in MEMORY.md?

After promotion, the original entry is removed from MEMORY.md to free space for new learnings. You confirm removal before it happens.

Full instructions (SKILL.md)

Source of truth, from alirezarezvani/claude-skills.


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

# 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 scopeTargetExample
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):

## 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
---
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:

# 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 forUse .claude/rules/ for
Global project rulesFile-type-specific patterns
Build commandsTesting conventions
Architecture decisionsAPI design rules
Team conventionsFramework-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

Related skills

More from alirezarezvani/claude-skills and the wider catalog.

QMqms-audit-expert logo

qms-audit-expert

alirezarezvani/claude-skills

ISO 13485 internal audit expertise for medical device QMS. Covers audit planning, execution, nonconformity classification, and CAPA verification. Use when planning internal audits, executing audits, classifying findings, preparing for external audits, or managing an audit program.

726 installs
QUquality-documentation-manager logo

quality-documentation-manager

alirezarezvani/claude-skills

Document control system management for medical device QMS. Covers document numbering, version control, change management, and 21 CFR Part 11 compliance. Use when working on document control procedures, change control workflows, document numbering, version management, electronic signature compliance, or regulatory documentation review.

757 installs
QUquality-manager-qmr logo

quality-manager-qmr

alirezarezvani/claude-skills

Senior Quality Manager Responsible Person (QMR) for HealthTech and MedTech companies. Provides quality system governance, management review leadership, regulatory compliance oversight, and quality performance monitoring per ISO 13485 Clause 5.5.2. Use when leading management reviews, setting quality policy and objectives, monitoring quality KPIs and cost of quality, or exercising QMR governance and regulatory oversight responsibilities.

729 installs
QUquality-manager-qms-iso13485 logo

quality-manager-qms-iso13485

alirezarezvani/claude-skills

ISO 13485 Quality Management System implementation and maintenance for medical device organizations. Provides QMS design, documentation control, internal auditing, CAPA management, and certification support. Use when working with medical device quality systems, preparing for ISO 13485 audits, managing regulatory compliance documentation, setting up corrective actions, or building audit preparation programs. Useful for quality management, audit preparation, regulatory compliance, medical device documentation, and corrective action workflows.

748 installs
RAra-qm-skills logo

ra-qm-skills

alirezarezvani/claude-skills

Router to 15 compliance & quality-management skills for HealthTech/MedTech organizations.

1.6k installs
REred-team logo

red-team

alirezarezvani/claude-skills

Use when planning or executing authorized red team engagements, attack path analysis, or offensive security simulations. Covers MITRE ATT&CK kill-chain planning, technique scoring, choke point identification, OPSEC risk assessment, and crown jewel targeting.

643 installs