By combining reusable workflows through Skills, automated safeguards through Hooks, and parallel processing through Subagents, you can build an enterprise-grade Claude Code development environment that safeguards code quality and enables efficient collaboration.
Suitable tasks:
Teams that need standardized workflows
Complex code review and quality control
Parallel development across multiple tasks
Projects that need integrations with external tools (databases, APIs, etc.)
Unsuitable tasks:
Simple personal projects
One-off tasks that do not need automation
Applicable model version: Claude Opus 4.7
Applicable client, Agent, or API: Claude Code CLI
Recommended reasoning levels and parameters: Choose high/xhigh based on task complexity
# Project: billing-service
## Stack
- Node.js 20, TypeScript strict mode
- PostgreSQL via Prisma
- Fastify for HTTP, BullMQ for background jobs
## Conventions
- No `any` types. If the inference is wrong, fix the type at the source.
- All API handlers validate input with Zod schemas in `src/schemas/`
- Prisma queries go through `src/repos/`, never inline
- Tests use Vitest. Run `pnpm test -- <file>` for single-file runs
## Do not
- Run `prisma migrate dev`. Use `pnpm db:migrate` (has our pre-hooks).
- Commit anything that touches `src/billing/legacy/` without flagging it
- Install packages without checking the monorepo root package.json first
## Useful paths
- API routes: `src/routes/`
- Domain logic: `src/domain/<entity>/`
- DB migrations: `prisma/migrations/`Directory structure:
.claude/skills/release-notes/
├── SKILL.md
└── references/
└── template.mdSKILL.md example:
---
name: release-notes
description: Use when generating release notes from git commits between two tags. Groups by conventional commit type and filters out dependency bumps.
---
# Release Notes Generator
## Steps
1. Run `git log <from-tag>..<to-tag> --oneline` to list commits
2. Parse conventional commit prefixes: feat, fix, perf, refactor, docs, chore
3. Skip commits matching: `chore(deps)`, `chore: bump`, `Merge pull request`
4. Group into: Features, Fixes, Performance, Refactors, Other
5. Use the template in `references/template.md` for formatting
6. Output to stdout unless user specifies a fileUsage:
claude /release-notes v1.2.0 v1.3.0Configuration file: .claude/settings.json
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "jq -r '.tool_input.file_path' | xargs -I {} sh -c 'case {} in *.ts|*.tsx) pnpm prettier --write {} ;; esac'"
}
]
}
],
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "jq -e 'select(.tool_input.command | test(\"prod|production\"; \"i\")) | error(\"production commands blocked, use staging\")' > /dev/null 2>&1"
}
]
}
]
}
}Hook type reference:
PostToolUse: Triggered after a tool runs (such as automatically formatting code)
PreToolUse: Triggered before a tool runs (such as blocking dangerous commands)
Dedicated Subagent example: Migration auditor
---
name: migration-auditor
description: Reviews database migration files for concurrency issues, missing indexes, and backward-compatibility breaks. Use before merging any migration PR.
tools: Read, Grep, Glob, Bash
---
You review database migrations for safety. For each migration file, check:
1. Does it add a NOT NULL column without a default? That breaks concurrent writes.
2. Does it drop a column referenced elsewhere in the codebase? Grep for the column name.
3. Does it add an index on a large table without CONCURRENTLY? That holds a lock.
4. Does it rename a table or column? That breaks deployed code reading the old name.
Output a punch list of issues with file:line references. If clean, say so and stop.Use cases:
Code review subagent
Security audit subagent
Performance analysis subagent
Test generation subagent
Add a local PostgreSQL server:
# Local scope, only this machine
claude mcp add --transport stdio postgres -- npx -y @modelcontextprotocol/server-postgres postgresql://localhost/devAdd a project-level MCP server (shared with the team):
# Project scope, committed to .mcp.json, shared with team
claude mcp add --scope project --transport stdio linear -- npx -y @linear/mcp-serverManage MCP servers:
claude mcp list # List all registered servers
claude mcp get postgres # View details for a single server
/mcp # View status in the sessionConfigure CLAUDE.md:
Create CLAUDE.md in the project root
Include the tech stack, conventions, prohibited actions, and useful paths
Create Skills:
Identify repetitive workflows (such as release notes and code review)
Create SKILL.md in .claude/skills/<name>/
Add reference files to the references/ directory
Configure Hooks:
Add a PostToolUse hook in .claude/settings.json (for automatic formatting)
Add a PreToolUse hook (to block dangerous commands)
Test whether the hooks work as expected
Create Subagents:
Identify tasks that require specialized knowledge (migration auditing and security review)
Create the agent definition in .claude/agents/<name>.md
Specify the required tool permissions
Integrate MCP servers:
Identify the external tools needed (databases and project management tools)
Add servers with claude mcp add
Verify the connection and data access
The article provides complete project configuration examples, including:
A detailed CLAUDE.md template (for the billing-service project)
A Skills directory structure and complete SKILL.md example
Hooks configuration (in JSON format, including PostToolUse and PreToolUse)
A Subagent definition example (migration-auditor)
MCP server configuration commands and examples
The article emphasizes that these are "patterns that hold up past the first week" (patterns that remain effective after a week), making them suitable for team-wide adoption.
Skills are suitable for repeatable workflows, not one-off tasks
Hooks require an understanding of JSON configuration and command syntax; configuration errors may prevent Claude Code from working properly
Subagents require clearly defined tool permissions to avoid over-authorization
MCP servers require a network connection and correctly configured transport
These configurations need to be shared and synchronized across the team; using Git to manage them is recommended
The article says: "The honest summary is that most people stop at CLAUDE.md and miss the leverage that comes from Skills, Hooks, and Subagents." This suggests that advanced configuration can significantly improve productivity and code quality.
The article also offers advice on team adoption: "Rolling it out to a team," emphasizing the importance of standardized configuration.
Claude Opus 4.7