/analyze-repo
Analyze an existing repository's structure, conventions, and guardrails.
$ npx -y skills add alinaqi/claude-bootstrap --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/analyze-repo
Context preview
What this command does when you run it.
Analyze an existing repository's structure, conventions, and guardrails.
Command definition
analyze-repo.mdAnalyze Repository
Analyze an existing repository's structure, conventions, and guardrails.
**This command runs automatically** when `/initialize-project` detects an existing codebase without Claude setup. You can also run it standalone anytime.
**Use this command standalone when:**
- You want to re-analyze after making changes
- You want analysis without running `/initialize-project`
- Auditing code quality and guardrails on any repo
- Reviewing a codebase without adding Claude skills
**Automatic trigger:**
- `/initialize-project` on existing codebase → auto-runs this analysis first
---
Phase 1: Repository Detection
Run these checks to understand the repo:
# Git info
echo "=== Git Status ===" && \
git remote -v 2>/dev/null && \
git branch -a 2>/dev/null | head -10 && \
git log --oneline -5 2>/dev/null
# Config files
echo "=== Config Files ===" && \
ls -la *.json *.toml *.yaml *.yml 2>/dev/null
# Directory structure (3 levels, excluding noise)
echo "=== Directory Structure ===" && \
find . -type d -maxdepth 3 \
-not -path "*/node_modules/*" \
-not -path "*/.git/*" \
-not -path "*/venv/*" \
-not -path "*/__pycache__/*" \
-not -path "*/dist/*" \
-not -path "*/build/*" \
2>/dev/null | head -40---
Phase 2: Tech Stack Detection
Identify the primary technologies:
# JavaScript/TypeScript
if [ -f "package.json" ]; then
echo "=== Package.json ===" && \
cat package.json | head -50
fi
# Python
if [ -f "pyproject.toml" ]; then
echo "=== pyproject.toml ===" && \
cat pyproject.toml
fi
# Mobile
ls pubspec.yaml android/build.gradle ios/*.xcodeproj 2>/dev/nullBased on findings, determine:
| File | Technology | |------|------------| | package.json + tsconfig.json | TypeScript | | package.json (no tsconfig) | JavaScript | | pyproject.toml | Python | | pubspec.yaml | Flutter (Dart) | | android/build.gradle | Android Native | | Cargo.toml | Rust | | go.mod | Go |
---
Phase 3: Repo Structure Type
Classify the repository:
# Check structure type
echo "=== Repo Structure Type ===" && \
if [ -d "packages" ] || [ -d "apps" ] || grep -q '"workspaces"' package.json 2>/dev/null; then
echo "MONOREPO - Multiple packages/apps with shared tooling"
elif [ -d "frontend" ] && [ -d "backend" ]; then
echo "FULL-STACK MONOLITH - Frontend + Backend in same repo"
elif [ -d "src" ] && grep -q '"react\|vue\|angular"' package.json 2>/dev/null; then
echo "FRONTEND - Single frontend application"
elif [ -d "src" ] && grep -q '"express\|fastify\|koa"' package.json 2>/dev/null; then
echo "BACKEND - Single backend application"
elif [ -f "pyproject.toml" ] && grep -q "fastapi\|django\|flask" pyproject.toml 2>/dev/null; then
echo "BACKEND (Python) - Single backend application"
else
echo "STANDARD - Single-purpose repository"
fi---
Phase 4: Guardrails Audit
Check existing code quality tools:
echo "=== Guardrails Audit ===" && \
# Pre-commit hooks
echo "Pre-commit Hooks:" && \
[ -d ".husky" ] && echo " [x] Husky installed" || echo " [ ] Husky NOT installed" && \
[ -f ".pre-commit-config.yaml" ] && echo " [x] pre-commit framework" || echo " [ ] pre-commit framework NOT installed" && \
[ -f ".git/hooks/pre-commit" ] && echo " [x] Git hooks present" || echo " [ ] No git hooks"
# Linting
echo "Linting:" && \
(grep -q '"eslint"' package.json 2>/dev/null && echo " [x] ESLint") || \
(grep -q '"biome"' package.json 2>/dev/null && echo " [x] Biome") || \
(grep -q "ruff" pyproject.toml 2>/dev/null && echo " [x] Ruff") || \
echo " [ ] No linter detected"
# Formatting
echo "Formatting:" && \
(grep -q '"prettier"' package.json 2>/dev/null && echo " [x] Prettier") || \
(grep -q "black" pyproject.toml 2>/dev/null && echo " [x] Black") || \
(grep -q "ruff" pyproject.toml 2>/dev/null && echo " [x] Ruff (formatting)") || \
echo " [ ] No formatter detected"
# Type checking
echo "Type Checking:" && \
([ -f "tsconfig.json" ] && echo " [x] TypeScript") || \
(grep -q "mypy" pyproject.toml 2>/dev/null && echo " [x] mypy") || \
(grep -q "pyright" pyproject.toml 2>/dev/null && echo " [x] pyright") || \
echo " [ ] No type checker detected"
# Testing
echo "Testing:" && \
(grep -q '"jest\|vitest"' package.json 2>/dev/null && echo " [x] Jest/Vitest") || \
(grep -q "pytest" pyproject.toml 2>/dev/null && echo " [x] pytest") || \
echo " [ ] No test framework detected"
# Commit validation
echo "Commit Validation:" && \
([ -f "commitlint.config.js" ] && echo " [x] commitlint") || \
(grep -q "conventional-pre-commit" .pre-commit-config.yaml 2>/dev/null && echo " [x] conventional-pre-commit") || \
echo " [ ] No commit validation"
# CI/CD
echo "CI/CD:" && \
[ -d ".github/workflows" ] && echo " [x] GitHub Actions" || echo " [ ] No GitHub Actions" && \
[ -f ".gitlab-ci.yml" ] && echo " [x] GitLab CI" || true && \
[ -f "Jenkinsfile" ] && echo " [x] Jenkins" || true
---
Phase 5: Convention Detection
Identify existing code patterns:
echo "=== Convention Detection ===" && \
# File naming
echo "File Naming:" && \
ls src/**/*.ts 2>/dev/null | head -5 && \
ls src/**/*.py 2>/dev/null | head -5
# Import style (JS/TS)
echo "Import Style:" && \
grep -h "^import" src/**/*.ts 2>/dev/null | head -5
# Export style (JS/TS)
echo "Export Style:" && \
grep -h "^export" src/**/*.ts 2>/dev/null | head -5
# Test file location
echo "Test Location:" && \
find . -name "*.test.*" -o -name "*.spec.*" -o -name "test_*.py" 2>/dev/null | head -5
---
Phase 6: Generate Report
Based on all findings, generate this report structure:
# Repository Analysis Report
**Generated:** [timestamp]
**Repository:** [name from git remote or directory]
## Overview
| Attribute | Value |
|-----------|-------|
| Type | [Monorepo / Full-Stack / Frontend / Backend] |
| Language | [TypeScript / Python / ...] |
| Framework | [React / FastAPI / ...] |
| Package Manager | [npm / pnpm / uv / pip] |
## D
Read more
Analyze Repository
Analyze an existing repository's structure, conventions, and guardrails.
**This command runs automatically** when `/initialize-project` detects an existing codebase without Claude setup. You can also run it standalone anytime.
**Use this command standalone when:**
- You want to re-analyze after making changes
- You want analysis without running `/initialize-project`
- Auditing code quality and guardrails on any repo
- Reviewing a codebase without adding Claude skills
**Automatic trigger:**
- `/initialize-project` on existing codebase → auto-runs this analysis first
---
Phase 1: Repository Detection
Run these checks to understand the repo:
# Git info
echo "=== Git Status ===" && \
git remote -v 2>/dev/null && \
git branch -a 2>/dev/null | head -10 && \
git log --oneline -5 2>/dev/null
# Config files
echo "=== Config Files ===" && \
ls -la *.json *.toml *.yaml *.yml 2>/dev/null
# Directory structure (3 levels, excluding noise)
echo "=== Directory Structure ===" && \
find . -type d -maxdepth 3 \
-not -path "*/node_modules/*" \
-not -path "*/.git/*" \
-not -path "*/venv/*" \
-not -path "*/__pycache__/*" \
-not -path "*/dist/*" \
-not -path "*/build/*" \
2>/dev/null | head -40---
Phase 2: Tech Stack Detection
Identify the primary technologies:
# JavaScript/TypeScript
if [ -f "package.json" ]; then
echo "=== Package.json ===" && \
cat package.json | head -50
fi
# Python
if [ -f "pyproject.toml" ]; then
echo "=== pyproject.toml ===" && \
cat pyproject.toml
fi
# Mobile
ls pubspec.yaml android/build.gradle ios/*.xcodeproj 2>/dev/nullBased on findings, determine:
| File | Technology | |------|------------| | package.json + tsconfig.json | TypeScript | | package.json (no tsconfig) | JavaScript | | pyproject.toml | Python | | pubspec.yaml | Flutter (Dart) | | android/build.gradle | Android Native | | Cargo.toml | Rust | | go.mod | Go |
---
Phase 3: Repo Structure Type
Classify the repository:
# Check structure type
echo "=== Repo Structure Type ===" && \
if [ -d "packages" ] || [ -d "apps" ] || grep -q '"workspaces"' package.json 2>/dev/null; then
echo "MONOREPO - Multiple packages/apps with shared tooling"
elif [ -d "frontend" ] && [ -d "backend" ]; then
echo "FULL-STACK MONOLITH - Frontend + Backend in same repo"
elif [ -d "src" ] && grep -q '"react\|vue\|angular"' package.json 2>/dev/null; then
echo "FRONTEND - Single frontend application"
elif [ -d "src" ] && grep -q '"express\|fastify\|koa"' package.json 2>/dev/null; then
echo "BACKEND - Single backend application"
elif [ -f "pyproject.toml" ] && grep -q "fastapi\|django\|flask" pyproject.toml 2>/dev/null; then
echo "BACKEND (Python) - Single backend application"
else
echo "STANDARD - Single-purpose repository"
fi---
Phase 4: Guardrails Audit
Check existing code quality tools:
echo "=== Guardrails Audit ===" && \ # Pre-commit hooks echo "Pre-commit Hooks:" && \ [ -d ".husky" ] && echo " [x] Husky installed" || echo " [ ] Husky NOT installed" && \ [ -f ".pre-commit-config.yaml" ] && echo " [x] pre-commit framework" || echo " [ ] pre-commit framework NOT installed" && \ [ -f ".git/hooks/pre-commit" ] && echo " [x] Git hooks present" || echo " [ ] No git hooks" # Linting echo "Linting:" && \ (grep -q '"eslint"' package.json 2>/dev/null && echo " [x] ESLint") || \ (grep -q '"biome"' package.json 2>/dev/null && echo " [x] Biome") || \ (grep -q "ruff" pyproject.toml 2>/dev/null && echo " [x] Ruff") || \ echo " [ ] No linter detected" # Formatting echo "Formatting:" && \ (grep -q '"prettier"' package.json 2>/dev/null && echo " [x] Prettier") || \ (grep -q "black" pyproject.toml 2>/dev/null && echo " [x] Black") || \ (grep -q "ruff" pyproject.toml 2>/dev/null && echo " [x] Ruff (formatting)") || \ echo " [ ] No formatter detected" # Type checking echo "Type Checking:" && \ ([ -f "tsconfig.json" ] && echo " [x] TypeScript") || \ (grep -q "mypy" pyproject.toml 2>/dev/null && echo " [x] mypy") || \ (grep -q "pyright" pyproject.toml 2>/dev/null && echo " [x] pyright") || \ echo " [ ] No type checker detected" # Testing echo "Testing:" && \ (grep -q '"jest\|vitest"' package.json 2>/dev/null && echo " [x] Jest/Vitest") || \ (grep -q "pytest" pyproject.toml 2>/dev/null && echo " [x] pytest") || \ echo " [ ] No test framework detected" # Commit validation echo "Commit Validation:" && \ ([ -f "commitlint.config.js" ] && echo " [x] commitlint") || \ (grep -q "conventional-pre-commit" .pre-commit-config.yaml 2>/dev/null && echo " [x] conventional-pre-commit") || \ echo " [ ] No commit validation" # CI/CD echo "CI/CD:" && \ [ -d ".github/workflows" ] && echo " [x] GitHub Actions" || echo " [ ] No GitHub Actions" && \ [ -f ".gitlab-ci.yml" ] && echo " [x] GitLab CI" || true && \ [ -f "Jenkinsfile" ] && echo " [x] Jenkins" || true
---
Phase 5: Convention Detection
Identify existing code patterns:
echo "=== Convention Detection ===" && \ # File naming echo "File Naming:" && \ ls src/**/*.ts 2>/dev/null | head -5 && \ ls src/**/*.py 2>/dev/null | head -5 # Import style (JS/TS) echo "Import Style:" && \ grep -h "^import" src/**/*.ts 2>/dev/null | head -5 # Export style (JS/TS) echo "Export Style:" && \ grep -h "^export" src/**/*.ts 2>/dev/null | head -5 # Test file location echo "Test Location:" && \ find . -name "*.test.*" -o -name "*.spec.*" -o -name "test_*.py" 2>/dev/null | head -5
---
Phase 6: Generate Report
Based on all findings, generate this report structure:
# Repository Analysis Report **Generated:** [timestamp] **Repository:** [name from git remote or directory] ## Overview | Attribute | Value | |-----------|-------| | Type | [Monorepo / Full-Stack / Frontend / Backend] | | Language | [TypeScript / Python / ...] | | Framework | [React / FastAPI / ...] | | Package Manager | [npm / pnpm / uv / pip] | ## D
Turn Claude Code into a self-reviewing, test-enforced engineering system that remembers context across sessions — then route work across 13 models from a single dashboard.
Repo: alinaqi/claude-bootstrap
Other commands on maggy.
- /analyze-workspace
Full dynamic analysis of workspace topology, dependencies, and contracts.
Open command - /build-in-public
Build-in-Public — generate posts from your engineering work, anonymize, and schedule via Buffer
Open command - /check-contributors
Checks who's working on the project and optionally converts to a multi-person project with team state management.
Open command - /icpg-bootstrap
Infer ReasonNodes from existing git commit history. One-time setup for existing codebases.
Open command - /icpg-drift
Run a full drift scan and display all unresolved drift events, grouped by dimension and sorted by severity.
Open command - /icpg-impact
Show the blast radius of a ReasonNode or symbol — what depends on it, what breaks if it changes.
Open command

