LeoYeAI/agent-master-skills / skills/auto-memory-pro
auto-memory-pro
VerifiedCurate Claude Code's auto-memory into durable project knowledge. Analyze MEMORY.md for patterns, promote proven learnings to CLAUDE.md and .claude/rules/, extract recurring solutions into reusable skills. Use when: (1) reviewing what Claude has learned about your project, (2) graduating a pattern from notes to enforced rules, (3) turning a debugging solution into a skill, (4) checking memory health and capacity.
| File | Kind | Size |
|---|---|---|
| CLAUDE.md | markdown | 2.5 KB |
| README.md | markdown | 3.3 KB |
| SKILL.md | skill md | 6.9 KB |
| _meta.json | config | 290 B |
| agents/memory-analyst.md | markdown | 2.6 KB |
| agents/skill-extractor.md | markdown | 3.0 KB |
| hooks/error-capture.sh | script | 2.6 KB |
| hooks/hooks.json | config | 297 B |
| reference/memory-architecture.md | markdown | 4.7 KB |
| reference/promotion-rules.md | markdown | 3.2 KB |
| reference/rules-directory-patterns.md | markdown | 3.4 KB |
| settings.json | config | 798 B |
| templates/rule-template.md | markdown | 240 B |
| templates/skill-template.md | markdown | 873 B |
reference/rules-directory-patterns.md
View on GitHub# Rules Directory Patterns
Best practices for organizing `.claude/rules/` files — the scoped instruction system that loads rules only when relevant files are open.
## Directory Structure
```
.claude/
├── CLAUDE.md # Main project instructions (always loaded)
└── rules/
├── code-style.md # No paths → loads always (like CLAUDE.md)
├── testing.md # Scoped to test files
├── api-design.md # Scoped to API source files
├── database.md # Scoped to migration/model files
└── frontend/
├── components.md # Scoped to React components
└── styling.md # Scoped to CSS/styled files
```
## Path Scoping
### Basic patterns
```yaml
---
paths:
- "**/*.test.ts" # All TypeScript test files
- "src/api/**/*.ts" # API source files
- "*.md" # Root-level markdown
- "src/components/**/*.tsx" # React components
---
```
### Brace expansion
```yaml
---
paths:
- "src/**/*.{ts,tsx}" # All TypeScript + TSX
- "tests/**/*.{test,spec}.ts" # Test and spec files
---
```
### Multiple scopes
```yaml
---
paths:
- "src/api/**/*.ts"
- "tests/api/**/*"
- "openapi.yaml"
---
```
## Common Rule Files
### testing.md
```yaml
---
paths:
- "**/*.test.{ts,tsx,js,jsx}"
- "**/*.spec.{ts,tsx,js,jsx}"
- "tests/**/*"
- "__tests__/**/*"
---
# Testing Rules
- Use `describe` blocks to group related tests
- One assertion per test when possible
- Mock external services; never hit real APIs in tests
- Use factories for test data, not inline objects
- Run `pnpm test` before committing
```
### api-design.md
```yaml
---
paths:
- "src/api/**/*.ts"
- "src/routes/**/*.ts"
- "src/handlers/**/*.ts"
---
# API Design Rules
- Validate all input with Zod schemas
- Use `ApiError` class for error responses
- Include OpenAPI JSDoc on all handlers
- Return consistent error format: `{ error: string, code: string }`
```
### database.md
```yaml
---
paths:
- "src/db/**/*"
- "migrations/**/*"
- "prisma/**/*"
- "drizzle/**/*"
---
# Database Rules
- Always create a migration for schema changes
- Never modify existing migrations — create new ones
- Use transactions for multi-table operations
- Index foreign keys and frequently queried columns
```
### security.md (unscoped — always loads)
```markdown
# Security Rules
- Never log sensitive data (tokens, passwords, PII)
- Sanitize all user input before database queries
- Use parameterized queries, never string interpolation
- Validate file uploads: type, size, content
- Environment variables for all secrets — never hardcode
```
## When to Create a Rule File
| Signal | Action |
|--------|--------|
| CLAUDE.md over 150 lines | Move scoped patterns to rules/ |
| Same instruction repeated for different file types | Create a scoped rule |
| `/si:promote` suggests a file-type-specific pattern | Create or append to a rule file |
| Team adds a new convention for a specific area | New rule file |
## Organization Tips
1. **One topic per file** — `testing.md`, not `testing-and-linting.md`
2. **Use subdirectories for large projects** — `rules/frontend/`, `rules/backend/`
3. **Keep unscoped rules minimal** — they load every session like CLAUDE.md
4. **Review after refactors** — paths may change when directories are reorganized
5. **Share via git** — rules/ should be version-controlled (unlike auto-memory)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |