memories.sh
Concepts

Generation Targets

How memories.sh generates native config files for each AI tool.

The memories generate command creates native configuration files that each AI tool understands natively. Each target has its own format, file location, and quirks.

Supported Targets

Cursor

  • Path: .cursor/rules/memories.mdc
  • Format: MDC (Markdown with YAML frontmatter)
  • Cursor reads .mdc files from .cursor/rules/ and applies them as project rules

Claude Code

  • Path: CLAUDE.md
  • Format: Markdown
  • Claude Code reads CLAUDE.md from the project root as its instruction file

Agents (Multi-tool)

  • Path: AGENTS.md
  • Format: Markdown
  • Used by Amp, Codex, Goose, Kilo, Kiro, and OpenCode

GitHub Copilot

  • Path: .github/copilot-instructions.md
  • Format: Markdown
  • Copilot reads instructions from .github/copilot-instructions.md

Windsurf

  • Path: .windsurf/rules/memories.md
  • Format: Markdown
  • Has a 6000 character limit — content is truncated if it exceeds this

Cline

  • Path: .clinerules/memories.md
  • Format: Markdown

Roo

  • Path: .roo/rules/memories.md
  • Format: Markdown

Gemini

  • Path: GEMINI.md
  • Format: Markdown

File Marker

All generated files include a marker comment:

<!-- Generated by memories.sh at 2026-01-15T10:30:00Z -->

This marker serves two purposes:

  1. Overwrite protectionmemories generate won't overwrite files without this marker unless --force is used
  2. Ingest detectionmemories ingest skips files with this marker to avoid circular imports

Gitignore Recommendations

After generating files, memories.sh may suggest adding tool-specific directories to .gitignore. Whether you commit generated files is up to you:

  • Commit them if you want the rules visible to collaborators who don't use memories.sh
  • Gitignore them if all team members use memories.sh and generate locally