{"id":34071549,"url":"https://github.com/severity1/claude-code-auto-memory","last_synced_at":"2026-02-14T05:10:40.994Z","repository":{"id":326492980,"uuid":"1104535589","full_name":"severity1/claude-code-auto-memory","owner":"severity1","description":"Claude Code plugin that automatically maintains CLAUDE.md files","archived":false,"fork":false,"pushed_at":"2025-12-13T08:51:42.000Z","size":175,"stargazers_count":81,"open_issues_count":5,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-13T11:26:32.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/severity1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-26T10:47:09.000Z","updated_at":"2026-01-11T11:18:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/severity1/claude-code-auto-memory","commit_stats":null,"previous_names":["severity1/claude-code-memory"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/severity1/claude-code-auto-memory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/severity1%2Fclaude-code-auto-memory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/severity1%2Fclaude-code-auto-memory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/severity1%2Fclaude-code-auto-memory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/severity1%2Fclaude-code-auto-memory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/severity1","download_url":"https://codeload.github.com/severity1/claude-code-auto-memory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/severity1%2Fclaude-code-auto-memory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29437371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T03:34:37.767Z","status":"ssl_error","status_checked_at":"2026-02-14T03:34:09.092Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-14T08:00:20.537Z","updated_at":"2026-02-14T05:10:40.977Z","avatar_url":"https://github.com/severity1.png","language":"Python","readme":"# claude-code-auto-memory\n\n**Your CLAUDE.md, always in sync.** Minimal tokens. Zero config. Just works.\n\nA Claude Code plugin that watches what Claude Code edits, deletes, and moves - then quietly updates your project memory in the background. No manual maintenance needed.\n\n[![Claude Code Plugin](https://img.shields.io/badge/Claude%20Code-Plugin-blueviolet)](https://claude.ai/code)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Zero Config](https://img.shields.io/badge/setup-zero--config-brightgreen)]()\n[![Token Efficient](https://img.shields.io/badge/tokens-minimal--overhead-blue)]()\n\n## The Problem\n\nCLAUDE.md files become stale as codebases evolve:\n\n- Build commands change but memory stays outdated\n- Architecture shifts go unrecorded\n- Code conventions drift without memory updates\n- New team members get incorrect context\n\n**Manual maintenance is tedious and often forgotten.**\n\n## The Solution\n\nclaude-code-auto-memory automatically updates CLAUDE.md when Claude Code makes changes. Processing happens in an isolated agent, so it doesn't consume your main conversation's context window.\n\n```\nClaude Code edits code -\u003e Plugin tracks changes -\u003e Isolated agent updates memory -\u003e Context stays fresh\n```\n\n## Features\n\n- **Automatic sync**: Tracks Edit/Write/Bash operations and updates CLAUDE.md at end of turn\n- **Bash operation tracking**: Detects rm, mv, git rm, git mv, unlink commands\n- **Minimal-token tracking**: PostToolUse hook has no output; stop hook triggers isolated agent\n- **Isolated processing**: Agent runs in separate context window, doesn't consume main session tokens\n- **Marker-based updates**: Only modifies AUTO-MANAGED sections, preserves manual content\n- **Subtree support**: Hierarchical CLAUDE.md for monorepos\n\n## Installation\n\n### From Marketplace\n\n```bash\nclaude plugin marketplace add severity1/severity1-marketplace\nclaude plugin install auto-memory@severity1-marketplace\n```\n\n### Local Development\n\n```bash\n# Add local marketplace\nclaude plugin marketplace add /path/to/claude-code-auto-memory/.dev-marketplace/.claude-plugin/marketplace.json\n\n# Install from local\nclaude plugin install auto-memory@local-dev\n```\n\n## Commands\n\n### `/auto-memory:init`\n\nInitialize CLAUDE.md structure for your project with an interactive wizard.\n\n```\n/auto-memory:init\n```\n\nThe wizard will:\n1. Analyze your codebase structure\n2. Detect frameworks and build commands\n3. Identify subtree candidates (for monorepos)\n4. Present findings for your approval\n5. Generate CLAUDE.md with auto-managed sections\n\n### `/auto-memory:calibrate`\n\nForce a full recalibration of all CLAUDE.md files.\n\n```\n/auto-memory:calibrate\n```\n\n### `/auto-memory:sync`\n\nSync CLAUDE.md with manual file changes detected by git. Use this when you've edited files outside Claude Code (in your IDE, terminal, etc.) and want to update memory without a full recalibration.\n\n```\n/auto-memory:sync\n```\n\nDetects:\n- Modified tracked files (`git diff`)\n- Staged files (`git diff --cached`)\n- New untracked files (`git ls-files --others`)\n\n### `/auto-memory:status`\n\nShow current sync status and pending changes.\n\n```\n/auto-memory:status\n```\n\n## How It Works\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Claude as Claude Code\n    participant PostHook as PostToolUse Hook\n    participant DirtyFiles as dirty-files\n    participant StopHook as Stop Hook\n    participant Agent as memory-updater Agent\n    participant Skill as memory-processor Skill\n\n    User-\u003e\u003eClaude: Edit files\n    Claude-\u003e\u003ePostHook: Edit/Write/Bash operation\n    PostHook-\u003e\u003eDirtyFiles: Append file path (zero tokens)\n    Note over PostHook: No output - pure tracking\n\n    User-\u003e\u003eClaude: Continue working...\n    Claude-\u003e\u003ePostHook: More edits\n    PostHook-\u003e\u003eDirtyFiles: Append paths\n\n    Note over Claude: Turn ends\n    Claude-\u003e\u003eStopHook: End of turn\n    StopHook-\u003e\u003eDirtyFiles: Check for dirty files\n\n    alt Dirty files exist\n        StopHook-\u003e\u003eAgent: Spawn isolated agent\n        Agent-\u003e\u003eSkill: Invoke memory-processor\n        Skill-\u003e\u003eSkill: Analyze changes\n        Skill-\u003e\u003eSkill: Update CLAUDE.md sections\n        Agent--\u003e\u003eStopHook: Complete\n        StopHook-\u003e\u003eDirtyFiles: Clear processed files\n    else No dirty files\n        Note over StopHook: No action needed\n    end\n```\n\n### Architecture Overview\n\n```\nPostToolUse Hook (Edit|Write|Bash)\n    |\n    v (append file paths)\n.claude/auto-memory/dirty-files\n    |\n    v (end of turn)\nStop Hook\n    |\n    v (spawn agent)\nmemory-updater Agent (isolated context)\n    |\n    v (invoke skill)\nmemory-processor Skill\n    |\n    v\nCLAUDE.md updated\n```\n\n### Token Efficiency\n\n- **PostToolUse hook**: Zero token cost (no output)\n- **Stop hook**: Minimal output only when dirty files exist\n- **Agent**: Runs in isolated context window - doesn't consume main session tokens\n- **Skills**: Progressive disclosure - load only when invoked\n\n## CLAUDE.md Format\n\nAuto-managed sections use HTML comment markers:\n\n```markdown\n\u003c!-- AUTO-MANAGED: section-name --\u003e\nContent automatically updated by plugin\n\u003c!-- END AUTO-MANAGED --\u003e\n\n\u003c!-- MANUAL --\u003e\nContent never touched by plugin\n\u003c!-- END MANUAL --\u003e\n```\n\n### Supported Sections\n\n- `project-description` - Project overview\n- `build-commands` - Build, test, lint commands\n- `architecture` - Directory structure, components\n- `conventions` - Code standards, naming patterns\n- `patterns` - AI-detected coding patterns\n- `git-insights` - Decisions from commit history\n- `best-practices` - From official Claude Code docs\n\n## Configuration\n\nOptional configuration is stored in `.claude/auto-memory/config.json`.\n\n### Trigger Modes\n\nControl when auto-memory triggers CLAUDE.md updates:\n\n```json\n{\n  \"triggerMode\": \"default\"\n}\n```\n\n| Mode | Behavior |\n|------|----------|\n| `default` | Track file edits in real-time (Edit/Write/Bash operations). Best for most workflows. |\n| `gitmode` | Only trigger on `git commit`. Best for developers who commit frequently. |\n\n**Note**: If no config file exists, `default` mode is used.\n\n### Git Commit Enrichment\n\nWhen a `git commit` is detected (in both modes), auto-memory captures the commit context:\n- Commit hash and message are stored inline with each file path: `/path/to/file [hash: message]`\n- The memory-updater agent uses this to provide semantic context: \"Changes from commit [hash]: [message]\"\n\nThis helps CLAUDE.md updates reflect the *intent* behind changes, not just which files changed.\n\n### Data Files\n\n| File | Location | Purpose |\n|------|----------|---------|\n| `dirty-files` | `.claude/auto-memory/` | List of files pending CLAUDE.md update |\n| `config.json` | `.claude/auto-memory/` | Trigger mode configuration |\n\n## Development\n\n### Setup\n\n```bash\n# Install dev dependencies\nuv sync --extra dev\n\n# Run tests\nuv run pytest\n\n# Format code\nuv run ruff format .\n\n# Lint\nuv run ruff check .\n\n# Type check\nuv run mypy .\n```\n\n### Project Structure\n\n```\nclaude-code-auto-memory/\n├── .claude-plugin/\n│   └── plugin.json           # Plugin metadata\n├── hooks/\n│   └── hooks.json            # Hook registration\n├── scripts/\n│   ├── post-tool-use.py      # Track file changes\n│   └── stop.py               # End-of-turn trigger\n├── agents/\n│   └── memory-updater.md     # Orchestrator agent\n├── skills/\n│   ├── memory-processor/     # Update processing\n│   └── codebase-analyzer/    # Init wizard\n├── commands/\n│   ├── init.md               # /auto-memory:init\n│   ├── calibrate.md          # /auto-memory:calibrate\n│   ├── sync.md               # /auto-memory:sync\n│   └── status.md             # /auto-memory:status\n└── tests/\n```\n\n## Why claude-code-auto-memory?\n\n| Feature | claude-code-auto-memory | Other Solutions |\n|---------|-------------------|-----------------|\n| Token overhead | **Minimal** (isolated agent) | Hook output adds tokens |\n| External deps | **None** | SQLite, Vector DBs, Workers |\n| Processing | **Isolated agent** | Inline or external service |\n| Updates | **Marker-based** | Full file regeneration |\n| Monorepo | **Subtree CLAUDE.md** | Root only |\n| Config required | **Optional** (zero-config default) | Config files needed |\n\nSee also: [memory-store-plugin](https://github.com/julep-ai/memory-store-plugin), [claude-mem](https://github.com/thedotmack/claude-mem), [claude-code-branch-memory-manager](https://github.com/Davidcreador/claude-code-branch-memory-manager)\n\n## License\n\nMIT\n\n---\n\n**Keywords**: Claude Code plugin, CLAUDE.md, automatic memory, memory management, context persistence, token-efficient, zero-config, monorepo, AI coding assistant\n","funding_links":[],"categories":["Tools \u0026 Utilities"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseverity1%2Fclaude-code-auto-memory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseverity1%2Fclaude-code-auto-memory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseverity1%2Fclaude-code-auto-memory/lists"}