Claude Code Governance Templates
Ready-to-use governance templates for Claude Code, organized by tech stack.
Rules load automatically on every session: no prompting required.
If this saves you time, consider giving it a โญ: it helps others find the project.
Why this exists
Without structure, Claude Code generates inconsistent code, ignores your conventions, and repeats the same mistakes across sessions. This project fixes that with a hierarchy of CLAUDE.md files that load automatically: no prompting required.
What you get:
- Consistent code that respects your architecture and naming conventions
- Security rules enforced by default (no IDOR, no raw SQL, no hardcoded secrets)
- Cost control: precise diffs instead of full rewrites, right model for the right task
- Behavior adapted to the developer's experience level (Junior โ Tech Lead)
Installation
Via plugin marketplace (recommended):
/plugin marketplace add datallmhub/claude-governance
/plugin install claude-governance
Then run /setup in any project: select your stack, governance files are copied automatically, and rules inject at every session start.
Local / development:
git clone https://github.com/datallmhub/claude-governance.git
claude --plugin-dir /path/to/claude-governance
Manual (no plugin):
- Copy the stack folder into your project root
- Update
CLAUDE.md with your project name and stack versions
- Copy
CLAUDE.local.md.example โ CLAUDE.local.md (do not commit)
- Set your experience level in
dev-level.md
Available stacks
Java
| Stack | Folder | Status |
|---|
| Java (Spring Boot) + React (TypeScript) | java-react/ | โ
Ready |
| Java (Spring Boot) + Angular | java-angular/ | ๐ Coming |
| Java (Spring Boot) + Vue.js | java-vue/ | ๐ Coming |
| Java (Spring Boot) API only | java-only/ | ๐ Coming |
JavaScript / TypeScript
| Stack | Folder | Status |
|---|
| React / TypeScript only | react-only/ | โ
Ready |
| Angular only | angular-only/ | โ
Ready |
| Vue.js only | vue-only/ | โ
Ready |
| Next.js (full-stack) | nextjs/ | โ
Ready |
| Node.js (Express) + React | node-express-react/ | ๐ Coming |
| Node.js (NestJS) + React | nestjs-react/ | ๐ Coming |
Python
| Stack | Folder | Status |
|---|
| Python (FastAPI) + React | python-fastapi-react/ | โ
Ready |
| Python (Django) + React | python-django-react/ | ๐ Coming |
| Python (FastAPI) API only | python-fastapi-only/ | ๐ Coming |
.NET / Go / PHP
| Stack | Folder | Status |
|---|
| .NET (ASP.NET Core) + React | dotnet-react/ | ๐ Coming |
| Go (Gin / Echo) + React | go-react/ | ๐ Coming |
| Laravel + React | laravel-react/ | ๐ Coming |
| Symfony + React | symfony-react/ | ๐ Coming |
What's inside each template
<stack>/
โโโ CLAUDE.md # Project context: always loaded
โโโ CLAUDE.local.md.example # Personal overrides (copy locally, never commit)
โโโ .claude/
โ โโโ settings.json # SessionStart hook: injects rules at session start
โ โโโ rules/
โ โ โโโ backend.md # Backend rules: scoped to backend files only
โ โ โโโ frontend.md # Frontend rules: scoped to frontend files only
โ โ โโโ database.md # DB / migration rules
โ โ โโโ testing.md # Testing standards
โ โ โโโ security.md # Security rules: loaded on every file
โ โ โโโ governance.md # Git, PR, versioning, release process
โ โ โโโ dev-level.md # Behavior by experience level
โ โโโ architecture/
โ โโโ overview.md # System architecture + key decisions
โ โโโ api.md # REST API contract
โ โโโ data-model.md # Database schema
โโโ samples/ # Code examples applying all the rules
Load order
~/.claude/CLAUDE.md โ personal preferences (your machine)
./CLAUDE.md โ project rules (committed, shared)
./CLAUDE.local.md โ personal overrides (gitignored)
.claude/rules/*.md โ scoped rules (loaded per file path)
Security
security.md loads on every file automatically. It enforces:
- No IDOR:
public_id UUID in all URLs, never internal sequential IDs
- No hardcoded secrets: all credentials via environment variables
- Safe tokens: JWT in memory, refresh token in
HttpOnly; Secure cookie
- Injection prevention: parameterized queries, input validated at system boundary
- CORS locked down: explicit origin whitelist, never
allowedOrigins("*")
Developer Experience Levels
One setting in dev-level.md: Claude adapts its verbosity automatically.