Remember
Persist new guidelines, best practices, or architectural decisions into the
repository's knowledge base so they are available in future AI sessions.
Arguments
thing to remember (required): A guideline, convention, or decision to
persist. Natural language input describing what should be remembered.
Usage Examples
/remember always use the --frozen-lockfile flag in CI
/remember the auth module was refactored to use middleware in PR #342
/remember integration tests must hit a real database, never use mocks
Process
1. Intent Distillation
- Identify the core principle, rule, or technical intent from the user's input
- Rephrase concisely using precise software development terminology
2. Identify Target File
Determine which file should contain this knowledge. Repositories follow a
layered structure, preferring tool-agnostic paths when they exist:
| Intent type |
Preferred target |
Fallback |
| Project-wide convention or standard |
AGENTS.md |
CLAUDE.md |
| Domain-specific best practice (testing, components, API design, etc.) |
rules/ or docs/conventions/ |
See resolution rules |
| Change to an automated workflow or skill |
.agents/skills/ |
.claude/skills/ |
| Agent behavior guideline |
.agents/agents/ |
.claude/agents/ |
| Claude-specific configuration (MCP, hooks, permissions) |
CLAUDE.md |
— |
Resolution rules:
- Check whether
rules/ or docs/conventions/ exists
- If both exist, prefer
rules/
- If only one exists, write there
- If only
docs/conventions/ exists, ask the user whether they want to
create a symlink from rules/ to docs/conventions/ so both paths
resolve to the same location. If they confirm, create the symlink before
writing.
- If neither exists, create
rules/ and write there
- For other target types:
- For
.agents/skills/ or .agents/agents/: Use the .claude/ equivalent
if the .agents/ directory does not exist
- For
AGENTS.md: Use CLAUDE.md if AGENTS.md does not exist
- Only write to
CLAUDE.md or .claude/ directly when the information is
Claude-specific or no tool-agnostic target exists
3. Conflict Analysis
- Thoroughly scan the identified file(s) for any existing content that
contradicts the new intent
- Additionally, scan the corresponding file in the other layer (e.g., if writing
to
AGENTS.md, also scan CLAUDE.md and vice versa). If the other layer
contains conflicting or duplicated content, resolve it by replacing that
content in CLAUDE.md with a reference to AGENTS.md (e.g.,
"See AGENTS.md for project conventions.")
- A contradiction is any statement that would be invalidated or made obsolete by
the new guideline
If a conflict is found:
- Halt execution immediately
- Quote the exact conflicting statement(s) from the document
- Inform the user about the contradiction and ask for clarification on how to
proceed
- Do NOT proceed with any updates until the conflict is resolved
If no conflicts are found:
- Identify the most logical section within the file to add the new information
- If no suitable section exists, create a new one with an appropriate heading
- Refactor existing content as needed to keep the document coherent and
well-structured
4. Write the Update
When writing the update:
- Only include production-ready patterns and examples that can be safely copied.
Use precise, declarative language. Do not include anti-patterns or cautionary
examples.
5. Skill Discovery and Synchronization
After successfully updating documentation, discover which skills may need
updates by scanning skill files in .agents/skills/*/SKILL.md and
.claude/skills/*/SKILL.md (whichever exist). When reading skill files, resolve
symlinks to access the actual content rather than treating symlinks as empty or
opaque files.
Discovery criteria — a skill is affected if it contains:
- Explicit references to the updated documentation file
- Content that covers the same topic or concept as the update
- Inline templates, code examples, or patterns related to the updated guideline
- Instructions or rules that may now be outdated or contradicted by the new
documentation
If no skills are affected, skip this step.
For each affected skill, determine whether it is local or shared:
A skill is shared if it is a symlink pointing outside the current repo or
was installed by a package manager and has not been modified locally. A skill is
local if it was authored or edited in this repo. Symlinks between
.claude/skills/ and .agents/skills/ within the same repo are internal
bridges and do not affect this determination.
Local skills — edit directly:
- Update the skill's templates, examples, and instructions to align with the
new documentation
Shared skills — report and offer to update:
Report the affected shared skill and the specific inconsistency to the user
Ask: "Shared skill <skill-name> is affected. Add repo-specific additions?"
If the user confirms:
Resolve the original shared skill path (the symlink target or CLI cache
location where the shared skill was installed)
Determine which layer to use:
If .agents/skills/ directory exists:
Create or update .agents/skills/<skill-name>/SKILL.md with repo-specific
additions listed before the shared skill reference, so local rules take
priority:
---
name: <skill-name>
description: <same description as the shared skill>
allowed-tools: <same allowed-tools as the shared skill>
---
## Repo-specific additions
- <the new convention or guideline>
## Shared skill
Read and follow the shared skill at `<original-shared-skill-path>`.
Then ensure .claude/skills/<skill-name>/SKILL.md is a symlink to
.agents/skills/<skill-name>/SKILL.md:
- If it is already a symlink to the correct path, no action needed
- If it exists as a regular file, delete it and create the symlink
- If it does not exist, create the symlink
If .agents/skills/ directory does not exist:
Create or update .claude/skills/<skill-name>/SKILL.md directly with the
same structure (repo-specific additions before the shared skill reference).
If the user declines, log the inconsistency in the final confirmation but
take no action
6. Final Confirmation
Report all changes made:
- Documentation file(s) updated
- Skill file(s) updated (if any), with rationale explaining why each skill was
identified as affected
- Summary of what was added or modified in each file
Guidelines
- Always read target files before modifying them
- Prefer adding to an existing section over creating a new one
- Keep entries concise; one to two sentences per guideline is ideal
- If the user's input is ambiguous, ask for clarification before writing
- Do not duplicate information that already exists in the target file
- When creating skill files, create the
<skill-name>/ subdirectory if needed
but do NOT create .agents/ or .agents/skills/ directories — only use them
if they already exist
1---2name: remember3description: Persist guidelines, conventions, and architectural decisions into the repository's knowledge base. Use when told to remember something for future sessions.4---56# Remember78Persist new guidelines, best practices, or architectural decisions into the9repository's knowledge base so they are available in future AI sessions.1011## Arguments1213- `thing to remember` (required): A guideline, convention, or decision to14 persist. Natural language input describing what should be remembered.1516## Usage Examples1718- `/remember always use the --frozen-lockfile flag in CI`19- `/remember the auth module was refactored to use middleware in PR #342`20- `/remember integration tests must hit a real database, never use mocks`2122## Process2324### 1. Intent Distillation2526- Identify the core principle, rule, or technical intent from the user's input27- Rephrase concisely using precise software development terminology2829### 2. Identify Target File3031Determine which file should contain this knowledge. Repositories follow a32layered structure, preferring tool-agnostic paths when they exist:3334| Intent type | Preferred target | Fallback |35| --------------------------------------------------------------------- | ------------------------------- | -------------------- |36| Project-wide convention or standard | `AGENTS.md` | `CLAUDE.md` |37| Domain-specific best practice (testing, components, API design, etc.) | `rules/` or `docs/conventions/` | See resolution rules |38| Change to an automated workflow or skill | `.agents/skills/` | `.claude/skills/` |39| Agent behavior guideline | `.agents/agents/` | `.claude/agents/` |40| Claude-specific configuration (MCP, hooks, permissions) | `CLAUDE.md` | — |4142**Resolution rules:**43441. Check whether `rules/` or `docs/conventions/` exists452. If both exist, prefer `rules/`463. If only one exists, write there474. If only `docs/conventions/` exists, ask the user whether they want to48 create a symlink from `rules/` to `docs/conventions/` so both paths49 resolve to the same location. If they confirm, create the symlink before50 writing.515. If neither exists, create `rules/` and write there526. For other target types:53 - For `.agents/skills/` or `.agents/agents/`: Use the `.claude/` equivalent54 if the `.agents/` directory does not exist55 - For `AGENTS.md`: Use `CLAUDE.md` if `AGENTS.md` does not exist567. Only write to `CLAUDE.md` or `.claude/` directly when the information is57 Claude-specific or no tool-agnostic target exists5859### 3. Conflict Analysis6061- Thoroughly scan the identified file(s) for any existing content that62 contradicts the new intent63- Additionally, scan the corresponding file in the other layer (e.g., if writing64 to `AGENTS.md`, also scan `CLAUDE.md` and vice versa). If the other layer65 contains conflicting or duplicated content, resolve it by replacing that66 content in `CLAUDE.md` with a reference to `AGENTS.md` (e.g.,67 "See `AGENTS.md` for project conventions.")68- A contradiction is any statement that would be invalidated or made obsolete by69 the new guideline7071**If a conflict is found:**7273- Halt execution immediately74- Quote the exact conflicting statement(s) from the document75- Inform the user about the contradiction and ask for clarification on how to76 proceed77- Do NOT proceed with any updates until the conflict is resolved7879**If no conflicts are found:**8081- Identify the most logical section within the file to add the new information82- If no suitable section exists, create a new one with an appropriate heading83- Refactor existing content as needed to keep the document coherent and84 well-structured8586### 4. Write the Update8788When writing the update:8990- Only include production-ready patterns and examples that can be safely copied.91 Use precise, declarative language. Do not include anti-patterns or cautionary92 examples.9394### 5. Skill Discovery and Synchronization9596After successfully updating documentation, discover which skills may need97updates by scanning skill files in `.agents/skills/*/SKILL.md` and98`.claude/skills/*/SKILL.md` (whichever exist). When reading skill files, resolve99symlinks to access the actual content rather than treating symlinks as empty or100opaque files.101102**Discovery criteria** — a skill is affected if it contains:103104- Explicit references to the updated documentation file105- Content that covers the same topic or concept as the update106- Inline templates, code examples, or patterns related to the updated guideline107- Instructions or rules that may now be outdated or contradicted by the new108 documentation109110**If no skills are affected, skip this step.**111112**For each affected skill, determine whether it is local or shared:**113114A skill is **shared** if it is a symlink pointing outside the current repo or115was installed by a package manager and has not been modified locally. A skill is116**local** if it was authored or edited in this repo. Symlinks between117`.claude/skills/` and `.agents/skills/` within the same repo are internal118bridges and do not affect this determination.119120**Local skills** — edit directly:121122- Update the skill's templates, examples, and instructions to align with the123 new documentation124125**Shared skills** — report and offer to update:126127- Report the affected shared skill and the specific inconsistency to the user128- Ask: "Shared skill `<skill-name>` is affected. Add repo-specific additions?"129- If the user confirms:130131 1. Resolve the original shared skill path (the symlink target or CLI cache132 location where the shared skill was installed)133134 2. Determine which layer to use:135136 **If `.agents/skills/` directory exists:**137138 Create or update `.agents/skills/<skill-name>/SKILL.md` with repo-specific139 additions listed **before** the shared skill reference, so local rules take140 priority:141142 ```markdown143 ---144 name: <skill-name>145 description: <same description as the shared skill>146 allowed-tools: <same allowed-tools as the shared skill>147 ---148149 ## Repo-specific additions150151 - <the new convention or guideline>152153 ## Shared skill154155 Read and follow the shared skill at `<original-shared-skill-path>`.156 ```157158 Then ensure `.claude/skills/<skill-name>/SKILL.md` is a symlink to159 `.agents/skills/<skill-name>/SKILL.md`:160161 - If it is already a symlink to the correct path, no action needed162 - If it exists as a regular file, delete it and create the symlink163 - If it does not exist, create the symlink164165 **If `.agents/skills/` directory does not exist:**166167 Create or update `.claude/skills/<skill-name>/SKILL.md` directly with the168 same structure (repo-specific additions before the shared skill reference).169170- If the user declines, log the inconsistency in the final confirmation but171 take no action172173### 6. Final Confirmation174175Report all changes made:176177- Documentation file(s) updated178- Skill file(s) updated (if any), with rationale explaining why each skill was179 identified as affected180- Summary of what was added or modified in each file181182## Guidelines183184- Always read target files before modifying them185- Prefer adding to an existing section over creating a new one186- Keep entries concise; one to two sentences per guideline is ideal187- If the user's input is ambiguous, ask for clarification before writing188- Do not duplicate information that already exists in the target file189- When creating skill files, create the `<skill-name>/` subdirectory if needed190 but do NOT create `.agents/` or `.agents/skills/` directories — only use them191 if they already exist