build-project-setup
Skill0 starsChanged 12 days agoMITView on GitHub
Onboard a repo for AI coding assistants (lean CLAUDE.md/AGENTS.md with verified commands, conventions, gotchas) and scaffold new projects (lockfile, formatter, linter, tests, pre-commit, CI, .gitignore, .editorconfig, README) without overwriting files. Use when starting a project, onboarding Claude, or creating or trimming CLAUDE.md/AGENTS.md. Not for pipeline design (use `ship-ci-cd`).
- Reads credentials
In this repository33 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- global/CLAUDE.mdCLAUDE.md
- build-backendSkill
- build-commitsSkill
- build-containersSkill
- build-databaseSkill
- build-design-systemSkill
- build-frontendSkill
- build-iacSkill
- core-documentationSkill
- core-prompt-engineeringSkill
- core-token-efficiencySkill
- create-marketing-copySkill
- create-seo-contentSkill
- operate-incidentSkill
- operate-observabilitySkill
- plan-architectureSkill
- plan-campaignSkill
- plan-codebase-analysisSkill
- plan-test-strategySkill
- plan-threat-modelSkill
- review-pull-requestSkill
- review-seoSkill
- review-ui-uxSkill
- secure-code-reviewSkill
- secure-repo-governanceSkill
- secure-supply-chainSkill
- ship-ci-cdSkill
- ship-github-actionsSkill
- ship-readinessSkill
- ship-releaseSkill
- test-performanceSkill
- test-validationSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Test runner with one real passing test.
- Distinctive: line 27
Validate: run install, format check, lint, typecheck and tests from a clean state.
- Very specific: line 41
Write rules as imperative, testable statements: "Run pnpm test -- <file> for a single test", not "Testing is important".
- Distinctive: line 51
Never overwrite or delete an existing file (instruction files, configs, README, CI).
- Very specific: line 52
Never run project generators (create-*, init, new) in a non-empty directory without asking.
- Distinctive: line 53
Ask before adding any dependency, dev tool or pre-commit hook.
- Distinctive: line 54
Ask before running commands that touch databases, cloud resources, package registries or remote git.
- Very specific: line 55
Do not write secrets into any file.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project Setup
Make a repository fast and safe to work in: verified commands, explicit conventions, and the minimum tooling that catches mistakes.
Procedure
- Inventory first.
git status, branch, and list existing:CLAUDE.md,CLAUDE.local.md,AGENTS.md,.claude/(settings, rules, skills, agents),.cursor/rules,.github/copilot-instructions.md,CONTRIBUTING.md,README,.editorconfig,.gitignore,.gitattributes, lint/format/test configs, pre-commit config, CI workflows, lockfiles, version files (.nvmrc,.python-version,.tool-versions,rust-toolchain.toml,global.json). Existing files are inputs to merge, not to replace. - Classify the job: (a) onboarding an existing repo - go to 3; (b) new project - go to 7; (c) both.
- Discover real commands from manifests (
package.jsonscripts,Makefile,justfile,Taskfile.yml,pyproject.toml,tox.ini,noxfile.py), CI workflows (the most trustworthy source: they actually run) and README. Identify install, build, run, test (all and single test), lint, format, typecheck, migrate, codegen. - Verify commands by running the cheap, side-effect-free ones (lint, typecheck, single unit test,
--help). Record the outcome. Never run deploy, migrate against a shared DB, publish or seed commands to verify them; mark them "not verified". - Collect what is non-obvious: conventions that differ from the ecosystem default, generated files that must not be edited, required env vars (names only), services needed for tests, flaky areas, ordering rules (codegen before build), monorepo package boundaries, protected branches and commit format.
- Write or update the instruction file following Rules and
references/claude-md-template.md(read it when creating or restructuring an instruction file). Show the proposed content or diff and get approval before overwriting an existing file. - New project scaffolding (only what the user asked for plus the essentials below). Read
references/toolchains.mdwhen choosing per-language tools and init commands. Essentials, in order:- Pin the runtime version (version file and/or
engines/requires-python/godirective). - Package manager with a committed lockfile.
.gitignorefor the language, OS and editor files,.env*except.env.example..editorconfigand.gitattributes(* text=auto eol=lf, binary types marked).- Formatter and linter with config, plus typechecker where the language has one.
- Test runner with one real passing test.
- Pre-commit hook running format and lint on staged files (fast; heavy checks stay in CI).
- CI running the same commands as local (hand to
ship-github-actionsorship-ci-cd). README.mdwith purpose, prerequisites, setup, run, test;.env.examplewith names and safe placeholder values.
- Pin the runtime version (version file and/or
- Validate: run install, format check, lint, typecheck and tests from a clean state; fix only setup problems.
- Report with the Output template.
Rules
- Instruction files are loaded into every session: every line costs tokens on every task. Target under ~100 lines for a root
CLAUDE.md; hard ceiling ~200. Move area-specific rules into subdirectoryCLAUDE.mdfiles or.claude/rules/; move procedures into skills; link to docs instead of copying them. - Include only what changes behaviour and cannot be cheaply discovered from the code:
Include Exclude Exact verified commands, especially single-test and pre-commit checks Generic advice ("write clean code", "add tests") Conventions that differ from defaults, with an exemplar path File-by-file descriptions of the tree Gotchas that caused real mistakes Content of README/docs (link instead) Do-not-touch: generated, vendored, migrations already applied Secrets, tokens, internal hostnames, personal data Architecture pointers (where X lives, which layer owns Y) Long examples, full style guides, changelogs Safety rules (ask before X), commit/branch format Aspirations that are not enforced - Write rules as imperative, testable statements: "Run
pnpm test -- <file>for a single test", not "Testing is important". - Mark unverified commands
(not verified); never invent commands, coverage numbers, architecture or deployment behaviour. - One source of truth across tools: if
AGENTS.mdalready exists, keep shared content there and haveCLAUDE.mdimport it (@AGENTS.md) plus Claude-specific notes, rather than duplicating. Do not createAGENTS.mdunless other agents are used or the user asks. - Personal or machine-specific notes go in
CLAUDE.local.md(gitignored), never in the shared file. - Permissions: put shared, safe allowlists (test, lint, read-only git) in
.claude/settings.json; never allow destructive or deploy commands by default. Hooks only for deterministic checks that must always run (format on edit, block edits to generated files), opt-in and fast. - Preserve existing conventions and tool choices. Changing formatter, linter, package manager or test framework is a separate, approved change.
- Formatter and linter must not fight: disable lint style rules that the formatter owns.
- Pin tool versions in config (dev dependencies, pre-commit
rev:) so local, hook and CI results match.
Safety gates
- Never overwrite or delete an existing file (instruction files, configs, README, CI). Propose a merge/diff and wait for approval.
- Never run project generators (
create-*,init,new) in a non-empty directory without asking; run them in an empty temp directory and copy selectively if needed. - Ask before adding any dependency, dev tool or pre-commit hook; state what it does and its maintenance cost.
- Ask before running commands that touch databases, cloud resources, package registries or remote git.
- Do not write secrets into any file;
.env.exampleholds placeholders only.
Output
## Setup summary
Stack: <languages, frameworks, package manager, runtime version>
Created: <files>
Updated (approved): <files and what changed>
Left unchanged: <existing files deliberately not touched>
## Verified commands
| Purpose | Command | Result |
|---|---|---|
## Not verified / unknown
- <command or fact> - <why>
## Follow-ups
- <e.g. add CI, branch protection, dependency updates>Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

