From all-skills
Use this skill after design decisions or major code changes to update documentation. Creates per-directory CLAUDE.md files and maintains top-level CLAUDE.md and ARCHITECTURE.md. Trigger after completing features, refactoring, or architectural changes.
npx claudepluginhub oxhagolli/clawdskillz --plugin setup-skillsThis skill uses the workspace's default tool permissions.
Write docs that help Claude and humans understand code fast. Be brief. Use examples. Skip the fluff.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Write docs that help Claude and humans understand code fast. Be brief. Use examples. Skip the fluff.
project/
├── CLAUDE.md # Project overview, key patterns, gotchas
├── ARCHITECTURE.md # System design, data flow, major components
├── src/
│ ├── CLAUDE.md # This directory's purpose and patterns
│ ├── auth/
│ │ └── CLAUDE.md # Auth-specific context
│ └── api/
│ └── CLAUDE.md # API-specific context
What to include:
Example:
# Project
Order management API for retail clients.
## Commands
npm install
npm run dev # localhost:3000
npm test # run all tests
## Patterns
- All handlers in src/handlers/, one file per endpoint
- Validation via zod schemas in src/schemas/
- Errors thrown as HttpError(code, message)
## Gotchas
- Tests require local postgres running
- Auth tokens expire after 1 hour in dev
What to include:
Example:
# Architecture
## Components
**API Server** (src/api/)
Handles HTTP requests. Validates input, calls services, returns responses.
**Services** (src/services/)
Business logic. No HTTP awareness. Returns plain objects or throws errors.
**Database** (src/db/)
Postgres via pg-promise. All queries in repository files.
**Queue** (src/queue/)
Redis-backed job queue for async tasks. Workers in src/workers/.
## Data Flow: Create Order
1. POST /orders hits OrderHandler
2. Handler validates via OrderSchema
3. Handler calls OrderService.create()
4. Service checks inventory, calculates totals
5. Service calls OrderRepository.insert()
6. Service queues confirmation email
7. Handler returns 201 with order ID
Keep it short. Cover:
Example:
# src/auth/
Handles authentication and authorization.
## Files
- middleware.ts - Express middleware, attaches user to req
- tokens.ts - JWT creation and verification
- permissions.ts - Role-based access checks
## Usage
// In a route
app.get('/admin', authMiddleware, requireRole('admin'), handler)
// Check permission manually
if (canAccess(user, 'orders:write')) { ... }
Do:
Returns user object or null if not found.
Don't:
This function is responsible for retrieving the user object from the
database. In cases where the user cannot be found, it will return a
null value to indicate the absence of the requested user.
Do:
## Usage
const user = await getUser(id)
if (!user) return notFound()
Don't:
## Usage Instructions
In order to properly utilize this function, you will need to first
ensure that you have a valid user ID. Then, you can call the function
as demonstrated in the following comprehensive example...
Update docs after:
Remove from docs when:
Before finishing:
Stay in your lane. Don't cover: