project-memory
БесплатноБез исполняемых скриптовНе проверенUse when setting up or organizing Claude Code project memory (CLAUDE.md, .claude/rules/) for better context awareness, consistent behavior, and…
от TheBushidoCollective★ 202 звезды на GitHubОб этом скилле
Project Memory Skill
Set up and organize Claude Code's project memory system for consistent, context-aware assistance.
Core Principle
Project memory teaches Claude Code how to work with your specific codebase. Well-organized project memory leads to more accurate, consistent, and helpful responses.
Memory Hierarchy
Claude Code reads instructions in this order (higher = more precedence):
- Enterprise policy (managed, highest)
- User memory (
~/.claude/CLAUDE.md) - Project memory (
CLAUDE.mdin project root) - Modular rules (
.claude/rules/*.md) - Local memory (
CLAUDE.local.md, gitignored)
Later sources override earlier ones for conflicting instructions.
File Types
CLAUDE.md (Project Root)
Purpose: Primary project instructions, conventions, and context
Location: Project root directory
Visibility: Checked into git, shared with team
Contents:
- Project overview and architecture
- Development commands (build, test, lint)
- Coding conventions and patterns
- Important constraints or requirements
- Links to key documentation
.claude/rules/*.md
Purpose: Modular, path-specific rules
Location: .claude/rules/ directory
Visibility: Checked into git
Features:
- Automatically loaded based on file path
- Supports subdirectories
- Can use YAML frontmatter with
globsfor path-specific targeting
CLAUDE.local.md
Purpose: Personal, machine-specific instructions
Location: Project root directory
Visibility: Should be gitignored
Use cases:
- Personal preferences
- Local environment paths
- Machine-specific configurations
- Experimental instructions
Setting Up Project Memory
1. Create CLAUDE.md
Start with essential project information:
# Project Name
Brief description of what this project does.
## Development Commands
# Build
npm run build
# Test
npm test
# Lint
npm run lint
## Architecture
- `src/` - Source code
- `tests/` - Test files
- `docs/` - Documentation
## Conventions
- Use TypeScript for all new code
- Follow existing patterns in the codebase
- Run tests before committing
## Key Files
- `src/index.ts` - Main entry point
- `src/config.ts` - Configuration handling
2. Add Modular Rules (Optional)
Create path-specific rules in .claude/rules/:
.claude/
rules/
api.md # Rules for API code
tests.md # Rules for test files
components/
forms.md # Rules for form components
3. Path-Specific Rules with Globs
Use YAML frontmatter to target specific paths:
---
paths: ["src/api/**/*.ts", "src/services/**/*.ts"]
---
# API Development Rules
- All API functions must be async
- Always validate input parameters
- Use consistent error response format
- Include JSDoc with @throws annotations
4. Import Syntax
Reference other files from CLAUDE.md:
# Project Instructions
See architecture: @docs/ARCHITECTURE.md
See API guidelines: @docs/API_GUIDELINES.md
Imported files are treated as direct context.
CLAUDE.md Template
# [Project Name]
[One-paragraph description of what this project does]
## Quick Start
# Install dependencies
[command]
# Run development server
[command]
# Run tests
[command]
## Architecture
[Brief overview of project structure]
### Key Directories
- `src/` - [Description]
- `tests/` - [Description]
- `config/` - [Description]
### Key Files
- `src/index.ts` - [Description]
- `src/config.ts` - [Description]
## Development Guidelines
### Code Style
- [Style convention 1]
- [Style convention 2]
### Testing
- [Testing convention 1]
- [Testing convention 2]
### Git Workflow
- [Commit convention]
- [Branch convention]
## Common Tasks
### Adding a New Feature
1. [Step 1]
2. [Step 2]
3. [Step 3]
### Running Tests
[test command]
## Important Notes
- [Critical constraint or requirement]
- [Security consideration]
- [Performance consideration]
Path-Specific Rules Examples
For API Code
---
paths: ["src/api/**/*.ts"]
---
# API Development Rules
## Request Handling
- Validate all input with zod schemas
- Return consistent error format: `{ error: string, code: string }`
- Always set appropriate HTTP status codes
## Authentication
- All endpoints require auth unless in ALLOWED_PUBLIC_ROUTES
- Use `requireAuth()` middleware
## Response Format
// Success
{ data: T, meta?: { page, total } }
// Error
{ error: string, code: string, details?: object }
For Test Files
---
paths: ["**/*.test.ts", "**/*.spec.ts"]
---
# Testing Rules
## Structure
- Use `describe()` for grouping related tests
- Use `it()` with descriptive names: "should [action] when [condition]"
- One assertion per test when possible
## Mocking
- Prefer dependency injection over mocking
- Mock at boundaries (API, database, file system)
- Clear m
Установить project-memory в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditGlobBashFAQ
Что делает скилл project-memory?
Use when setting up or organizing Claude Code project memory (CLAUDE.md, .claude/rules/) for better context awareness, consistent behavior, and project-specific instructions.
Как установить скилл project-memory?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл project-memory запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic