This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Two things:
template-repo/— boilerplate pushed to GitHub as a template repository (targets Python projects)create-repo.sh— script that spins up new repos from that template via theghCLI
ghCLI installed and authenticated (gh auth login)jqinstalled
# Basic usage
./create-repo.sh <repo-name> [options]
# Dry-run (preview without touching GitHub)
./create-repo.sh experiment-xyz --dry-run
# With all options
./create-repo.sh ml-pipeline \
--org my-org \
--template template-repo \
--description "Some service" \
--topics ml,python,internal \
--private # or --public
--no-protect # skip branch protectionEnvironment variables as defaults: GITHUB_ORG, GITHUB_TEMPLATE_REPO.
- Creates repo from template via
gh repo create --template - Applies branch protection on
main: requires PRs, 1 approval, CODEOWNER review, stale review dismissal, conversation resolution, and CI jobs named "Lint" and "Tests" to pass - Enables Dependabot vulnerability alerts + automated security fixes
- Patches repo settings: squash+rebase merges only, auto-delete branches, no wiki/projects
- Adds comma-separated topics if
--topicswas passed - Creates custom issue labels (replaces GitHub defaults)
The template targets Python projects. The CI workflow (ci.yml) runs:
- Lint job:
ruff,black --check,isort --check-only - Tests job:
pytest --cov=src(needs lint to pass first) - Security scan job: Trivy FS scan for HIGH/CRITICAL findings
Branch protection references the job names Lint and Tests as required status checks — if you rename those jobs in ci.yml, update the protection payload in create-repo.sh:149 accordingly.
| What | Where |
|---|---|
| Required CI job names for branch protection | create-repo.sh lines 148–150 |
| Default issue labels | create-repo.sh setup_labels() function |
| CODEOWNERS team | template-repo/.github/CODEOWNERS |
| Dependabot ecosystems/schedule | template-repo/.github/dependabot.yml |
| Python version / linters | template-repo/.github/workflows/ci.yml |