Skip to content

nshelscode/claude-code-foundation

Repository files navigation

Claude Code Enterprise Foundation

A stack-agnostic project scaffold for Claude Code — clone, hydrate, and start building with a fully configured AI-assisted development environment from day one.

What You Get

claude-code-foundation/
├── CLAUDE.md                          # Project brain template (12 sections, <200 lines)
├── .claude/
│   ├── settings.json                  # Permissions, hooks, env vars
│   ├── commands/                      # 5 slash commands (/review, /deploy, /test-all, /bootstrap, /pr-prep)
│   ├── skills/                        # 4 skills (code-review, security-audit, refactor, text-writer)
│   ├── agents/                        # 4 agents (code-reviewer, test-writer, security-auditor, devops-sre)
│   └── rules/                         # Shared rules (security, testing, api-design)
├── .claudeignore                      # Token-saving file exclusions
├── .mcp.json                          # Project-level MCP server config
├── plugins/org-standards/             # Distributable plugin bundle
├── templates/                         # Org-level configs (managed settings, global MCP, personal setup)
├── personal-setup/                    # Personal ~/.claude/ config with install script
├── docs/                              # Architecture, API reference, onboarding guide
├── scripts/                           # Setup, deploy, seed-db, hook scripts
├── tests/                             # Unit, integration, e2e directories
└── TODO.md                            # Hydration checklist (all placeholders listed)

Quick Start

1. Personal Setup (one-time)

Install your personal Claude Code configuration:

git clone <this-repo>
cd claude-code-foundation
./personal-setup/install.sh

This installs globally (applies to all projects):

  • ~/.claude/CLAUDE.md — personal communication & code style preferences
  • ~/.claude/skills/brainstorm/ — structured ideation without premature code
  • ~/.claude/skills/scope-check/ — intent alignment before large tasks
  • ~/.mcp.json — Context7 for documentation lookup
  • ~/.claude/settings.json — autocompact, thinking tokens, notification hook

Then activate the security floor (requires admin):

sudo mkdir -p "/Library/Application Support/ClaudeCode"
sudo cp templates/managed-settings.json "/Library/Application Support/ClaudeCode/managed-settings.json"

2. New Project (each time)

cp -r claude-code-foundation/ my-new-app/
cd my-new-app/
rm -rf .git personal-setup/
git init

Then hydrate — open TODO.md and replace all [PLACEHOLDER] values for your chosen stack. See the Hydration Guide below.

Hydration

Decisions First

Before touching any files, decide:

  1. Language — TypeScript, Python, Go, Rust, Java?
  2. Package manager — npm/pnpm, pip/poetry, cargo, go mod?
  3. Database — PostgreSQL, MySQL, SQLite, MongoDB, or none?
  4. Test framework — Vitest, pytest, go test, cargo test?
  5. Deployment — AWS ECS, Lambda, Kubernetes, Vercel?
  6. CI/CD — Bitbucket Pipelines, GitHub Actions, Jenkins?

Steps (~60 min)

  1. Identity — Replace [PROJECT_NAME], [PROJECT_DESCRIPTION], [REPO_URL], [TEAM_NAME]
  2. Stack — Replace [LANGUAGE], [RUNTIME], [PACKAGE_MANAGER], [BUILD_COMMAND], [TEST_COMMAND], [LINT_COMMAND]
  3. Infrastructure — Replace [DATABASE_URL], [DEPLOY_TARGET], [PORT]
  4. Workflow — Replace [BRANCH_STRATEGY], [DEFAULT_BRANCH], [TEST_COVERAGE_THRESHOLD]
  5. Architecture — Fill in docs/architecture.md and docs/api-reference.md
  6. Gotchas — Fill in Section 9 of CLAUDE.md with project-specific pitfalls
  7. Verifygrep -r '\[' --include='*.md' --include='*.json' --include='*.sh' to find any missed placeholders
  8. Clean up — Delete TODO.md, commit

Full placeholder list with types and examples: see TODO.md.

What's Included

Slash Commands

Command What It Does
/review [path] Code review against CLAUDE.md standards
/deploy [env] Pre-deployment checklist + deploy
/test-all Full test suite with coverage
/bootstrap [name] Scaffold new feature module
/pr-prep [base] Generate PR description from diff

Agents

Agent Model Modifies Code?
code-reviewer haiku No — read-only
test-writer sonnet Yes — writes & runs tests
security-auditor haiku No — read-only
devops-sre haiku No — read-only

Skills

code-review, security-audit, refactor, text-writer — auto-activate based on task context.

Hooks

  • SessionStart — displays project name + current branch
  • PreToolUse — blocks edits to .env, lock files, .git/
  • Stop — reminds to run tests before committing
  • Notification — macOS notification when Claude needs attention

Token Efficiency

  • .claudeignore blocks dependencies, build outputs, lock files, and test artifacts
  • Read-only agents use haiku (cheapest model)
  • Autocompact at 70% prevents context exhaustion
  • CLAUDE.md kept under 200 lines

Templates (Org-Level)

Distributed separately to engineers, not committed to project repos:

Template Purpose Install Location
templates/managed-settings.json Security deny rules (force-push, curl, destructive SQL) /Library/Application Support/ClaudeCode/
templates/global-mcp.json Jira, Confluence, Slack, Bitbucket, Context7 ~/.mcp.json
templates/org-CLAUDE.md Org-wide coding standards baseline Distributed via wiki/Confluence
templates/personal/ Personal CLAUDE.md + settings templates ~/.claude/

Plugin

The plugins/org-standards/ directory is a distributable Claude Code plugin:

# Load during development
claude --plugin-dir ./plugins/org-standards

# Bundles: review command, code-review skill, code-reviewer agent, safety hooks

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages