project-setup
Skill1 starsChanged 3 months agoApache-2.0View on GitHub
Generate a deterministic, self-documenting Makefile for a Python project by detecting its toolchain (ruff, mypy/pyright, pytest, coverage) and package manager. Use this whenever the user wants a Makefile, a `make` build/test/lint interface, one-command project tasks, to scaffold or standardize a repo's developer commands, or to stop re-deriving how to run a project's checks each time. Emits build/test/lint/typecheck/coverage/check targets and delegates to a quality-gate or deploy script when present.
25 other projects use a version of this.
Adopted by
Most recently taken up by
- dleerdefi/claude-code-constructiontheir own version, first seen Oct 5, 2026
- sd0xdev/sd0x-harnesstheir own version, first seen Sep 26, 2026
- P-Essonam/maximin-skillstheir own version, first seen Sep 20, 2026
- adamjralph/skill-brokertheir own version, first seen Sep 19, 2026
- celestialdust/achilles-skillstheir own version, first seen Sep 10, 2026
- FiredMosquito831/my-writing-companiontheir own version, first seen Sep 9, 2026
Other versions25 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 25
- codewithmukesh/dotnet-claude-kit★ 750same name
- sd0xdev/sd0x-harness★ 191same name
- markshust/hcf★ 76same name
- ratacat/claude-skills★ 56same name
- dleerdefi/claude-code-construction★ 43same name
- wolverin0/claude-skills★ 41same name
- gricha/dangerous-skills★ 38same name
- oliwoodman/fable-skills★ 35same name
- shaunandrews/agent-skills★ 8same name
- xyphx/ShowMySkills-system★ 8same name
15 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- agent-core/AGENTS.mdAGENTS.md
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- behavioral-regression/AGENTS.mdAGENTS.md
- claude-foundation/AGENTS.mdAGENTS.md
- config/AGENTS.mdAGENTS.md
- corpora/AGENTS.mdAGENTS.md
- demo/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- examples/AGENTS.mdAGENTS.md
- experiments/AGENTS.mdAGENTS.md
- flow-corpus/AGENTS.mdAGENTS.md
- flow-protocol/AGENTS.mdAGENTS.md
- openspec/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- claude-foundation/CLAUDE.mdCLAUDE.md
- merge-gate-auditorSkill
- update-executive-reportSkill
- update-executive-reportSkill
- architecture-drift-guardSkill
- commonSkill
- corpus-guardianSkill
- dataset-lintSkill
- deploySkill
- e2e-matrix-sentinelSkill
- eval-corpus-forgeSkill
- hierarchical-recursive-brainstormSkill
- model-benchSkill
- openai-judgeSkill
- openspec-implementation-reviewSkill
- openspec-peer-reviewSkill
- openspec-quality-planSkill
- pre-pr-gateSkill
- quality-gateSkill
- refactoring-decomposerSkill
- repo-invariant-reviewSkill
- test-completeness-guardSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 21 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Run the deterministic generator.
- Very specific: line 39
Compose, don't duplicate: when scripts/quality-gate.sh exists the lint/typecheck/test/ coverage/check targets delegate to it (one source of …
“Common” is measured: kept by at least 6 in 10 of the 21 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.
Files
project-setup — Makefile writer
Turn a Python project's implicit toolchain into an explicit, committed Makefile so routine
tasks run as one deterministic command (make test, make check) instead of being re-inferred
each session. Detection is a pure function of the project's files; the emitted Makefile is
byte-stable and safe to extend by hand. The generator runs the model only once, at generation
time; the Makefile it writes needs zero inference to run thereafter.
1. Preconditions (input contract)
- A target project directory exists (default: the current directory).
- Optionally a
pyproject.tomland/or marker files (requirements.txt,poetry.lock,pdm.lock,uv.lock,pyrightconfig.json, atests/directory). Detection degrades gracefully: absent config just yields fewer targets — nothing is fabricated. - Python 3.10+ (
tomliis needed only on 3.10; 3.11+ uses stdlibtomllib).
2. Procedure (the E2E steps)
Run the deterministic generator; do not hand-write the Makefile.
python scripts/gen_makefile.py --root <project> [--workspace] [--out <path>] [--stdout] [--check]- Inspect the project: package manager, ruff/mypy/pyright/pytest/coverage config,
src/vs flat layout, the coverage source andfail_underthreshold, and whether siblingscripts/quality-gate.sh/scripts/deploy.shalready exist. - Emit a Makefile with
.DEFAULT_GOAL := help,.DELETE_ON_ERROR,.PHONYon every phony target,?=overridable variables, a self-documentinghelptarget, andinstall/format/lint/typecheck/test/coverage/check/build/clean(plusdeploy) as detected. - Compose, don't duplicate: when
scripts/quality-gate.shexists the lint/typecheck/test/ coverage/check targets delegate to it (one source of truth); otherwise they emit the tool commands inline so the Makefile stands alone. - Monorepo (
--workspace, optional): members are the immediate-child directories with their ownpyproject.toml(a pure, sorted filesystem observation — nested fixture trees never match; symlinks excluded). The root Makefile gains explicitcheck-<member>targets ($(MAKE) -C <member> check, so each member's tool configs resolve in its own cwd — and only for members whose own Makefile has achecktarget), aggregatecheck-all/install-all/clean-all, and every member gets its own single-package Makefile.install-allandclean-allalso delegate per member ($(MAKE) -C <member> install|clean) so each member's DETECTED install command — dev extras, poetry, and so on — is honoured.--checkthen iterates ALL artifacts. Environment variables (e.g.HYPOTHESIS_PROFILE) propagate through$(MAKE) -Cuntouched. - Review the generated files with the user and commit them. They are scaffolds — extend freely.
3. Output contract (postconditions — what "done" means)
- A Makefile is written at
--out(default<root>/Makefile), ending in exactly one newline, with LF line endings and hard-TAB-indented recipes (Make rejects spaces). - Re-running on an unchanged project produces a byte-identical file (no timestamps).
make helplists the available targets;make checkruns the aggregate quality gate.- Targets POSIX/GNU make (Linux, macOS, WSL).
4. Failure handling
- A missing or malformed
pyproject.tomlis not an error: detection returns safe defaults and the Makefile still emitshelp,install, andclean. --checkis advisory (see §5), never a hard gate — the Makefile is meant to be edited.
5. --check is advisory, not a gate
--check exits 1 when the committed Makefile differs from a fresh render — useful as an optional
drift signal for teams who choose to keep the file fully generated. Because the Makefile is a
scaffold users extend, do not wire --check into CI as a blocking gate by default.
6. Validation gate (before declaring success)
You are not done until this exits 0:
python scripts/validate_skill.py --skill . --tier structural,behavioral7. Examples
Example 1 — src-layout pip project
Input: a project with [tool.ruff], [tool.mypy], [tool.pytest.ini_options],
[tool.coverage], and src/.
Output: a Makefile whose typecheck runs mypy src, whose coverage enforces the detected
--cov-fail-under, and whose check chains lint typecheck test.
Example 2 — delegation
Input: a project that already has scripts/quality-gate.sh.
Output: a Makefile whose check target is ./scripts/quality-gate.sh all (no duplicated commands).
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.

