agentleFS
Bossmann007Bossmann007/cursor-kit/skills/setup-ai-memory/SKILL.md

setup-ai-memory

Skill0 starsChanged 55 days agoMITView on GitHub

Install or repair the ai-memory companion for Claude Code, Cursor, Codex and Gemini (native macOS binary, LaunchAgent, MCP + lifecycle hooks) while keeping kit layers AGENTS.md, PROJECT.md, and .claude/state authoritative. Also invoked from /setup-project (pré-check repair + depth-2 install) and /setup-pucpr when the full Cursor stack is in play. Use when the user asks to wire ai-memory, long-horizon wiki memory, cross-agent handoffs, or says setup / arrumar ai-memory. Prefer this over ad-hoc upstream copy-paste.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Multi-tool (primary path): run ~/Projects/cursor-kit/sync-all.sh (subset via TOOLS="claude cursor codex gemini").

    line 16
  2. Distinctive:

    Prefer kit script (idempotent):

    line 57
  3. Distinctive:

    Do not download without user consent if they only asked for docs.

    line 71
  4. Very specific:

    After wiring, if the user runs ./sync-hooks.sh, it must be merge-safe (kit scripts only.

    line 75
  5. Distinctive:

    No second episodic store — checkpoint remains continue/retomar authority

    line 105
  6. Very specific:

    No secrets in wiki or kit memory files (memory-security)

    line 106
  7. Distinctive:

    No absolute machine-specific paths in committed docs

    line 107

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Setup ai-memory

Multi-tool (primary path): run ~/Projects/cursor-kit/sync-all.sh (subset via TOOLS="claude cursor codex gemini"). It installs/repairs the binary + LaunchAgent and wires every tool. Verify with claude mcp list, codex mcp list, ai-memory doctor. Cursor-specific steps below apply only to Cursor.

Opt-in companion for long-horizon project memory. Compose upstream ai-memory with cursor-kit — do not fork, do not vendor their SKILL.md, do not replace kit episodic state.

Canonical kit root: ~/Projects/cursor-kit (or this plugin repo). Human doc (PT): docs/tools/10-ai-memory.md. Pasteable prompt: docs/prompts/07-ai-memory-wire.md.

Ownership (do not blur)

LayerAuthority
Prefs / factsAGENTS.md (continual-learning)
ArchitecturePROJECT.md Decisions
Live task / continue.claude/state/checkpoint.json
Tool failures.claude/state/failures.jsonl
Long-horizon wiki / handoff / FTSai-memory (when enabled)

Retrieval still starts with kit layers; only then ask ai-memory MCP for handoff/brief.

Process

0. Consent

Confirm once: install/repair companion on this machine? (recommended for solo macOS Cursor + optional Claude/Codex later). If declined, stop and point at the PT doc.

1. Pré-check

CheckHealthyAction
macOS + archDarwin arm64/x86_64Else: point upstream install docs; do not run kit script
Binaryai-memory on PATH or ~/Applications/ai-memory/ai-memoryRun kit installer
Servercurl http://127.0.0.1:49374/mcp → 405 (or 401 with auth)Start LaunchAgent / serve
MCP~/.cursor/mcp.json has ai-memoryinstall-mcp --client cursor --apply
Hookshooks.json has kit and ai-memory commandsinstall-hooks --agent cursor --apply; never wipe kit hooks

2. Install / repair

Prefer kit script (idempotent):

# from cursor-kit root
./scripts/install-ai-memory.sh

Defaults: native release tarball → ~/Applications/ai-memory, LaunchAgent, loopback bind, zero-LLM OK, then upstream install-mcp / install-hooks for cursor.

Overrides: AI_MEMORY_HOME, AI_MEMORY_SKIP_LAUNCHD=1, AI_MEMORY_SKIP_WIRE=1, AI_MEMORY_FORCE_DOWNLOAD=1.

Do not download without user consent if they only asked for docs.

3. Preserve kit hooks

After wiring, if the user runs ./sync-hooks.sh, it must be merge-safe (kit scripts only; companions preserved). If an old overwrite wiped ai-memory entries, re-run ai-memory install-hooks --agent cursor --apply via the real binary path under ~/Applications/ai-memory/ai-memory (not a broken symlink).

4. Verify

  1. LaunchAgent running (or foreground serve)
  2. Loopback /mcp returns 405
  3. MCP lists ai-memory beside token-engine / codebase-memory
  4. hooks.json still includes kit *.py hooks and ai-memory hook commands
  5. Remind: Reload Cursor MCP / window
  6. Optional: memory_status via MCP; do not dump secrets

5. Done report

## ai-memory setup

- Consent: accepted | declined
- Binary: path | missing
- Server: up (code) | down
- MCP: wired | repaired | skipped
- Hooks: kit+companion | kit-only | needs re-wire
- Next: reload MCP; use checkpoint for continue; wiki for long-horizon recall

Guardrails

  • Composition: call upstream CLI; never paste their hook scripts into the plugin
  • No second episodic store — checkpoint remains continue/retomar authority
  • No secrets in wiki or kit memory files (memory-security)
  • No absolute machine-specific paths in committed docs
  • Docker path is secondary on macOS; kit default is native + LaunchAgent
  • Depth 1 /setup-project does not require this companion

Out of scope

  • Homelab multi-user auth / TLS (point at upstream deploy docs)
  • Making ai-memory run the Cursor launcher
  • Dual-write AGENTS ↔ wiki
  • Cloud Projects VM install (companion is desktop/loopback-first)

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.