From vibe-coding
Bootstrap a project with CI/CD, pre-commit hooks, CLAUDE.md, and framework best practices. Use when setting up a new project, adding CI pipelines, configuring husky/lint-staged, initializing CLAUDE.md, or applying Vercel best practices. Triggers on "bootstrap project", "setup CI", "add pre-commit hooks", "add husky", "setup linting", "add code coverage", "project setup", "init CLAUDE.md", or when starting a new codebase that needs infrastructure.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vibe-coding:bootstrap-projectThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Ensure a project has CI, pre-commit hooks, CLAUDE.md, and framework best practices configured. Detect what exists, add what's missing.
Ensure a project has CI, pre-commit hooks, CLAUDE.md, and framework best practices configured. Detect what exists, add what's missing.
Read package.json to determine:
pnpm-lock.yaml, yarn.lock, bun.lockb/bun.lock, package-lock.json)lint, test, build, typecheck, format)husky, lint-staged, eslint, prettier, vitest, jest)next, react, vue, svelte)Check for existing config:
.github/workflows/ci.yml — CI already configured?.husky/ — Husky already initialized?Report findings to user before making changes.
Ensure .github/workflows/ci.yml exists with jobs for lint, typecheck, test with coverage, and build.
Read references/ci-workflow.md for the template and adaptation guide.
If a CI workflow already exists, diff it against requirements and only add missing steps. Do not overwrite existing workflows — merge into them.
Configure coverage thresholds in the test runner config (e.g., vitest.config.ts, jest.config.ts). LLM coding agents generate tests alongside code, so enforce high thresholds:
| Metric | Threshold |
|---|---|
| Statements | 80% |
| Branches | 80% |
| Functions | 80% |
| Lines | 80% |
CI must fail if coverage drops below these thresholds. See references/ci-workflow.md for configuration examples.
Add a separate coverage-report job that posts a coverage summary comment on pull requests. This runs after the main CI job and uses davelosert/vitest-coverage-report-action (Vitest) or MishaKav/jest-coverage-comment (Jest). See references/ci-workflow.md for the template and coverage reporter configuration.
Ensure husky and lint-staged are installed and configured with checks for lint, format, and typecheck.
Read references/husky-precommit.md for setup instructions.
Key decisions:
Ensure .claude/settings.json has a PreToolCall hook that blocks --no-verify and --no-gpg-sign in git commands. This prevents AI agents from bypassing pre-commit hooks.
Read references/claude-code-hooks.md for the configuration.
If .claude/settings.json already exists, merge the hooks into it — do not overwrite existing settings.
Also add a rule to the project's CLAUDE.md (create if it doesn't exist) reinforcing the instruction:
NEVER use --no-verify or --no-gpg-sign with git commands. Pre-commit hooks must always run. If a hook fails, fix the underlying issue instead of bypassing it.
Generate a project-level CLAUDE.md that gives Claude (and other AI agents) the context they need to work effectively in this codebase. If CLAUDE.md already exists, merge new sections into it — do not overwrite existing content.
Gather context first:
package.json for project name, description, scripts, and dependenciesREADME.md (if it exists) for project purpose and setup instructionsdocs/PRD.md and docs/ARCHITECTURE.md (if they exist) for domain and design contextWrite the following sections:
Project overview — One-paragraph description of what this project is, its purpose, and its primary technology stack.
Architecture — Brief summary of the architecture (monolith, monorepo, client-server, etc.), key directories, and how they relate. Reference docs/ARCHITECTURE.md if it exists rather than duplicating it.
Key commands — List the common development commands (dev, build, test, lint, typecheck, format) with the correct package manager prefix. Only include commands that actually exist in package.json scripts.
Code style and conventions — Note any conventions visible from the codebase: naming patterns (kebab-case files, PascalCase components), import style (absolute vs relative), test file location (__tests__/ vs co-located .test.ts), and any linter/formatter config.
Rules — Mandatory rules for AI agents working in this repo. Always include the hook guard rule from step 4. Add any other rules derived from the project's linter config or existing CLAUDE.md content.
Keep the file concise — aim for under 80 lines. Prefer short bullet points over prose. Do not include information that's already obvious from file names or standard framework conventions.
Install Vercel's agent skills for framework-specific guidance.
Read references/vercel-best-practices.md for details.
Skip if the project doesn't use Vercel or a Vercel-supported framework.
After setup, verify everything works:
# Pre-commit hook fires correctly
git add -A && git commit --dry-run
# CI workflow is valid YAML
cat .github/workflows/ci.yml | python3 -c "import sys, yaml; yaml.safe_load(sys.stdin)"
# Scripts exist and run
<run-command> lint
<run-command> test
<run-command> build
Report results to user.
If the project lacks lint/format/test tooling, suggest and install sensible defaults:
| Tool | Default | When |
|---|---|---|
| Linter | eslint | No linter configured |
| Formatter | prettier | No formatter configured |
| Test runner | vitest | No test runner configured |
| Typecheck | tsc --noEmit | TypeScript project, no typecheck script |
Ask the user before installing new tooling — do not assume.
npx claudepluginhub porkbutts/porkbutts-n-taters --plugin effective-designBootstraps new projects interactively (Node/TS scripted, others manual) or adds enforcement tooling (TDD, secret scanning, file limits, git hooks, CLAUDE.md) to existing projects.
Bootstraps or updates projects for Claude Code — generates CLAUDE.md with progressive disclosure docs, installs auto-format hooks, sets up test infrastructure, audits existing docs against source code. Supports single projects, monorepos, and multi-repo workspaces.
Bootstraps new projects or improves existing ones with best practices for structure, git, documentation, testing, code quality, dependencies, dev workflow, and CI/CD.