pwp-bootstrap
Scannednpx machina-cli add skill shandar/pwp-plugin/pwp-bootstrap --openclawFiles (1)
SKILL.md
3.0 KB
Project Bootstrap Skill
This skill defines how to start a new project from scratch. Covers repository setup, folder structure, configuration, and the first commit.
Bootstrap Mindset
- Foundation before features. A well-initialized project saves hundreds of hours later.
- Conventions from day one. It's 10x harder to adopt conventions after code exists.
- Ship the skeleton first. Get the project building and deploying before writing features.
- Document decisions early. The first ADR is the cheapest to write.
Bootstrap Checklist
Phase 1: Repository Foundation (5 min)
- Git initialized
- Package manager configured
- .gitignore created
- First commit:
chore: initialize repository
Phase 2: Governance Files (5 min)
- README.md — name, description, quick start
- LICENSE
- .env.example with placeholder values
Phase 3: Tooling Configuration (10 min)
- TypeScript (strict mode)
- Linter (ESLint / Biome)
- Formatter (Prettier or equivalent)
- Build tool (Vite, Next.js, etc.)
Phase 4: Project Structure (5 min)
{project}/
├── src/
│ ├── components/
│ ├── lib/
│ ├── types/
│ ├── hooks/
│ ├── api/
│ └── styles/
├── public/
├── docs/plans/
├── tests/
├── .env.example
├── .gitignore
├── README.md
├── tsconfig.json
└── package.json
Phase 5: Hello World (5 min)
- Entry point created
- Builds successfully
- Runs locally
- TypeScript compiles cleanly
Phase 6: CI/CD Setup (optional, 10 min)
- GitHub Actions for build + type check
- Deploy pipeline configured
- Branch protection on main
CLAUDE.md Template
# Project: {name}
## Stack
- {Framework}: {version}
- {Language}: {version}
## Conventions
- Components: PascalCase, co-located with styles/tests
- Utilities: camelCase, in src/lib/
- Tests: co-located as {file}.test.ts
## Commands
- `npm run dev` — development server
- `npm run build` — production build
- `npm test` — run tests
- `npx tsc --noEmit` — type check
Anti-Patterns
| Anti-Pattern | Do This Instead |
|---|---|
| Starting with features, adding structure later | Structure first, features second |
| No .gitignore from start | Create in first commit |
| Copying config from another project blindly | Configure intentionally |
| Skipping "Hello World" verification | Verify build/run before features |
| No CI from start | Set up CI before first feature |
Source
git clone https://github.com/shandar/pwp-plugin/blob/main/skills/pwp-bootstrap/SKILL.mdView on GitHub Overview
pwp-bootstrap defines how to start a new project from scratch, covering repo setup, folder structure, configuration, and the first commit. It guides you through phases from initialization to CI/CD, ensuring a solid foundation before adding features.
How This Skill Works
It prescribes a phased approach: initialize the repository and package manager, add governance files, configure tooling (TypeScript in strict mode, ESLint, Prettier, and a build tool), establish the standard project structure, verify a Hello World build locally, and optionally configure CI/CD.
When to Use It
- Starting a brand-new project and need a clean, standard baseline.
- Initializing a repo from scratch and committing a baseline.
- Scaffolding an application with a consistent folder structure.
- Verifying a Hello World build and local run before adding features.
- Setting up CI/CD and governance files from the outset.
Quick Start
- Step 1: Initialize Git and a package manager, then commit the baseline (chore: initialize repository).
- Step 2: Add governance files and tooling config (TS strict, ESLint/Biome, Prettier, build tool).
- Step 3: Create the project structure, add a Hello World entry, verify build/run, and optionally enable CI/CD.
Best Practices
- Foundation first: initialize the repository and tooling before adding features.
- Follow the standard Phase 4 project structure to avoid ad-hoc folders.
- Enable TypeScript strict mode, a linter, and a formatter from day one.
- Validate with a Hello World entry point to ensure build and run work locally.
- Document decisions early and commit foundational changes (e.g., chore: initialize repository).
Example Use Cases
- Bootstrapping a new Next.js + TypeScript project with ESLint, Prettier, and a hello-world entry.
- Scaffolding a Node.js API skeleton with src/, tests/, and .env.example.
- Creating a reusable component library skeleton with components/, lib/, and docs/plans/.
- Initializing a frontend project with a standard folder layout (src/, public/, docs/) and CI hints.
- Wiring GitHub Actions for build and type checks, plus branch protection on main.
Frequently Asked Questions
Add this skill to your agents