agentleFS
IlyaGorskyIlyaGorsky/memory-toolkit/skills/memory/SKILL.md

memory

Skill13 starsChanged 8 months agoMITView on GitHub

Project memory — search, workstreams, notes, decisions. Auto-initializes on first use.

66 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use harness-review, postmortem and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • fockusSkill

    harness-review

    Harness v3 統合レビュースキル。コード・プラン・スコープを多角的にレビュー。以下で起動: レビュー、コードレビュー、プランレビュー、スコープ分析、セキュリティ、品質チェック、harness-review。実装・新機能・バグ修正・セットアップ・リリースには使わない。

    Also in 3 projects that use this

  • Hongyu-yuSkill

    postmortem

    Use when analyzing failures, outages, incidents, or negative outcomes, conducting blameless postmortems, documenting root causes with 5 Whys or fishbone diagrams, identifying corrective actions with owners and timelines, learning from near-misses, establishing prevention strategies, or when user mentions postmortem, incident review, failure analysis, RCA, lessons learned, or after-action review.

    Also in 4 projects that use this

  • MicrosoftSkill

    dev

    Development workflows for the playwright-cli repository. Use when the user asks about rolling dependencies, releasing, or other repo maintenance tasks.

    Also in 3 projects that use this

  • AnthropicSkill

    start

    Set up your bio-research environment and explore available tools. Use when first getting oriented with the plugin, checking which literature, drug-discovery, or visualization MCP servers are connected, or surveying available analysis skills before starting a new project.

    Also in 4 projects that use this

  • MicrosoftSkill

    sync

    Sync the current session branch with its upstream branch, or publish the current session branch to a remote. Use when the user asks to sync a branch, pull latest changes, rebase onto upstream, push current branch, publish branch, or set upstream.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 4 projects that use this

  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 57 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create memory dir: mkdir -p "$MEM_DIR"

    line 32
  2. Very specific:

    Do NOT copy memory.js if the plugin is installed — use $MEM resolved above.

    line 33
  3. Very specific:

    Ask: "What workstreams does the project have?" → create workstreams.json

    line 34
  4. Distinctive:

    Ask: "Describe your role in 1-2 sentences" → Profile

    line 35
  5. Distinctive:

    Ask: "Key links?" → Reference

    line 36
  6. Very specific:

    All commands pass --dir=$MEM_DIR to ensure correct memory directory (required when memory.js is a symlink to plugin):

    line 89
  7. Distinctive:

    Check for dead links, stale entries, size overflow, duplicates.

    line 194
  8. Distinctive:

    Don't dump raw output — summarize and highlight relevant

    line 200
  9. Distinctive:

    If not initialized → bootstrap automatically, don't error

    line 201

“Common” is measured: kept by at least 6 in 10 of the 57 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/memory — Project Memory


Step 0: Resolve memory directory

# Claude Code uses git root (not cwd) and replaces / and . with - for project key
GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
PROJ_KEY=$(echo "$GIT_ROOT" | tr '/.' '-' | sed 's/^-//')
MEM_DIR="$HOME/.claude/projects/-${PROJ_KEY}/memory"

Resolve memory.js:

MEM="${CLAUDE_PLUGIN_ROOT}/scripts/memory.js"

If not initialized (no memory.js and no plugin found)

Bootstrap for this project:

  1. Create memory dir: mkdir -p "$MEM_DIR"
  2. Do NOT copy memory.js if the plugin is installed — use $MEM resolved above. Only copy if plugin is not installed and no $MEM found.
  3. Ask: "What workstreams does the project have?" → create workstreams.json
  4. Ask: "Describe your role in 1-2 sentences" → Profile
  5. Ask: "Key links?" → Reference
  6. Create MEMORY.md:
# {Project} — Memory

## API
\```bash
node {absolute $MEM path} --dir={MEM_DIR} <command>
\```

## Profile
{user answer}

## Rules

### Save
- Decision with reasoning → memory file with **Why:** and **How to apply:**
- User corrects you or confirms non-obvious choice → feedback memory
- Something surprising or counter-intuitive → note + memory
- Convert relative dates to absolute: "Thursday" → "2026-04-10"

### Don't save
- What git log already knows (commits, who changed what)
- What the code already shows (patterns, architecture)
- What CLAUDE.md already says
- Ephemeral task state (use TodoWrite)

### Format
- MEMORY.md = index only, max 200 lines. Details in separate .md files
- Each .md file has frontmatter: name, description, type (feedback/project/user/reference)
- workstreams.json = source of truth for aliases
- Use --brief for quick overviews, full output only when needed

### Session lifecycle
- Start of work → /session-start or /session-continue
- Ideas for later → /park (don't lose the thought)
- After big block of work → /reflect (workarounds, repetitions, insights → backlog)
- Before compact: save key decisions + update handoff
- Long session + topic changed → suggest /session-end
- End of work → /session-end (handoff for next session)

## Reference
{user links}
  1. Verify: node "$MEM" --dir="$MEM_DIR" list
  2. "Memory ready. You can start working — /memory for lookup."

Commands (when initialized)

All commands pass --dir=$MEM_DIR to ensure correct memory directory (required when memory.js is a symlink to plugin):

node "$MEM" --dir="$MEM_DIR" <command> [args]

No arguments

Show workstreams + quick actions:

node "$MEM" --dir="$MEM_DIR" workstreams

search <query>

node "$MEM" --dir="$MEM_DIR" search "<query>"

Summarize — don't dump raw. Highlight relevant to current task.

workstream <name>

node "$MEM" --dir="$MEM_DIR" workstream "<name>"

workstreams

node "$MEM" --dir="$MEM_DIR" workstreams

add-workstream <name> <keywords...>

node "$MEM" --dir="$MEM_DIR" add-workstream "<name>" <keywords...>

recent [n]

node "$MEM" --dir="$MEM_DIR" recent <n>

decisions [topic]

node "$MEM" --dir="$MEM_DIR" decisions "<topic>"

list [type]

node "$MEM" --dir="$MEM_DIR" list <type>

note <text>

node "$MEM" --dir="$MEM_DIR" note "<text>"

handoff [<workstream>]

node "$MEM" --dir="$MEM_DIR" handoff              # global handoff
node "$MEM" --dir="$MEM_DIR" handoff <workstream> # per-ws (falls back to global)

Prints NO_HANDOFF when neither per-workstream nor global file exists.

write-handoff --workstream=<name> --content=<file>

node "$MEM" --dir="$MEM_DIR" write-handoff --workstream=<name> --content=<path>

Atomic write to workstreams/<name>/handoff.md. Frontmatter auto-added.

classify --items=<json>

node "$MEM" --dir="$MEM_DIR" classify --items=<path-to-json>

Keyword-routes items by workstreams.json. Multi-label, case-insensitive. Unmatched → _unassigned.

session-activity

node "$MEM" --dir="$MEM_DIR" session-activity

Current session's items (and DOC: subset) since last SESSION_START marker in today's notes. JSON output.

session-changes

node "$MEM" --dir="$MEM_DIR" session-changes

Git commits + files union since session start. JSON output. Pipe with session-activity into classify for routing analysis (see /session-end Phase 1b).

docs

node "$MEM" --dir="$MEM_DIR" docs

Collect DOC: notes from daily notes for /docs-reflect.

recurring

node "$MEM" --dir="$MEM_DIR" recurring

Find recurring feedback patterns.

reindex

node "$MEM" --dir="$MEM_DIR" reindex

Rebuild MEMORY.md index sorted by weight.

health

node "$MEM" --dir="$MEM_DIR" health

Check for dead links, stale entries, size overflow, duplicates.


Rules

  • Don't dump raw output — summarize and highlight relevant
  • If not initialized → bootstrap automatically, don't error
  • MEMORY.md = index. Detailed content in separate .md files

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.