Use when creating or scaffolding a NEW public bitranox Python library - a pip-installable package with a rich-click CLI, CI across Python 3.9-3.14 on Linux/macOS/Windows, and a PyPI release - or when installing or using a library built from the bitranox_template_py_lib template. Keywords - new library, scaffold, project template, rename-project, bmk, make test, make release, uv pip install.
How this skill is triggered — by the user, by Claude, or both
Slash command
/bitranox-template-py-lib:new-public-python-libraryThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Do not hand-build a new public Python library. Clone the template
Do not hand-build a new public Python library. Clone the template
bitranox_template_py_lib (https://github.com/bitranox/bitranox_template_py_lib),
rename it to your package, and you inherit a working layout, strict typing, a
CLI, and a full CI/test/release pipeline. This skill is the scaffold-install-use
sequence plus the pitfalls that a from-memory guess gets wrong.
Not for: an application/service (use the app template), or a one-off script.
The rename is driven by the directory name, so name the new directory for your package first. Copy the template, detach the template remote, rename, then reset the history.
# copy the template into a new dir named for your package
git clone --depth 1 https://github.com/bitranox/bitranox_template_py_lib.git lib_wombat
cd lib_wombat
git remote remove origin # detach from the template so nothing pushes back to it
git branch -m master main # NEW repos use main, never master
git config core.fileMode false # softdev mount: manage exec bits explicitly
./rename_dry.sh # PREVIEW: rename-project --dry-run. Confirm the detected name/paths
# read "lib_wombat" everywhere before applying.
./rename.sh # APPLY: rename-project --yes. Takes NO argument - the new name comes
# from the directory, so `./rename.sh lib_wombat` does nothing.
./reset_git_history.sh # squash the template history into one fresh commit
rename.sh / rename_dry.sh run rename-project from
git+https://github.com/bitranox/rename_project.git via uvx. reset_git_history.sh
force-pushes to the first remote it finds, so detach the template origin first (above) or
it rewrites the template's own history; with no remote it rewrites local history only. Add
your own empty repo as origin and push main afterwards.
uv venv && source .venv/bin/activate # Windows: .venv\Scripts\Activate.ps1
uv pip install -e ".[dev]" # editable, with the dev toolchain
For installing a FINISHED library (as a user): uv pip install <name>, or
uv tool install <name> for the CLI, or uvx <name> to run without installing.
The template ships a rich-click CLI (two console commands plus python -m <pkg>)
and a small library API. Replace the placeholder behaviors with your own.
<pkg> info # print resolved package metadata
<pkg> hello # placeholder success path
<pkg> --help
import <pkg> as lib
lib.emit_greeting() # placeholder; swap for your real API
The Makefile is a thin bmk wrapper - do not edit it. Trailing args are forwarded;
make help lists everything.
make test # lint + pyright + import-linter + bandit + pip-audit + pytest
make push MSG="feat: ..." # test, commit, push (MSG= is the safe channel)
make bump-patch # bump X.Y.(Z+1); also bump-minor / bump-major
make release # tag + GitHub release; CI publishes to PyPI
CI, the PyPI publish workflow, and CodeQL come from .github/, managed by the
default_cicd_public template. Never hand-edit .github/*. To publish to PyPI, add a
Trusted Publisher on PyPI (owner, repo, workflow default_release_public.yml,
environment pypi) or set the PYPI_API_TOKEN secret.
A repo that ships a Claude Code skill (a skills/<name>/SKILL.md plus
.claude-plugin/plugin.json and marketplace.json) is a plugin marketplace. Two
consequences that a plain library does not have:
/plugin marketplace update is a git pull that can no longer fast-forward)..claude-plugin/plugin.json,
semver). Installs only re-fetch on a version change. Keep history append-only; never
squash or force-push a published marketplace.| Mistake | Fix |
|---|---|
./rename.sh lib_wombat (passing the name as arg) | Name the DIRECTORY; run ./rename.sh with no arg. |
Skipping ./rename_dry.sh | Always preview first; the dry-run is the safety check. |
reset_git_history.sh with the template as origin | It force-pushes to the first remote; git remote remove origin first. |
Keeping the master branch | New repos use main (git branch -m master main). |
Editing .github/* | Template-managed; change CI in default_cicd_public instead. |
Hand-editing the Makefile or version in code | Makefile is bmk-generated; bump only pyproject.toml. |
The template's docs go deeper - open them on the default branch (latest) under
https://github.com/bitranox/bitranox_template_py_lib/blob/master/docs/: installation.md,
usage.md, development.md, and the systemdesign/ reference. A repo you generate from the template
carries these same files locally, so inside your new project the plain docs/... paths resolve.
Guides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.
npx claudepluginhub bitranox/bitranox_template_py_lib --plugin bitranox-template-py-lib