Guide · Agent skill
How to use the Promote Learnings to Rules agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The promote skill is an agent skill for Claude Code that takes a pattern Claude has already recorded in its auto-memory file (MEMORY.md) and rewrites it as a short, direct instruction in CLAUDE.md or a scoped file under .claude/rules/. It is meant for developers and maintainers who keep correcting the same project convention and want it enforced in future sessions. After this guide you will know what the skill does, how to install it, how to trigger it with a request, and what to check before accepting its edits.
Quick start
- 1Confirm your requirements. Make sure Claude Code has auto-memory enabled, that you have a Bash-capable shell, and that you can write to the project's CLAUDE.md or .claude/rules/ directory.
- 2Download and unzip the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ for all projects, or into the project's .claude/skills/ folder for one project.
- 3Find a pattern worth promoting. Pick a convention you have corrected more than once, such as a package manager or test style, that already appears in MEMORY.md.
- 4Run the promote request. Run /si:promote with a short description of the pattern, or ask Claude to make the learned behavior permanent.
- 5Confirm the matching memory entries. Review the grep results the skill shows and confirm they match the behavior you mean.
- 6Review the target and rule. Check the chosen file (CLAUDE.md or a .claude/rules/ file), the distilled imperative rule, and any paths frontmatter.
- 7Confirm removal from memory. Approve removal of the original MEMORY.md entry so the note is not duplicated and space is freed for new learnings.
What is an agent skill and what does promote do?
An agent skill is a folder containing a SKILL.md file that tells an AI agent how to perform a specific task. When a skill matches a request, the agent follows its workflow.
Claude Code can save notes to its auto-memory (MEMORY.md) as it learns how a project works. Those notes are descriptive and stay in the background. The promote skill moves a pattern proven in those notes into the project's rule system, where it becomes an enforced instruction. It searches memory for matching entries, suggests where the rule belongs, rewrites it in imperative form, and removes the original note after you confirm.
Install the promote skill
Download the ZIP from the skill's page on this directory and unzip it into one of the following locations. Use ~/.claude/skills/ to make the skill available across your projects, or a project's .claude/skills/ folder to keep it for that project only.
You can also upload the skill in the Claude apps under Settings → Capabilities → Skills.
- Personal install: unzip into ~/.claude/skills/
- Project install: unzip into the project's .claude/skills/ folder
- Claude apps: Settings → Capabilities → Skills, then upload
Check the requirements
The skill needs Claude Code with auto-memory enabled, so that MEMORY.md exists under ~/.claude/projects/. It also needs a Bash-capable shell because it uses grep to search memory, and write access to the project's CLAUDE.md or .claude/rules/ directory.
- Claude Code with auto-memory enabled (MEMORY.md under ~/.claude/projects/)
- A Bash-capable shell for the grep search commands
- Write access to the project's CLAUDE.md or .claude/rules/ directory
Trigger the skill with a command or a natural request
You can run the command directly, for example /si:promote <pattern description>. You can also ask in plain language to make a learned behavior permanent. The skill is designed to activate when you run /si:promote or ask to make a learned behavior permanent.
You can add flags to choose a target. --target claude.md writes to CLAUDE.md, --target rules/testing.md writes to a scoped rule file, and --paths sets the file patterns a scoped rule applies to. Without a target, the skill recommends one based on scope.
- Auto-detect the target: /si:promote <pattern>
- Write to CLAUDE.md: /si:promote <pattern> --target claude.md
- Write to a scoped rule: /si:promote <pattern> --target rules/testing.md
- Scope to paths: /si:promote <pattern> --target rules/api.md --paths "src/api/**/*.ts"
/si:promote <pattern> --target rules/api.md --paths "src/api/**/*.ts"Work through the promotion workflow
The skill asks one clarifying question if your description is vague, then searches MEMORY.md for related entries and shows the matches so you can confirm they are what you mean. It then picks a target by scope: the whole project goes to ./CLAUDE.md, file-type patterns go to .claude/rules/<topic>.md, and personal rules across all projects go to ~/.claude/CLAUDE.md.
The skill turns the descriptive note into an imperative rule with the command included. For example, a note saying npm install failed in a pnpm workspace becomes a single line: use pnpm, not npm, with pnpm install. Before it removes anything, it shows the lines to be removed and asks you to confirm.
- Parse the pattern and ask one question if it is vague
- Search MEMORY.md with grep and confirm the matches
- Choose a target based on scope
- Distill the note into one imperative line that includes the command
- Write the rule, then remove the original entry after you confirm
grep -ni "<keywords>" "$MEMORY_DIR/MEMORY.md"Review what the skill writes
Because the skill edits project files, read each change before you accept it. The skill warns that if CLAUDE.md would exceed 200 lines, you should move overflow into .claude/rules/. Scoped rule files start with YAML frontmatter that lists paths.
After promoting, the skill reports the target, the distilled rule, the removed MEMORY.md line, and how many lines remain in MEMORY.md out of 200.
- Confirm the target file and section are correct
- Keep CLAUDE.md under 200 lines and move file-specific rules into .claude/rules/
- Check that scoped rules have the right paths in their frontmatter
---
paths:
- "src/api/**/*.ts"
- "tests/api/**/*"
---Safety notes: scripts and network
This skill runs scripts, because it executes grep commands in a shell and edits files in your project and in MEMORY.md. It does not use the network, according to the listing. Since it writes to rule files that Claude follows in every future session, review its edits in version control before you commit them, especially in shared CLAUDE.md files.
Do not promote patterns that may change soon, such as during a migration, because a stale rule can mislead the agent. Also avoid promoting one-off debugging notes or temporary session context, which the skill itself says should stay in memory.
- The skill runs shell commands (grep) and edits files
- No network use is listed for this skill
- Review edits in version control before committing shared rule files
Tips for good promotions
Promote a pattern when it has appeared three or more times in memory, when you have corrected Claude about it more than once, or when it prevents a recurring mistake. Include the concrete command rather than only the concept, and keep one rule per line.
Review promoted rules periodically and remove any that are no longer relevant.
- Promote patterns seen 3+ times or corrected more than once
- Include the exact command, for example pnpm install
- Keep one rule per line
- Put build commands and team conventions in CLAUDE.md; put testing and API rules in .claude/rules/
What people use it for
- Recording a package manager rule, such as using pnpm install instead of npm in a pnpm workspace, in the project's CLAUDE.md.
- Writing test conventions into .claude/rules/testing.md so Claude follows them when working on test files.
- Adding API validation rules to a scoped rule file limited to src/api/**/*.ts with --paths.
- Moving file-specific rules out of a long CLAUDE.md into .claude/rules/ to keep the main file concise.
- Adding a personal preference, such as explicit error handling, to ~/.claude/CLAUDE.md so it applies across projects.
Frequently asked questions
How do I install the promote agent skill?
Download the ZIP from this skill's page and unzip it into ~/.claude/skills/ for all your projects, or into a project's .claude/skills/ folder for one project. You can also upload it in the Claude apps under Settings → Capabilities → Skills.
What does the promote skill require?
It requires Claude Code with auto-memory enabled, so MEMORY.md exists under ~/.claude/projects/. It also needs a Bash-capable shell for its grep search and write access to the project's CLAUDE.md or .claude/rules/ directory.
Is the promote skill free to use?
The skill is listed under the MIT licence. The source page does not state pricing for Claude Code or the Claude apps, so check those products directly for their terms.
Does the promote skill use the network?
According to the listing, it does not use the network. It does run scripts, specifically grep commands in a shell, and it edits project files and MEMORY.md.
What is the difference between CLAUDE.md and .claude/rules/?
CLAUDE.md is for global project rules, build commands, architecture decisions and team conventions. .claude/rules/ is for file-type-specific patterns such as testing conventions, API design rules and framework gotchas, and scoped files can list paths in their frontmatter.
Why won't the skill promote my one-off debugging note?
The skill says one-time debugging notes and session-specific context should stay in auto-memory, because promoting them clutters your rules. It also advises against promoting patterns that may change soon, such as during a migration.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you keep correcting Claude on the same project convention and want it written into CLAUDE.md or a scoped rule file, especially if you maintain a shared project and want concise rules. Skip it if you are new to Claude Code's memory and rules files, or if the pattern is temporary, since you will need to review every edit it makes to project files.
Download the skill