agentleFS
IsNoobgrammerIsNoobgrammer/skills-for-agents/skills/memory/SKILL.md

memory

Skill4 starsChanged 6 months agoMITView on GitHub

MANDATORY STARTUP SKILL for continuity across turns and sessions. Read `memory/data/manifest.json` at the start of every complex task to align with the user's identity, preferences, secrets, and active context. Proactively capture every implicit preference, technical bias, and recurring command without being asked. MUST trigger when the user says 'I like X', 'I hate Y', 'Use Z', or 'Here is my key'.

  • Commits and pushes

66 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use harness-review, dev and 8 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

  • 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

  • DockerSkill

    research

    Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".

    Also in 7 projects that use this

  • BlockSkill

    debugging

    Debugging guidelines and best practices

    Also in 3 projects that use this

  • +1 more from microsoft

The file

Show its rules and text

We split this skill into the rules it gives an agent

27 rules. 0 are common, 21 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 57 edited versions we read keep these.

  • 21

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Session startup: Read manifest.json → know the user in 2 seconds

    line 22
  2. Distinctive:

    Session end: Write the day's handover into today's journal entry

    line 25
  3. Distinctive:

    If the user starts a second session on the same day, append to the existing journal file

    line 96
  4. Distinctive:

    Update this file whenever a core identity fact changes.

    line 124
  5. Distinctive:

    Silent capture: When the user corrects you or expresses a preference, update the relevant prefs file immediately.

    line 148
  6. Distinctive:

    Never print vault contents in chat unless the user explicitly says "show me the key"

    line 162
  7. Distinctive:

    Always refer to secrets by name: "Your Gemini API key is stored and available"

    line 163
  8. Very specific:

    Update manifest.json secrets index when adding/removing

    line 164
  9. Distinctive:

    When a new session or complex task begins, execute these steps in order:

    line 190
  10. Distinctive:

    When journal files older than 7 days accumulate:

    line 203
  11. Distinctive:

    Read all entries from that week

    line 206
  12. Very specific:

    Write a summary to data/archive/week-YYYY-WXX.md:

    line 207
  13. Distinctive:

    Delete the original daily journal files for that week

    line 226
  14. Very specific:

    Update manifest.json with the archive reference

    line 227
  15. Distinctive:

    When you need to find something:

    line 235
  16. Distinctive:

    For recent context: Read today's and yesterday's journal entries

    line 238
  17. Very specific:

    For older context: Check archive/ weekly summaries

    line 239
  18. Very specific:

    For specific values: Read the relevant prefs/ or vault/ file directly

    line 240
  19. Distinctive:

    No duplication: If info belongs in a Knowledge Item (repository-wide context), don't duplicate it here.

    line 247
  20. Distinctive:

    Masking: Never print raw vault contents unless explicitly asked.

    line 248
  21. Distinctive:

    No monolith files: If any single file exceeds 200 lines, it needs to be split or archived.

    line 249
  22. Distinctive:

    Prefs are latest-wins: If a preference changes, update in place — don't append a history.

    line 250
  23. Distinctive:

    Manifest is sacred: Every data write must be followed by a manifest update.

    line 251
  24. Distinctive:

    After any memory operation, verify:

    line 255
  25. Distinctive:

    No sensitive data (API keys, passwords) stored in plaintext

    line 259
  26. Distinctive:

    Memory + Process: If another process skill (e.g., postmortem) generates an artifact, memory captures the metadata (location, purpose, date) …

    line 298
  27. Distinctive:

    If a new preference conflicts with a stored one:

    line 308

“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: The Persistent Context Engine

I bridge sessions. I prevent amnesia. I maintain a living database of who the user is, what they prefer, and what happened — structured for instant retrieval, not archaeological digs through giant log files.


When to Use

  • Session startup: Read manifest.json → know the user in 2 seconds
  • Preference capture: User corrects you, expresses a bias, or picks a tool — write it down silently
  • Secret storage: User shares an API key, token, or credential — vault it immediately
  • Session end: Write the day's handover into today's journal entry
  • Pattern detection: Same question or correction twice → promote to a preference
  • Weekly maintenance: Old journal files pile up → summarize and archive them

Core Instructions

1. The Manifest (data/manifest.json)

The single source of truth. Read this file first on every startup — it tells you where everything is without scanning the filesystem.

{
  "version": 2,
  "last_updated": "[DATE]",
  "identity": {
    "name": "[USER_NAME]",
    "primary_lang": "[LANG]",
    "updated": "[DATE]"
  },
  "secrets": {
    "[SERVICE_NAME]": { "file": "vault/[SERVICE_NAME].enc", "stored": "[DATE]", "status": "active" }
  },
  "preferences": {
    "tooling": { "file": "prefs/tooling.md", "updated": "[DATE]" }
  },
  "playbooks": {
    "deploy-skill": { "file": "playbooks/deploy-skill.md", "updated": "[DATE]" }
  },
  "recent_journal": "journal/[DATE].md",
  "active_project": {
    "name": "[PROJECT_NAME]",
    "goal": "[PROJECT_GOAL]",
    "updated": "[DATE]"
  }
}

Update the manifest whenever you write to any data file. The manifest is the index — if it's stale, the system is broken.

2. The Daily Journal (data/journal/YYYY-MM-DD.md)

One file per day. This is the innovation that prevents log files from becoming unreadable monsters.

Create a new journal file when today's date doesn't have one. Format:

# Journal: 2026-04-28

## 03:52 — Session Start
- **Task**: [What the user wants to do]
- **Context**: [Relevant background]

## 04:15 — Preference Captured
- **Category**: coding-style
- **Key**: component-paradigm
- **Value**: Functional components over class components
- **Source**: User correction ("Actually, use functional components")

## 05:30 — Handover
- **Last Action**: [What was done]
- **Blockers**: [What's stuck, if anything]
- **Next**: [What the next session should do first]
- **Mood**: [Productive / Frustrated / Exploratory / Rush]

Rules:

  • Timestamps use HH:MM in the user's local timezone
  • Entry types: Session Start, Preference Captured, Secret Stored, Workflow Saved, Decision Made, Handover
  • The last entry of the day is the handover — no separate handover file needed
  • If the user starts a second session on the same day, append to the existing journal file

3. Identity File (data/identity.md)

The user's profile — who they are, how they work, what they hate. Read this alongside the manifest on startup.

# Identity

## Who
- **Name**: [Name]
- **Handle**: [GitHub/Online handle]
- **Timezone**: [TZ]

## Technical DNA
- **Primary Languages**: [Languages]
- **Stack**: [Frameworks, tools]
- **Editor**: [Editor]
- **OS**: [OS]
- **Package Manager**: [PM]

## Current Focus
- [Active project/goal]

## Anti-Preferences (Never Do)
- [Things the AI must never do for this user]

Update this file whenever a core identity fact changes. This is the "who am I talking to?" file.

4. Preferences (data/prefs/{category}.md)

Group preferences by category, not by individual micro-decision. Categories:

FileWhat Goes Here
prefs/tooling.mdPackage manager, build tools, CLI tools, node version
prefs/coding-style.mdFormatting, naming conventions, paradigm choices
prefs/ui.mdDesign preferences, color schemes, framework choices
prefs/workflow.mdHow they like to work — plan first? Dive in? Review style?

Format inside each file:

# Tooling Preferences

| Preference | Value | Captured |
|-----------|-------|----------|
| Package Manager | npm | 2026-04-28 |
| Build Tool | Vite | 2026-04-28 |

Silent capture: When the user corrects you or expresses a preference, update the relevant prefs file immediately. Do not ask permission for technical preferences. Log the capture in today's journal.

5. Vault (data/vault/{service-name}.enc)

One file per service. Contains the raw credential and minimal metadata:

SERVICE: [SERVICE_NAME]
KEY: [KEY]
STORED: [DATE]
NOTES: [NOTES]

Security rules:

  • Never print vault contents in chat unless the user explicitly says "show me the key"
  • Always refer to secrets by name: "Your Gemini API key is stored and available"
  • Update manifest.json secrets index when adding/removing

6. Playbooks (data/playbooks/{name}.md)

Step-by-step guides for fragile or complex procedures the user has done before:

# Deploy Skill to GitHub

1. Ensure SKILL.md frontmatter is valid
2. Run SIP audit checklist
3. `git add . && git commit -m "feat(skill-name): description"`
4. `git push origin main`
5. Verify GitHub Actions pass

## Gotchas
- Description must be < 1000 chars
- .gitignore must cover data/ directories

Save a playbook whenever a multi-step procedure succeeds for the first time, or when the user says "I keep doing this" or "remember how to do this."


Startup Protocol

When a new session or complex task begins, execute these steps in order:

  1. Read data/manifest.json — get the full index in one read
  2. Read data/identity.md — know who you're talking to
  3. Check today's journal — does data/journal/YYYY-MM-DD.md exist? If yes, read the last entry for continuity. If no, create it with a Session Start entry
  4. Scan for stale journals — if any journal files are older than 7 days, queue them for archival (do it after the main task, not during startup)

This takes 2 file reads + 1 directory listing. Fast.


Archive Protocol (Weekly Compaction)

When journal files older than 7 days accumulate:

  1. Group them by ISO week number (e.g., 2026-W17)
  2. Read all entries from that week
  3. Write a summary to data/archive/week-YYYY-WXX.md:
# Week 2026-W17 (Apr 21–27)

## Key Decisions
- [Major choices made]

## Preferences Changed
- [What was added/updated in prefs/]

## Projects Active
- [What was being worked on]

## Notable Sessions
- Apr 25: [Brief summary]
- Apr 27: [Brief summary]
  1. Delete the original daily journal files for that week
  2. Update manifest.json with the archive reference

Result: The journal/ directory never exceeds ~14 files (current + previous week buffer).


Retrieval Protocol

When you need to find something:

  1. Check manifest.json first — it has direct paths to every stored file
  2. For recent context: Read today's and yesterday's journal entries
  3. For older context: Check archive/ weekly summaries
  4. For specific values: Read the relevant prefs/ or vault/ file directly
  5. Last resort: grep -rn "keyword" memory/data/ — but this should be rare if the manifest is maintained

Boundaries

  • No duplication: If info belongs in a Knowledge Item (repository-wide context), don't duplicate it here. Memory is for user-specific and session-specific state
  • Masking: Never print raw vault contents unless explicitly asked. Refer by name
  • No monolith files: If any single file exceeds 200 lines, it needs to be split or archived. The whole point of this architecture is preventing bloat
  • Prefs are latest-wins: If a preference changes, update in place — don't append a history. The journal already has the change history
  • Manifest is sacred: Every data write must be followed by a manifest update. A stale manifest is a broken system

Self-Verification

After any memory operation, verify:

  • manifest.json is up to date with latest entry
  • Today's journal file exists and has the latest entry
  • Preferences table reflects current user state
  • No sensitive data (API keys, passwords) stored in plaintext
  • Archive entries older than 30 days have been moved

Composability — Working With Other Skills

See PROTOCOL.md (SIP) at skills root for full interop contract.

Domain Declaration

domain: process
composable: true
yields_to: [voice, craft]

Memory owns process — specifically the management of persistent state, continuity between sessions, and the lifecycle of user-specific knowledge.

When Memory Leads

  • Defining the storage structure for persistent data
  • Deciding when a transient fact should become a permanent preference
  • Handling the security lifecycle of secrets (storage, masking, retrieval)
  • Managing the daily journal rotation and archive compaction
  • Running the startup protocol (manifest → identity → journal check)

When Memory Defers

Other Skill's DomainWhat Memory Does
Voice (e.g., blogger)Memory provides raw facts and preferences; the voice skill determines how to phrase them. Handover notes stay in neutral technical tone regardless of active voice skill — future agents shouldn't parse personality to find facts
Craft (e.g., painter)Memory stores design tokens (e.g., "prefers dark mode", "primary color: #1a1a2e") but the craft skill executes the visual implementation
Density (e.g., caveman, compress)Memory's journal entries and identity files are source data, not response text — density skills don't compress them. But memory's conversational output (e.g., "I've stored your preference") can be compressed
Content (e.g., ml-engine)Memory stores context about what the user is working on, but doesn't generate domain-specific content. ML preferences go in prefs/; ML knowledge stays in the ml-engine skill

Layered Composition Rules

  1. Memory + Voice: Journal entries and identity data are written in neutral, technical tone to ensure machine-readability across sessions, even if a voice skill is active for user-facing output
  2. Memory + Process: If another process skill (e.g., postmortem) generates an artifact, memory captures the metadata (location, purpose, date) in the journal but does not duplicate artifact content
  3. Memory + Density: Memory's data files are never compressed by density skills. They're structured source files, not prose

Pipeline Behavior

  • Upstream (receives from another skill): If a skill generates a reusable procedure, memory can capture it as a playbook. If a skill reveals a user preference, memory stores it in prefs/
  • Downstream (feeds into another skill): Memory provides context that other skills consume — identity info for personalization, preferences for tool selection, secrets for API access

Conflict Signal

If a new preference conflicts with a stored one:

⚠️ Process conflict: New preference [X] conflicts with stored preference [Y]. Updating to [X] as most recent ground truth. Change logged in journal.

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.