From trousse
Orchestrates new repo creation — required before setting up any batterie Python package. 5-step workflow (interview, plan, init script, CLAUDE.md fill-in, conformance validation) ensures every repo starts with hatchling, src layout, bon, and working tests. Handles greenfield, adopt, and extract modes. Triggers on 'create a repo', 'new project', 'scaffold', 'init repo', 'set up a new package', 'make this a proper repo'. (user)
npx claudepluginhub spm1001/batterie-de-savoir --plugin trousseThis skill is limited to using the following tools:
Creates well-formed batterie-de-savoir Python repos from a checklist derived from building 10+ repos. Every new repo starts at the same baseline — git, hatchling, src layout, tests, CLAUDE.md, bon, GitHub remote.
Scaffolds full projects from PRD + stack templates: directory structure, configs, CLAUDE.md, git repo init, GitHub push. Studies existing projects via SoloGraph, uses Context7 for library versions.
Generates complete production-ready projects from descriptions: directory structure, code, tests, docs, config, git init. Orchestrates pipeline with verification to ensure builds and tests pass.
Initializes new Python, Rust, or TypeScript projects interactively with git repo, GitHub workflows, pre-commit hooks, Makefile, and standard configs. Updates existing projects too.
Share bugs, ideas, or general feedback.
Creates well-formed batterie-de-savoir Python repos from a checklist derived from building 10+ repos. Every new repo starts at the same baseline — git, hatchling, src layout, tests, CLAUDE.md, bon, GitHub remote.
Iron Law: Structure is deterministic. Meaning is not. The init script creates the skeleton; you fill in the CLAUDE.md content that makes the repo navigable.
/close suggests this when detecting code in a non-repo directory.claude-plugin/, skills/) — that's a different concernDetermine the mode and gather inputs.
Ask the user:
Detect the mode:
.git/For adopt, list existing files and confirm they'll be preserved (moved into src/<pkg>/).
For extract, identify the source module and confirm what's moving.
Show the user what will be created:
Scaffold plan for <name>:
Mode: greenfield / adopt / extract
Package: src/<pkg>/
Bon prefix: <prefix>
GitHub: spm1001/<name> (public)
Files to create:
pyproject.toml — hatchling, src layout, pytest config
src/<pkg>/__init__.py — importlib.metadata version
.gitignore — Python standard
tests/__init__.py — empty
tests/conftest.py — stub
CLAUDE.md — [TODO] sections for you to fill
.bon/ — work tracker
.bon/understanding.md — seed
[adopt only] Existing files to relocate:
<list>
Confirm with user before proceeding.
Greenfield:
uv run --script ${CLAUDE_SKILL_DIR}/scripts/init_repo.py \
--name <name> --prefix <prefix> --description "<desc>"
Adopt:
src/<pkg>/ (preserve structure)init_repo.py with --dir pointing to the working directory
Extract:
src/<pkg>/init_repo.pyThe init script leaves [TODO] markers. Replace each one with project-specific content:
Module Map — list every module under src/<pkg>/ with a one-line role description. Use a table:
| Module | Role |
|--------|------|
| `parsing` | JSONL loading, entry type classification |
| `content` | System tag stripping, assistant content extraction |
Key Conventions — document the things a future Claude needs to know:
__init__.py?)For adopt/extract mode, also note the origin of the code and any context about why it was extracted.
uv run --script ${CLAUDE_SKILL_DIR}/scripts/validate_repo.py
Review the report. Fix any FAIL items. Re-run until all checks pass.
If validate_repo.py doesn't exist yet, manually verify:
main branch (not detached HEAD).gitignore present with Python patternspyproject.toml: hatchling backend, src layout, [dependency-groups] dev, pytest configsrc/<pkg>/__init__.py with __version__ via importlib.metadatatests/ with conftest.pyCLAUDE.md present, no remaining [TODO] markers.bon/ initialized with correct prefixDerived from cross-repo survey of 10 batterie repos (April 2026) and every mistake made building deglacer:
| Item | Why |
|---|---|
git init -b main | Never detached HEAD |
.gitignore | Python bytecode, build artifacts, venv |
pyproject.toml with hatchling | Single version source, src layout |
[dependency-groups] dev | Separate dev deps from runtime |
[tool.pytest.ini_options] | pythonpath = ["src"] avoids import errors |
src/<pkg>/__init__.py | importlib.metadata version — no hardcoded version |
tests/__init__.py + conftest.py | Test infrastructure ready from day one |
CLAUDE.md | Orientation, quick commands, module map, conventions |
bon init --prefix | Work tracker from the start |
.bon/understanding.md | Knowledge accumulation seed |
gh repo create | HTTPS remote, ready to push |
| Mistake | What Happens | Better |
|---|---|---|
| Hardcoded version in pyproject.toml | Dual-maintenance drift | importlib.metadata pattern |
Missing pythonpath = ["src"] in pytest config | Import errors in tests | Always include it |
No .gitignore | __pycache__ committed | Create before first commit |
setuptools instead of hatchling | Inconsistent with suite | Hatchling everywhere |
Flat layout instead of src/ | Import confusion in tests | Always src/<pkg>/ |
| Skipping bon init | No work tracker | Init with prefix immediately |
| CLAUDE.md with just the name | Useless orientation | Fill in module map and conventions |