Agent skill

scaffold

Detect project stack, apply architecture patterns, wire quality gates, and scaffold features. Use when bootstrapping a project, adding a vertical slice, wiring CI/CD, adding Docker compose, or setting up quality gates.

Stars 6
Forks 3

Install this agent skill to your Project

npx add-skill https://github.com/BerryKuipers/claude-code-toolkit/tree/main/.claude/skills/scaffold

SKILL.md

Scaffold

Detect the current project's stack and apply toolkit architecture patterns, quality gates, and scaffolding.

When to Apply

  • Scaffolding a new vertical slice or feature module
  • Wiring or updating CI/CD pipelines
  • Adding or modifying Docker Compose services
  • Refactoring shared utilities or extracting common code
  • Setting up or running quality gates (lint, type-check, test, build)
  • Applying layered architecture (routes -> services -> repositories)
  • Reviewing code against SOLID and clean-code principles
  • Bootstrapping a new project with toolkit standards

Step 1: Detect Project Context

Before making any changes, inspect the current repository:

  1. Read package.json, *.csproj, Cargo.toml, go.mod, or equivalent to determine language and framework
  2. Check for existing CLAUDE.md, .claude/rules/, .claude/settings.json
  3. Scan for docker-compose*.yml, Dockerfile, .github/workflows/
  4. Identify the package manager (npm, yarn, pnpm, bun)
  5. Identify the test runner (jest, vitest, pytest, go test)
  6. Check for monorepo indicators (workspaces, turbo.json, nx.json, lerna.json)

Summarize findings before proceeding.

Step 2: Apply Architectural Patterns

Based on project type, enforce these layered architecture rules:

Backend (Node.js / TypeScript)

  • HTTP layer (routes/controllers): thin adapters only, no business logic, no direct DB access
  • Service layer: business logic, orchestration, validation
  • Repository layer: data access, ORM encapsulation, query building
  • Dependency direction: routes -> services -> repositories (never reverse)

Frontend (React / TypeScript)

  • Components: presentational, no direct API calls in render
  • Hooks: data fetching, state management, side effects
  • Services: API client wrappers, data transformation
  • State: colocate state; lift only when shared

General

  • TypeScript strict mode, explicit return types on public APIs
  • ES modules everywhere (never CommonJS)
  • Named exports preferred over default exports
  • Error types over generic throws

Step 3: Quality Gate Checklist

Run these checks in order (fast-fail):

1. [ ] TypeScript / type-check passes     (npx tsc --noEmit OR equivalent)
2. [ ] Linting passes                      (npm run lint OR equivalent)
3. [ ] Tests pass                          (npm test OR equivalent)
4. [ ] Build succeeds                      (npm run build OR equivalent)
5. [ ] No new lint warnings introduced
6. [ ] Coverage >= project threshold

If any check fails, stop and fix before proceeding.

Step 4: Verify and Report

After completing changes:

  1. Re-run the quality gate checklist
  2. Summarize what was changed and why
  3. List any remaining TODOs or follow-up items
  4. If creating a PR, ensure title is concise (<70 chars) and body includes a test plan

Available Toolkit Skills

The toolkit provides specialized skills for common tasks. Invoke them when relevant:

  • quality-gate: Full quality validation (tests + lint + types + build + audit)
  • validate-build: Build-only validation
  • validate-typescript: Type-checking only
  • validate-lint: Lint-only validation
  • run-comprehensive-tests: Test execution with coverage
  • commit-with-validation: Git commit with pre-flight checks
  • create-pull-request: PR creation with template
  • audit-dependencies: Security audit of dependencies
  • infrastructure: Deployment orchestration (DNS, VPS, Docker)

Adaptation Notes

This skill adapts to any project. If the project uses:

  • Python: substitute mypy for tsc, ruff/black for eslint, pytest for jest
  • Go: substitute go vet for tsc, golangci-lint for eslint, go test for jest
  • Rust: substitute cargo check for tsc, cargo clippy for eslint, cargo test for jest
  • Other: detect and adapt tooling from project config files

Expand your agent's capabilities with these related and highly-rated skills.

BerryKuipers/claude-code-toolkit

validate-typescript

Run TypeScript compiler type-checking (tsc --noEmit) to validate type safety and catch type errors. Returns structured output with error counts, categories (type/syntax/import errors), and affected files. Used for quality gates and pre-commit validation.

6 3
Explore
BerryKuipers/claude-code-toolkit

validate-coverage-threshold

Validate test coverage meets minimum thresholds (default 80% overall, 80% statements, 75% branches, 80% functions). Parses coverage reports from coverage/coverage-summary.json or test output. Returns pass/fail status with detailed metrics and identifies uncovered files.

6 3
Explore
BerryKuipers/claude-code-toolkit

quality-gate

Comprehensive quality validation for TypeScript/JavaScript projects - runs TypeScript checks, tests, coverage analysis, build validation, and linting with structured JSON results

6 3
Explore
BerryKuipers/claude-code-toolkit

run-comprehensive-tests

Execute comprehensive test suite (Vitest/Jest) with coverage reporting and failure analysis. Returns structured output with test counts (total/passed/failed), coverage percentage, duration, and detailed failure information. Used for quality gates and CI/CD validation.

6 3
Explore
BerryKuipers/claude-code-toolkit

validate-build

Run production build validation (npm run build, vite build, tsc) to ensure code compiles and builds successfully. Returns structured output with build status, duration, size metrics, and error details. Used for quality gates and deployment readiness checks.

6 3
Explore
BerryKuipers/claude-code-toolkit

validate-lint

Run ESLint and Prettier validation to check code style, formatting, and best practices. Returns structured output with error/warning counts, rule violations, and affected files. Used for code quality gates and pre-commit validation.

6 3
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results