Loading...
Loading...
Use when setting up or organizing Claude Code project memory (CLAUDE.md, .claude/rules/) for better context awareness, consistent behavior, and project-specific instructions.
npx skill4agent add thebushidocollective/han project-memory~/.claude/CLAUDE.mdCLAUDE.md.claude/rules/*.mdCLAUDE.local.md.claude/rules/globs# 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
.claude/rules/.claude/
rules/
api.md # Rules for API code
tests.md # Rules for test files
components/
forms.md # Rules for form components---
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# Project Instructions
See architecture: @docs/ARCHITECTURE.md
See API guidelines: @docs/API_GUIDELINES.md# [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]
---
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 }
---
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 mocks between tests
## Coverage
- All public functions need tests
- Test happy path and error cases
- Include edge cases---
paths: ["src/components/**/*.tsx"]
---
# Component Rules
## Structure
- One component per file
- Export component as default
- Co-locate styles with component
## Props
- Define props interface above component
- Use destructuring in function signature
- Document required vs optional props
## State
- Prefer controlled components
- Lift state up when shared between components
- Use hooks for complex state logic## Introduction
This project is a web application that allows users to manage their tasks.
It was started in 2023 and has grown to include many features including
task creation, task editing, task deletion, task filtering, task sorting,
task searching, task sharing, and task exporting...Task management web app. Users create, edit, filter, and share tasks.Write good code and follow best practices.- Use TypeScript strict mode
- Run `npm run lint` before committing
- All functions need JSDoc commentsBuild the project before deploying. npm run build
npm run deploy# Project
Quick overview here.
## Detailed Documentation
Architecture: @docs/ARCHITECTURE.md
API Guide: @docs/API.md
Deployment: @docs/DEPLOYMENT.md# CLAUDE.md
When writing tests, always use Jest.
When writing API code, always validate input.
When writing components, always use TypeScript..claude/rules/tests.md -> Jest rules
.claude/rules/api.md -> Validation rules
.claude/rules/components.md -> TypeScript rules# Monorepo
## Packages
- `packages/core/` - Core library
- `packages/cli/` - CLI tool
- `packages/web/` - Web application
## Commands
# Build all packages
npm run build
# Test specific package
npm run test --workspace=packages/core
## Rules
See package-specific rules in each package's `.claude/rules/` directory.CLAUDE.local.md# Local Setup Notes
## Environment
- Using Node 20.x
- PostgreSQL running on port 5433 (not default)
- Redis running in Docker
## Personal Preferences
- Prefer verbose test output
- Always run lint before suggesting changes.claude/rules/