| name | claude-mem-coded-assistant |
| description | Entry-point skill for using claude-mem to keep CLAUDE.md and MEMORY.md in sync so Claude learns from past work and avoids repeating mistakes.
|
| version | 1.1.0 |
ClaudeâMem Coding Skill
What This Skill Does
This skill teaches Claude how to:
- Mine claude-mem (via MCP) for highâsignal past work.
- Maintain a concise, highâimpact CLAUDE.md (~1,500 tokens).
- Maintain a curated MEMORY.md of lessons learned and directions, so future work is faster and less errorâprone.
It is an entry point, not a full manual. Detailed workflows and examples live in separate reference files that Claude can open on demand.
When to Use This Skill
Claude should activate this skill when:
- A feature, refactor, or significant bugfix is completed.
- An infra/deployment change introduces new operational lessons.
- Starting work on an area with substantial history in claude-mem.
- Performing a daily âmemory maintenanceâ pass on an active repo.
Inputs and Outputs
Inputs
Claude relies on:
- Files (in repo root):
CLAUDE.md â main project instructions.
MEMORY.md â curated lessons and directions.
- claude-mem MCP tools (already installed & connected):
search â indexâlevel observation search.
timeline â temporal context around observations.
get_observations â full structured details.
Outputs
This skill produces:
- Patchâstyle edits to:
MEMORY.md â new or updated lessons, patterns, and playbooks.
CLAUDE.md â refreshed rules while staying under ~1,500 tokens.
- No raw claude-mem transcripts are copied; only compressed, actionable guidance.
How Claude Should Behave
1. Mine claude-mem â Update MEMORY.md
Highâlevel behavior (details in claude-mem-usage.md):
- Use progressive disclosure against claude-mem:
search for recent decision, bugfix, refactor, discovery, change observations.
timeline around promising IDs to see context.
get_observations for a small set of highâvalue IDs.
- From those, update
MEMORY.md with:
- Architectural decisions and their impact.
- Implementation patterns and antiâpatterns.
- Debugging playbooks and DevOps lessons.
Constraints
- Prefer short bullets over long prose.
- Record why decisions were made and how to act next time.
- Never store secrets or credentials in
MEMORY.md.
For a full template and examples, Claude should open:
memory-structure-reference.md
claude-mem-usage.md
2. Distill MEMORY.md â Refresh CLAUDE.md (â1,500 tokens)
Highâlevel behavior:
-
Read the existing CLAUDE.md and approximate its size; keep the body around 1â1.5k tokens for optimal behavior.
-
Pull only current, highâimpact content from MEMORY.md:
- Stillâvalid architectural directions.
- Frequently reused patterns and gotchas.
- Operational guardrails that materially affect daily work.
-
Rewrite historical notes as timeless rules, e.g.:
- âWhen adding retries to DB writes, always use the shared retry helper instead of manual loops.â
-
Use links instead of inlining:
.clauderules/code-style.md for style.
.clauderules/testing.md for testing.
MEMORY.md sections for deeper background.
Token Discipline
- If CLAUDE.md is too long:
- Merge overlapping bullets.
- Drop generic advice that doesnât change behavior.
- Replace detailed explanations with references to supporting docs.
DiffâFirst
- Propose minimal patches, not full rewrites:
- Update only sections that need change (e.g., âArchitectural Directionsâ, âPatterns & Gotchasâ).
- Preserve stable layout and headings.
- Always leave final acceptance to human review in Git/CI.
For concrete layouts and example diffs, Claude should open:
claude-md-layout-reference.md
example-diffs.md
Safety and Priority Rules
Claude must:
Quick âHow to Call Meâ
Users can invoke this skill with prompts like:
âUse the claude-mem coding skill to:
- mine claude-mem for recent work,
- update MEMORY.md with lessons, and
- refresh CLAUDE.md under the ~1,500âtoken budget.â
Claude should then:
- Run the claude-mem
search â timeline â get_observations flow.
- Draft a patch for
MEMORY.md with new lessons.
- Draft a patch for
CLAUDE.md derived from MEMORY.md.
- Present both patches clearly for human review and commit.
External References
To keep this SKILL.md lean and within bestâpractice size, Claude should open these files when more detail is needed:
claude-mem-usage.md â detailed claude-mem MCP workflows, filters, and example queries.
memory-structure-reference.md â full MEMORY.md templates and longer examples.
claude-md-layout-reference.md â canonical CLAUDE.md section layouts and size guidance.
example-diffs.md â sample before/after patches for CLAUDE.md and MEMORY.md.