skills/scaffold/SKILL.md
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 skillsauth add spm1001/trousse scaffoldInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 |
tools
Orchestrates cross-machine repo hygiene + GitHub account cleanup via an audit→approve→execute process that prevents accidental deletion. FIRST sweeps every git repo across machines (local + ssh) for uncommitted/unpushed work and true ahead/behind drift, THEN audits GitHub-side — Dependabot alerts traced to unused-direct vs transitive deps, stale forks, orphaned secrets, failing workflows, plugin version-bump gaps. Triggers on 'clean up GitHub', 'audit my repos', 'uncommitted or unpushed changes', 'are my repos in sync', 'push discipline', 'Dependabot trouble', 'unused deps', 'stale forks', 'dependency audit'. Requires gh CLI (+ ssh for remote hosts). (user)
development
Deep clean and structural health check for Claude-maintained codebases. INVOKE BEFORE adding significant complexity, WHEN inheriting an unfamiliar repo, or when something feels off and you can't name it. Three agents — Cracks (architecture), Dustballs (convention drift), Goofs (correctness) — examine in parallel, then synthesise into an honest assessment. Triggers on 'toise', 'deep clean', 'health check', 'should I be worried', 'check this codebase', 'is the architecture sound'. (user)
development
Three-lens code review using parallel subagents: Epimetheus (hindsight — bugs, debt, fragility), Metis (craft — clarity, idiom, fit-for-purpose), Prometheus (foresight — vision, extensibility, future-Claude). Triggers on /titans, /review, 'review this code', 'what did I miss', 'before I ship this'. Use after completing substantial work, before /close. (user)
development
Controls InnerClaude instances on Sprites.dev VMs for testing workflows, install patterns, and Claude-to-Claude interaction. INVOKE BEFORE any 'sprite exec', 'inner Claude', 'test this workflow', 'Claude controlling Claude', or remote VM operations. Documents the critical tmux+pipe-pane pattern that makes OuterClaude/InnerClaude interaction work. Also covers checkpoint/restore and bootstrap. (user)