agentleFS
edjchapmanedjchapman/claude-code-config/skills/project-setup/SKILL.md

project-setup

Skill8 starsChanged 19 days agoMITView on GitHub

Bootstrap a new repository end-to-end, or install this config's tooling into an existing one. Use when starting a new repo, or when applying the quality gate, git hooks, CI, and branch protection to a project that already exists.

48 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use creative-writing-craft, creative-writing-muse and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Abdullokh-NSkill

    creative-writing-craft

    Справочник ремесла: проза, сцена, стиль, голос. Загружать, когда нужно знание "как писать", а не режим производства.

    Also in 3 projects that use this

  • Abdullokh-NSkill

    creative-writing-muse

    Точка входа в набор скилов для длинной прозы. Включается, когда автор просит спланировать, написать, продолжить, переписать или разобрать художественный текст — роман, повесть, цикл рассказов. Ведёт маршрут от замысла к готовому куску и держит базу знаний проекта.

    Also in 3 projects that use this

  • badgidsSkill

    character-sim

    Pressure-test a character by speaking or reasoning strictly from that character's current voice, goals, relationships, emotional pressure, and knowledge boundary without creating canon by accident.

    Also in 3 projects that use this

  • jpsweeney97Skill

    writing-principles

    Enforces writing principles for instruction documents (SKILL.md, skill supporting files, subagents, CLAUDE.md). Use when writing, reviewing, or editing any file in **/skills/**/*.md, **/agents/*.md, or **/CLAUDE.md. Triggers on skill creation, skill file updates, CLAUDE.md changes, subagent authoring, or instruction document review.

    Also in 3 projects that use this

  • ItsSidharthaSkill

    story-planning

    Collaborative planning skill for a GitHub issue. Takes issue content and codebase context as input. Runs an iterative clarification loop until the user explicitly agrees to a plan, then saves it to docs/<story_number>/plan.md. Used by the user-story-implementation skill — load this skill at the start of Phase 1 and follow it completely before returning to the orchestrator.

    Also in 3 projects that use this

  • badgidsSkill

    story-review

    Diagnose existing prose at a chosen editorial level, from whole-story and developmental problems through scene, line, copy, and proof passes, without rewriting until the diagnosis is accepted.

    Also in 3 projects that use this

  • +4 more from Abdullokh-N

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 40 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Ask what the environment cannot tell you.

    line 47
  2. Distinctive:

    Round 2 — conditional on round 1: Only what the shape makes relevant: dependency automation, release/versioning, docs, published artifacts, …

    line 54
  3. Very specific:

    Commit .claude/settings.json and .claude/hooks/ — the Claude-on-web bootstrap needs them in the repo.

    line 95
  4. Very specific:

    Create CONTEXT.md and docs/adr/ lazily — at the first term or decision worth recording.

    line 116
  5. Very specific:

    If that plugin is installed, run /setup-matt-pocock-skills once in the new repo.

    line 125

“Common” is measured: kept by at least 6 in 10 of the 40 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Project Setup

Environment

!bash "${CLAUDE_SKILL_DIR}/detect-env.sh"

Facts come from the block above; only decisions go to the user.

Invariants

These hold for every repo. The default column is today's recommendation, not a mandate — propose it, let the user swap the tool, keep the invariant.

InvariantTest that it holdsDefault
One command runs the full quality gateThat command exits 0make check
The gate runs locally and in CIA local hook and a CI job both invoke itpre-commit + GitHub Actions
A local hook mechanism never silently shadows a global onecore.hooksPath unset, or set with the user's knowledgerun the layers separately
Personal config stays out of git, shared config stays in.gitignore names only the personal pathssee .gitignore below
The gate is green before the first commitGate exits 0 on a clean tree—

Additional invariants when the host is GitHub:

InvariantTest that it holdsDefault
The permanent commit subject is validated, not merely warned aboutA non-conforming subject fails the check--strict in commit-style.yml + .githooks/commit-msg
main is protected and history stays linearDirect push to main is rejectedmain-protection ruleset
The maintainer cannot be locked outAn always-bypass entry exists for the userRepositoryRole id 5 (admin)
The process proves itselfThe setup change itself landed through the processbranch → PR → checks → squash

Under squash-merge the PR title becomes the permanent commit subject; branch commits are disposable WIP. A brand-new repo has no legacy runway, so promote commit style to strict immediately rather than leaving it warn-only.

Required status checks are job names, not workflow names — renaming a job orphans the requirement.

Interview

Ask what the environment cannot tell you. Use AskUserQuestion, batched, and let later rounds depend on earlier answers — a throwaway spike should never be asked about a release process.

Round 1 — shape. What is this for (spike / tool / library / service)? Host (GitHub / other / local-only)? Visibility? Licence?

Round 2 — conditional on round 1. Only what the shape makes relevant: dependency automation, release/versioning, docs, published artifacts, a CI matrix.

Then propose the concrete setup — tool by tool, with the default named and the invariant it serves — and let the user swap any of it before anything runs.

Question every tool choice rather than assuming this repo's defaults still fit: the gate runner (make / just / npm scripts / task), the local hook manager (pre-commit / lefthook / husky / native .githooks), and CI (GitHub Actions / alternatives). The invariants outlive all of them.

Confirm before irreversible actions

Creating a remote, changing merge policy, and writing a ruleset reach outside the working tree. Confirm each with the user immediately before running it.

Layers

Two layers, distinguished by how updates reach a project (see CONTEXT.md):

  • Claude layer — received by reference. Updates to this repo propagate. <repo>/scripts/setup-project.sh <template> [more...]
  • Tooling layer — received by copy. Updates never propagate; re-run to refresh. <repo>/scripts/install-tooling.sh <stack>

setup-project.sh <type> --tooling runs both. It copies the git hooks but does not activate them; --git-hooks does that, and is opt-in because a repo-local core.hooksPath shadows a global dispatcher. install-tooling.sh declines to wire it when a global one exists.

With a global dispatcher in play, satisfy the "gate runs locally" invariant by invoking the gate from the existing hook manager instead — e.g. a repo: local pre-commit hook running make check (language: system, pass_filenames: false).

Inspect before applying: --list, --dry-run <template>, --check <template>, --status.

.gitignore

Commit .claude/settings.json and .claude/hooks/ — the Claude-on-web bootstrap needs them in the repo. Ignore only the personal paths: .claude/{agents,skills,rules}, .claude/settings.local.json, .mcp.json. Never blanket-ignore .claude/.

Order

  1. Claude layer, then tooling layer.
  2. Wire the gate to the stack's fmt + lint + test; run it green.
  3. Manifest hygiene — name per ecosystem convention, plus description, licence, readme, repository fields; pin the minimum toolchain to what is installed.
  4. Standard files — README (quick start, gate command, CI badge), LICENSE, CONTRIBUTING, and where the host supports them a PR template and dependency automation. Add toolchain-install and cache steps to the CI workflow.
  5. First commit, then the remote.
  6. Host policy — merge method, branch protection, maintainer bypass.
  7. Land this setup through the process itself. After a squash merge use git branch -D — ancestry never records the merge, so -d refuses.
  8. Vendored-plugin setup (below), if the plugin is installed.

Create CONTEXT.md and docs/adr/ lazily — at the first term or decision worth recording.

Vendored-plugin setup

Several mattpocock-skills skills — to-spec, to-tickets, triage, implement, wayfinder — read per-repo configuration that does not exist until it is scaffolded: which issue tracker the repo uses, the triage label strings, and where domain docs live. Without it they interrogate the user from scratch in every new repo, or guess.

If that plugin is installed, run /setup-matt-pocock-skills once in the new repo. It writes docs/agents/{issue-tracker,triage-labels,domain}.md. Defer to it rather than writing those files here: it owns their contract, and a copy kept in this skill would rot silently the next time the pin moves (ADR-0003).

It is prompt-driven and cannot run silently. Skip it where the plugin is absent — including plugin-mode installs of this repo, which never receive it — and say so.

Related

  • Global install: <repo>/scripts/setup-global.sh (ADR-0002).
  • MkDocs style layer: /mkdocs-style.
  • Full script and flag reference: docs/architecture.md.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.