Co-Pilot
Updated a month ago

claude-bootstrap

Aalinaqi
0.4k
alinaqi/claude-bootstrap
84
Agent Score

πŸ’‘ Summary

Claude Bootstrap is a TDD-first project initialization system that enhances AI-generated code with security and simplicity.

🎯 Target Audience

Software EngineersDevOps ProfessionalsProject ManagersQA EngineersAI Developers

πŸ€– AI Roast: β€œPowerful, but the setup might scare off the impatient.”

Security AnalysisMedium Risk

Risk: Medium. Review: shell/CLI command execution; outbound network access (SSRF, data egress); API keys/tokens handling and storage; filesystem read/write scope and path traversal; dependency pinning and supply-chain risk. Run with least privilege and audit before enabling in production.

Claude Bootstrap

An opinionated project initialization system for Claude Code. TDD-first, iterative loops, security-first, AI-native.

The bottleneck has moved from code generation to code comprehension. AI can generate infinite code, but humans still need to review, understand, and maintain it. Claude Bootstrap provides guardrails that keep AI-generated code simple, secure, and verifiable.

Core Philosophy

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  ITERATIVE LOOPS BY DEFAULT                                    β”‚
β”‚  ─────────────────────────────────────────────────────────────│
β”‚  Every task runs in a self-referential loop until tests pass.  β”‚
β”‚  Claude iterates autonomously. You describe what, not how.     β”‚
β”‚  Powered by Ralph Wiggum - iteration > perfection.             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  TESTS FIRST, ALWAYS                                           β”‚
β”‚  ─────────────────────────────────────────────────────────────│
β”‚  Features: Write tests β†’ Watch them fail β†’ Implement β†’ Pass    β”‚
β”‚  Bugs: Find test gap β†’ Write failing test β†’ Fix β†’ Pass         β”‚
β”‚  No code ships without a test that failed first.               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  SIMPLICITY IS NON-NEGOTIABLE                                  β”‚
β”‚  ─────────────────────────────────────────────────────────────│
β”‚  20 lines per function β”‚ 200 lines per file β”‚ 3 params max     β”‚
β”‚  If you can't understand the whole system in one session,      β”‚
β”‚  it's too complex.                                             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  SECURITY BY DEFAULT                                           β”‚
β”‚  ─────────────────────────────────────────────────────────────│
β”‚  No secrets in code β”‚ No secrets in client env vars            β”‚
β”‚  Dependency scanning β”‚ Pre-commit hooks β”‚ CI enforcement       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  CODE REVIEWS ARE MANDATORY                                    β”‚
β”‚  ─────────────────────────────────────────────────────────────│
β”‚  Every commit requires /code-review before push.               β”‚
β”‚  πŸ”΄ Critical + 🟠 High = blocked β”‚ 🟑 Medium + 🟒 Low = can ship β”‚
β”‚  AI catches what humans miss. Humans catch what AI misses.     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Why This Exists

After hundreds of AI-assisted projects across Node, React, Python, and React Native, patterns emerged:

  1. Engineers struggle with Claude Code not because of the tool, but because of how they instruct it - The delta is in the guardrails
  2. Complexity has a ceiling - There's a point where AI loses coherent understanding of the system. That's a signal, not a failure
  3. Restart is a feature, not failure - When fixing something increases complexity, restart with learnings. Each iteration is faster

This toolkit encodes those learnings into reusable skills.

Quick Start

# Clone and install git clone https://github.com/alinaqi/claude-bootstrap.git ~/.claude-bootstrap cd ~/.claude-bootstrap && ./install.sh # In any project directory claude > /initialize-project

Claude will:

  1. Validate tools - Check gh, vercel, supabase CLIs
  2. Ask questions - Language, framework, AI-first?, database
  3. Set up repository - Create or connect GitHub repo
  4. Create structure - Skills, security, CI/CD, specs, todos
  5. Prompt for specs - Transition to defining first feature

Automatic Iterative Loops (Ralph Wiggum)

You talk naturally. Claude automatically runs iterative TDD loops.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  You say: "Add email validation to signup"                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Claude automatically:                                       β”‚
β”‚  1. Extracts requirements from your request                 β”‚
β”‚  2. Structures as TDD loop with completion criteria         β”‚
β”‚  3. Runs /ralph-loop with tests as exit condition           β”‚
β”‚  4. Iterates until all tests pass + lint clean              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

No need to manually invoke /ralph-loop. Just describe what you want:

| You Say | Claude Does | |---------|-------------| | "Add user authentication" | Loops until auth tests pass | | "Fix the login bug" | Finds test gap β†’ writes test β†’ loops until fixed | | "Build a REST API for todos" | Loops until all endpoint tests pass | | "Refactor the auth module" | Loops with tests as safety net |

Opt-out phrases (for when you don't want loops):

  • "Just explain..." β†’ explanation only
  • "Quick fix..." β†’ one-liner, no loop
  • "Don't loop..." β†’ explicit opt-out

Setup Ralph Wiggum Plugin

# Install from official marketplace (in Claude Code) /plugin install ralph-loop@claude-plugins-official

Troubleshooting: "Source path does not exist: .../ralph-wiggum"

The plugin was renamed from ralph-wiggum to ralph-loop in the marketplace. If you see this error, the cache references the old name but the plugin folder uses the new name. Fix with a symlink:

ln -s ~/.claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-loop \ ~/.claude/plugins/marketplaces/claude-plugins-official/plugins/ralph-wiggum

Then retry /plugin install ralph-loop@claude-plugins-official.

Commit Hygiene (Automatic PR Size Management)

Claude monitors your changes and advises when to commit before PRs become too large.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  COMMIT SIZE THRESHOLDS                                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  🟒 OK:     ≀ 5 files,  ≀ 200 lines                         β”‚
β”‚  🟑 WARN:   6-10 files, 201-400 lines  β†’ "Commit soon"      β”‚
β”‚  πŸ”΄ STOP:   > 10 files, > 400 lines    β†’ "Commit NOW"       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Claude automatically checks and advises:

| Status | Claude Says | |--------|-------------| | 3 files, 95 lines | βœ… Tests passing. Good time to commit! | | 7 files, 225 lines | πŸ’‘ Approaching threshold. Consider committing. | | 12 files, 400 lines | ⚠️ Changes too large! Commit now. |

Why this matters:

  • PRs < 200 lines: 15% defect rate
  • PRs 200-400 lines: 23% defect rate
  • PRs > 400 lines: 40%+ defect rate (rubber-stamped, not reviewed)

Atomic commit principle: If you need "and" to describe your commit, split it.

Agentic Ad Optimization (Reddit Ads)

Run automated Reddit ad campaigns with AI-powered optimization.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  BACKGROUND SERVICE (runs every 4-6 hours)                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  1. Fetch performance data (CTR, CPA, ROAS)                 β”‚
β”‚  2. Claude analyzes and recommends actions                  β”‚
β”‚  3. Auto-execute: pause, scale, adjust bids, rotate ads     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

AI-driven actions:

| Action | Trigger | Result | |--------|---------|--------| | PAUSE | CTR < 0.3%, no conversions | Stop wasting budget | | SCALE | CTR > 1%, CPA < target | Increase budget 1.5x | | ADJUST_BID | Moderate performance | Tweak bids Β±10-20% | | ROTATE_CREATIVE | Declining CTR 3+ days | Flag for new creative |

Deploy as Docker service:

docker-compose up -d reddit-ads-optimizer

Multi-Repo Workspace Awareness

Claude Code now understands your entire workspace - monorepo or multi-repo.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  /analyze-workspace                                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Discovers: Modules, dependencies, contracts                 β”‚
β”‚  Generates: TOPOLOGY.md, CONTRACTS.md, KEY_FILES.md         β”‚
β”‚  Tracks: API contracts, shared types, cross-repo changes    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Generated context artifacts:

| Artifact | Purpose | |----------|---------| | TOPOLOGY.md | What modules exist, their roles, tech stacks | | CONTRACTS.md | API endpoints, shared types, validation status | | DEPENDENCY_GRAPH.md | Who calls whom, change order | | KEY_FILES.md | What to load for each context | | CROSS_REPO_INDEX.md | Search capabilities before reimplementing |

Contract freshness (automatic):

| Trigger | Action | Time | |---------|--------|------| | Session start | Staleness check | ~5s | | Post-commit | Auto-sync if contracts changed | ~15s | | Pre-push | Validation gate | ~10s |

Cross-repo change detection:

⚠️  CROSS-REPO CHANGE DETECTED
This change affects: apps/api
Recommended order: shared-types β†’ backend β†’ frontend

Code Reviews (Mandatory Guardrail)

Every push requires code review. No exceptions.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  WORKFLOW: Code β†’ Test β†’ Commit β†’ Push β†’ Review blocks     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Run manually: /code-review                                 β”‚
β”‚  Enforced: Pre-push hook blocks on Critical/High            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Enable pre-push hook in any project:

~/.claude/install-hooks.sh

Severity levels:

| Level | Action | Can Push? | |-------|--------|-----------| | πŸ”΄ Critical | Must fix now | ❌ BLOCKED | | 🟠 High | Must fix now | ❌ BLOCKED | | 🟑 Medium | Fix soon | βœ… Advisory | | 🟒 Low | Nice to have | βœ… Advisory |

What it catches:

  • Security vulnerabilities (SQL injection, XSS, secrets)
  • Performance issues (N+1 queries, memory leaks)
  • Architecture problems (coupling, SOLID violations)
  • Code quality (complexity, dupli
5-Dim Analysis
Clarity9/10
Novelty8/10
Utility8/10
Completeness9/10
Maintainability8/10
Pros & Cons

Pros

  • Encourages TDD and iterative development.
  • Enhances code security and simplicity.
  • Automates project initialization.
  • Facilitates code reviews and commit hygiene.

Cons

  • May require a learning curve for new users.
  • Dependency on specific tools and plugins.
  • Complexity in setup for larger projects.
  • Potential for over-reliance on AI.

Related Skills

useful-ai-prompts

A
toolCo-Pilot
88/ 100

β€œA treasure trove of prompts, but don’t expect them to write your novel for you.”

fastmcp

A
toolCo-Pilot
86/ 100

β€œFastMCP: because who doesn't love a little complexity with their AI?”

python-pro

A
toolCo-Pilot
86/ 100

β€œPowerful, but the setup might scare off the impatient.”

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author alinaqi.