home / skills / dexploarer / hyper-forge / create-memory

create-memory skill

/.claude/skills/create-memory

This skill helps you create and manage memory files to capture learnings, decisions, and patterns for project longevity.

npx playbooks add skill dexploarer/hyper-forge --skill create-memory

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.9 KB
---
name: create-memory
description: Create memory files to track important learnings, decisions, and system changes. Use when implementing major features, making architectural decisions, or learning important project patterns.
allowed-tools: [Write, Edit, Read, Grep]
---

# Create Memory Files

Track important learnings and decisions in .claude/memory/ files.

## When to Use

- Just implemented major feature or system
- Made important architectural decision
- Discovered critical project patterns
- User says "remember this" or "track this"
- Solved complex bug with important learnings
- Established new workflow or standard

## Current Memory Files

```
.claude/memory/
├── research-first-enforcement.md  # How research-first is enforced
├── coding-standards.md            # TypeScript, style, errors
├── testing-standards.md           # NO MOCKS, Bun, Playwright
├── architecture-patterns.md       # Tech stack, patterns
├── common-workflows.md            # DB migrations, API, 3D, git
├── build-commands.md              # Dev, build, test commands
├── asset-forge-guide.md           # Project specifics
└── security-protocols.md          # Auth, API security, secrets
```

All imported in `CLAUDE.md` at root.

## Memory File Template

```markdown
# [Topic Name]

**Status**: [ACTIVE/DEPRECATED/IN-PROGRESS]
**Date**: [YYYY-MM-DD]
**Related**: [Other memory files, if any]

## Purpose

[Why this memory file exists - what problem does it solve?]

## Key Learnings

### 1. [Major Learning]
[Detailed explanation]

**Why it matters**: [Impact/importance]

### 2. [Major Learning]
[Detailed explanation]

**Example**:
\```[language]
[code example if applicable]
\```

## Implementation Details

[How this is actually implemented in the project]

**Files affected**:
- path/to/file1.ts
- path/to/file2.tsx

## Common Pitfalls

- ❌ [What NOT to do]
- ❌ [What NOT to do]
- ✅ [What to DO instead]

## Examples

### Good Example
\```[language]
[code showing correct pattern]
\```

### Bad Example
\```[language]
[code showing incorrect pattern]
\```

## Related Commands/Skills

- `/command-name` - [What it does]
- `skill-name` - [What it does]

## Future Considerations

[Things to watch out for, potential improvements]
```

## Example Memory Files to Create

**hyperscape-engine-integration.md**
- How Hyperscape engine integrates with asset-forge
- Game world architecture
- Asset loading patterns

**three-js-optimization-patterns.md**
- LOD strategies
- Instancing for repeated models
- Material reuse
- Disposal patterns

**privy-auth-integration.md**
- JWT verification patterns
- User session management
- Auth middleware setup

**drizzle-migration-workflow.md**
- How we create migrations
- Schema change patterns
- Rollback strategies

**api-testing-patterns.md**
- How we test Elysia routes
- No-mock testing approach
- Integration test setup

## After Creating Memory File

1. Add to CLAUDE.md imports:
```markdown
## [Section Name]

@.claude/memory/new-file-name.md
```

2. Verify import:
```bash
grep "new-file-name" CLAUDE.md
```

## Best Practices

- **Be specific** - Don't create vague "notes.md" files
- **Include examples** - Code examples make it memorable
- **Date it** - Track when learnings happened
- **Update existing** - Prefer updating existing memory over creating new
- **Reference files** - Link to actual code files affected
- **Mark status** - Is this current? Deprecated? In progress?

## Memory File Lifecycle

1. **Create** - When major learning happens
2. **Update** - As patterns evolve
3. **Reference** - Import in CLAUDE.md
4. **Deprecate** - Mark outdated when patterns change
5. **Archive** - Delete if truly obsolete (rare)

## Memory vs Documentation

**Memory files are for Claude**, not users:
- Internal patterns and decisions
- "Why we do X instead of Y"
- Critical learnings from past mistakes
- Project-specific conventions

**Documentation is for users**:
- README.md
- API docs
- User guides

Keep them separate.

Overview

This skill creates and manages .claude/memory/ files to record important learnings, architectural decisions, and system changes. It helps teams capture context when implementing major features, solving complex bugs, or establishing new workflows. The files are structured, dated, and referenced from the project CLAUDE.md for easy discovery by the agent.

How this skill works

When invoked, the skill scaffolds a new memory file using a standardized template (status, date, purpose, key learnings, implementation details, pitfalls, examples, and related commands). It prompts for concise metadata and focused content, inserts code examples when provided, and updates the CLAUDE.md index to import the new file. The skill also supports updating existing memory files and marking lifecycle states like ACTIVE, IN-PROGRESS, or DEPRECATED.

When to use it

  • After implementing a major feature or subsystem
  • After making an architectural or design decision
  • When you discover a critical project pattern or debugging lesson
  • When a collaborator asks to “remember” or track something important
  • When establishing new team workflows, conventions, or security rules

Best practices

  • Be specific—choose a clear topic name (avoid generic names like notes.md)
  • Include concise code examples and exact file paths affected
  • Date each entry and set a Status (ACTIVE/DEPRECATED/IN-PROGRESS)
  • Prefer updating an existing related memory file over creating duplicates
  • Reference related memory files and where the file is imported in CLAUDE.md
  • Keep entries focused on why the decision matters and common pitfalls to avoid

Example use cases

  • Create hyperscape-engine-integration.md describing engine hookup, asset loading, and world architecture
  • Add three-js-optimization-patterns.md documenting LOD, instancing, and disposal patterns used across assets
  • Record privy-auth-integration.md with JWT verification steps and middleware setup
  • Document drizzle-migration-workflow.md to capture migration creation, rollback strategies, and schema-change examples
  • Write api-testing-patterns.md describing no-mock integration tests for Elysia routes and test harness setup

FAQ

Should I create a memory for every small decision?

No. Reserve memory files for decisions or learnings that affect future development, on-boarding, or cross-team work. Minor notes belong in task trackers or commit messages.

How do I add the new file to the agent index?

After creating the file the skill updates CLAUDE.md with an @.claude/memory/new-file-name.md import. Verify with a quick grep to ensure the import exists.