// Create best-in-class repository scaffolds with modern tooling, security, CI/CD, testing, and documentation. Works for code, data science, ontologies, APIs, and CLI projects.
| name | repo-scaffold-skill |
| description | Create best-in-class repository scaffolds with modern tooling, security, CI/CD, testing, and documentation. Works for code, data science, ontologies, APIs, and CLI projects. |
| version | 1.0.0 |
| license | CC-0 |
Use this skill to scaffold and maintain production-ready repositories that follow modern best practices. This skill guides you through creating repositories with:
Applicable to: Python libraries, APIs, CLI tools, data science projects, ontologies, LinkML schemas, and web applications.
When user says: "Set up new repo in this folder"
Execute this workflow:
For specific project types, prefer these blessed templates:
Use these templates as starting points. This skill complements them with additional best practices.
uv (fast, modern dependency resolver)ruff (replaces flake8, black, isort)mypy in strict modepytest with pytest-cov for coveragejust (for modern, readable task definitions)make (for pipelines and compatibility)mkdocs with Material theme (simple, beautiful)sphinx (for legacy projects)typer (modern, type-based, beautiful output)click (mature, widely used)rich (colorful, formatted terminal output)Ask these questions to understand project requirements:
For Python Library:
project-name/
โโโ .github/
โ โโโ workflows/
โ โ โโโ ci.yml
โ โ โโโ release.yml
โ โ โโโ security.yml
โ โโโ ISSUE_TEMPLATE/
โ โ โโโ bug_report.md
โ โ โโโ feature_request.md
โ โโโ pull_request_template.md
โโโ docs/
โ โโโ index.md
โ โโโ tutorials/
โ โโโ how-to/
โ โโโ reference/
โ โโโ explanation/
โโโ src/
โ โโโ project_name/
โ โโโ __init__.py
โ โโโ cli.py (if CLI tool)
โ โโโ core.py
โโโ tests/
โ โโโ unit/
โ โโโ integration/
โ โโโ fixtures/
โ โโโ conftest.py
โโโ .gitignore
โโโ .pre-commit-config.yaml
โโโ CHANGELOG.md
โโโ CODE_OF_CONDUCT.md
โโโ CONTRIBUTING.md
โโโ justfile (or Makefile)
โโโ LICENSE
โโโ mkdocs.yml
โโโ pyproject.toml
โโโ README.md
โโโ SECURITY.md
โโโ uv.lock
For Data Science Project:
project-name/
โโโ .github/workflows/
โโโ data/ # Git-ignored
โ โโโ raw/
โ โโโ processed/
โ โโโ results/
โโโ notebooks/ # Exploratory analysis
โโโ src/
โ โโโ project_name/
โ โโโ data/
โ โโโ features/
โ โโโ models/
โ โโโ visualization/
โโโ tests/
โโโ .dvc/ # If using DVC
โโโ pyproject.toml
โโโ README.md
For API Service:
project-name/
โโโ .github/workflows/
โโโ src/
โ โโโ project_name/
โ โโโ api/
โ โ โโโ routes/
โ โ โโโ dependencies.py
โ โโโ core/
โ โ โโโ config.py
โ โ โโโ security.py
โ โโโ models/
โ โโโ services/
โ โโโ main.py
โโโ tests/
โโโ docker-compose.yml
โโโ Dockerfile
โโโ pyproject.toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "project-name"
version = "0.1.0"
description = "Brief project description"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
authors = [
{name = "Your Name", email = "your.email@example.com"}
]
keywords = ["keyword1", "keyword2"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
# Runtime dependencies
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-xdist>=3.0.0",
"ruff>=0.1.0",
"mypy>=1.0.0",
"pre-commit>=3.0.0",
]
docs = [
"mkdocs>=1.5.0",
"mkdocs-material>=9.0.0",
"mkdocstrings[python]>=0.24.0",
]
[project.scripts]
project-name = "project_name.cli:main"
[project.urls]
Homepage = "https://github.com/org/project-name"
Documentation = "https://project-name.readthedocs.io"
Repository = "https://github.com/org/project-name"
Issues = "https://github.com/org/project-name/issues"
[tool.ruff]
line-length = 88
target-version = "py311"
src = ["src"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"S", # flake8-bandit (security)
]
ignore = []
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "ARG"] # Allow assert and unused args in tests
[tool.mypy]
strict = true
warn_unreachable = true
pretty = true
show_column_numbers = true
show_error_context = true
python_version = "3.11"
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --strict-markers --cov=src --cov-report=term-missing --cov-report=html"
testpaths = ["tests"]
markers = [
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
[tool.coverage.run]
source = ["src"]
omit = ["*/tests/*", "*/__pycache__/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies:
- types-requests
- types-PyYAML
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-merge-conflict
- id: check-added-large-files
args: [--maxkb=1000]
- id: detect-private-key
- id: check-case-conflict
- id: mixed-line-ending
# List available commands
default:
@just --list
# Install development environment
install:
uv venv
uv pip install -e ".[dev,docs]"
pre-commit install
@echo "โ Setup complete! Run 'just test' to verify"
# Run all tests
test:
pytest tests/ -v
# Run tests with coverage
test-cov:
pytest tests/ -v --cov=src --cov-report=html --cov-report=term-missing
@echo "Coverage report: htmlcov/index.html"
# Run only unit tests (fast)
test-unit:
pytest tests/unit/ -v
# Run only integration tests
test-integration:
pytest tests/integration/ -v -m integration
# Run linting
lint:
ruff check .
mypy src/
# Format code
format:
ruff format .
# Fix linting issues
fix:
ruff check --fix .
ruff format .
# Run type checking
typecheck:
mypy --strict src/
# Build documentation
docs:
mkdocs serve
# Build documentation for deployment
docs-build:
mkdocs build --strict
# Run all checks (simulate CI)
check: lint typecheck test-cov
@echo "โ All checks passed!"
# Clean build artifacts
clean:
rm -rf build/ dist/ *.egg-info htmlcov/ .coverage .pytest_cache .mypy_cache .ruff_cache
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
# Build package
build: clean
uv pip install build
python -m build
# Publish to PyPI (requires setup)
publish: build
uv pip install twine
twine upload dist/*
# Run security audit
security:
uv pip install pip-audit bandit
pip-audit
bandit -r src/
# Update dependencies
update:
uv pip compile pyproject.toml --upgrade
pre-commit autoupdate
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# Virtual environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Testing
.pytest_cache/
.coverage
.coverage.*
htmlcov/
.tox/
.nox/
coverage.xml
*.cover
# Type checking
.mypy_cache/
.dmypy.json
dmypy.json
.pytype/
# Ruff
.ruff_cache/
# IDEs
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# Documentation
site/
docs/_build/
# Data (for data science projects)
data/raw/
data/processed/
data/results/
*.csv
*.xlsx
*.parquet
# Models (for ML projects)
models/*.pkl
models/*.joblib
models/*.h5
models/*.pt
# Secrets
.env.local
.env.*.local
secrets/
*.key
*.pem
# Logs
logs/
*.log
# Temporary files
tmp/
temp/
*.tmp
# Project Name
Brief description of what this project does (1-2 sentences).
[](https://github.com/org/project-name/actions)
[](https://codecov.io/gh/org/project-name)
[](https://pypi.org/project/project-name/)
[](https://pypi.org/project/project-name/)
[](LICENSE)
## Features
* **Feature 1**: Specific description with metrics
* **Feature 2**: Concrete capability with example
* **Feature 3**: Technical detail with validation
* **Feature 4**: Performance characteristic with numbers
## Quick Start
### Installation
```bash
pip install project-name
from project_name import main_function
result = main_function(arg1, arg2)
print(result)
project-name --help
project-name command --option value
Full documentation: https://project-name.readthedocs.io
git clone https://github.com/org/project-name.git
cd project-name
just install
just test # Run all tests
just test-cov # Run tests with coverage
just lint # Run linting and type checking
just check # Run all checks (CI simulation)
See CONTRIBUTING.md for development guidelines.
This project is licensed under the MIT License - see LICENSE for details.
If you use this project in your research, please cite:
@software{project_name,
title = {Project Name},
author = {Your Name},
year = {2025},
url = {https://github.com/org/project-name}
}
### CONTRIBUTING.md Template
```markdown
# Contributing to Project Name
Thank you for your interest in contributing! This guide will help you get started.
## Development Setup
### Prerequisites
* Python 3.9 or higher
* git
* uv (recommended) or pip
### Setup Steps
1. Fork and clone the repository:
```bash
git clone https://github.com/your-username/project-name.git
cd project-name
just install
This will:
just check
Always work on a feature branch:
git checkout -b feature/your-feature-name
Branch naming convention:
feature/description - New featuresfix/issue-123 - Bug fixesdocs/description - Documentation changesrefactor/description - Code refactoringjust lint # Linting and type checking
just test # Run tests
just check # All checks
Use conventional commits format:
feat: add new feature
fix: resolve bug in module
docs: update API documentation
test: add tests for feature
refactor: improve code structure
chore: update dependencies
For breaking changes:
feat!: change API signature
BREAKING CHANGE: old_function() is now new_function()
just test # All tests
just test-unit # Only unit tests (fast)
just test-integration # Only integration tests
just test-cov # Tests with coverage report
Pre-commit hooks automatically run:
To run manually:
pre-commit run --all-files
git fetch origin
git rebase origin/main
git push origin feature/your-feature-name
Create Pull Request:
Address review comments:
Merge:
def function_name(arg1: str, arg2: int) -> bool:
"""Function docstring."""
...
Use Google style:
def calculate_total(items: list[Item], tax_rate: float = 0.08) -> float:
"""Calculate total price including tax.
Args:
items: List of items to calculate
tax_rate: Tax rate as decimal (default: 0.08)
Returns:
Total price including tax
Raises:
ValueError: If tax_rate is negative
Examples:
>>> calculate_total([Item(10.0)], 0.08)
10.8
"""
tests/unit/tests/integration/tests/fixtures/import pytest
from project_name import function
def test_function_success():
"""Test function with valid input."""
result = function("input")
assert result == "expected"
def test_function_error():
"""Test function with invalid input."""
with pytest.raises(ValueError):
function("invalid")
@pytest.mark.integration
def test_integration():
"""Integration test requiring external service."""
...
docs/tutorials/docs/how-to/docs/explanation/just docs # Starts local server at http://localhost:8000
This project follows the Contributor Covenant Code of Conduct.
### SECURITY.md Template
```markdown
# Security Policy
## Supported Versions
| Version | Supported |
| ------- | ------------------ |
| 1.x | :white_check_mark: |
| < 1.0 | :x: |
## Reporting a Vulnerability
**Please do not report security vulnerabilities through public GitHub issues.**
Instead, please report them via email to: security@example.com
You should receive a response within 48 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
Please include:
* Description of the vulnerability
* Steps to reproduce
* Potential impact
* Suggested fix (if any)
## Security Update Process
1. Vulnerability report received
2. Confirmation and assessment (within 48 hours)
3. Fix developed and tested
4. Security advisory published
5. Patch released
6. Users notified
## Security Best Practices
When using this project:
* Keep dependencies updated
* Use latest stable version
* Follow principle of least privilege
* Validate all inputs
* Use secrets management for credentials
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
### Changed
### Deprecated
### Removed
### Fixed
### Security
## [0.1.0] - 2025-01-18
### Added
- Initial release
- Core functionality
- Documentation
- Test suite
- CI/CD pipeline
[Unreleased]: https://github.com/org/project-name/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/org/project-name/releases/tag/v0.1.0
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dependencies
run: |
uv pip install --system ruff mypy
- name: Run ruff
run: ruff check .
- name: Run ruff format check
run: ruff format --check .
- name: Run mypy
run: mypy --strict src/
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dependencies
run: |
uv pip install --system -e ".[dev]"
- name: Run tests
run: |
pytest tests/ -v --cov=src --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
fail_ci_if_error: true
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dependencies
run: |
uv pip install --system pip-audit bandit
- name: Run pip-audit
run: pip-audit --require-hashes --disable-pip
continue-on-error: true
- name: Run bandit
run: bandit -r src/ -f json -o bandit-report.json
continue-on-error: true
- name: Upload bandit report
uses: actions/upload-artifact@v3
with:
name: bandit-report
path: bandit-report.json
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dependencies
run: |
uv pip install --system -e ".[docs]"
- name: Build documentation
run: mkdocs build --strict
- name: Upload docs artifact
uses: actions/upload-artifact@v3
with:
name: documentation
path: site/
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install build
run: uv pip install --system build
- name: Build package
run: python -m build
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
pypi-publish:
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/project-name
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
github-release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
generate_release_notes: true
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
reviewers:
- "maintainer-username"
labels:
- "dependencies"
- "automated"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
# Initialize git
git init
# Add all files
git add .
# Create initial commit
git commit -m "chore: initial project scaffold
- Set up project structure
- Configure modern tooling (uv, ruff, mypy, pytest)
- Add CI/CD workflows
- Create documentation structure
- Configure pre-commit hooks
Generated with repo-scaffold-skill
"
# Create main branch (if not already on main)
git branch -M main
If creating GitHub repository:
# Create GitHub repo
gh repo create org/project-name --public --source=. --description "Brief description"
# Push code
git push -u origin main
# Configure branch protection
gh api repos/org/project-name/branches/main/protection \
--method PUT \
--field required_status_checks[strict]=true \
--field required_status_checks[contexts][]=lint \
--field required_status_checks[contexts][]=test \
--field required_pull_request_reviews[required_approving_review_count]=1 \
--field enforce_admins=true \
--field restrictions=null
Enable GitHub security features:
pytest-cov with --cov-report=term-missing to identify gaps# tests/unit/test_module.py
def test_function_success():
"""Test function with valid input."""
result = function("valid")
assert result == expected
def test_function_validation():
"""Test function validates input."""
with pytest.raises(ValueError, match="Invalid input"):
function("invalid")
# tests/integration/test_api.py
@pytest.mark.integration
def test_api_endpoint(client):
"""Test API endpoint integration."""
response = client.get("/api/endpoint")
assert response.status_code == 200
# tests/conftest.py
import pytest
from project_name import create_app
@pytest.fixture
def app():
"""Create application fixture."""
app = create_app(testing=True)
yield app
@pytest.fixture
def client(app):
"""Create test client."""
return app.test_client()
# Use factories for complex objects
from polyfactory.factories.pydantic_factory import ModelFactory
from project_name.models import User
class UserFactory(ModelFactory[User]):
__model__ = User
# In tests
def test_user_creation():
user = UserFactory.build()
assert user.email.endswith("@example.com")
pip-audit in CI for vulnerability scanning.env files (gitignored) with python-dotenvos.system() with user input (command injection)bandit for Python security linting# Profile script execution
python -m cProfile -o profile.stats script.py
python -m pstats profile.stats
# Sampling profiler (no code changes)
pip install py-spy
py-spy record -o profile.svg -- python script.py
# tests/benchmark/test_performance.py
def test_performance(benchmark):
"""Benchmark expensive operation."""
result = benchmark(expensive_function, arg1, arg2)
assert result == expected
# Run benchmarks
pytest tests/benchmark/ --benchmark-only
import structlog
logger = structlog.get_logger()
# Log with context
logger.info(
"user_action",
user_id=user.id,
action="login",
ip=request.ip,
duration_ms=duration,
)
/health/metrics (Prometheus format)def calculate(items: list[Item], rate: float = 0.08) -> float:
"""Calculate total with rate applied.
Args:
items: List of items to process
rate: Rate to apply as decimal (default: 0.08)
Returns:
Calculated total
Raises:
ValueError: If rate is negative
Examples:
>>> calculate([Item(10.0)], 0.08)
10.8
"""
feature/description - New featuresfix/issue-123 - Bug fixesdocs/description - Documentationrefactor/description - Code refactoringfeat: add new feature
fix: resolve bug
docs: update documentation
test: add tests
refactor: improve code
chore: update tooling
perf: improve performance
# Breaking changes
feat!: change API
BREAKING CHANGE: Description of breaking change
Configure on main branch:
Automatically run before each commit:
All must pass before merge:
# In CI
- name: Check coverage threshold
run: pytest --cov=src --cov-fail-under=80
pyproject.tomlCHANGELOG.mdgit tag -a v1.0.0 -m "Release 1.0.0"git push origin v1.0.0Follow Keep a Changelog:
src/project_name/
โโโ api/
โ โโโ routes/
โ โ โโโ users.py
โ โ โโโ items.py
โ โโโ dependencies.py
โ โโโ middleware.py
โโโ core/
โ โโโ config.py
โ โโโ security.py
โโโ models/
โ โโโ schemas.py
โโโ services/
โ โโโ user_service.py
โโโ main.py
/healthfrom fastapi import FastAPI, Depends
from pydantic import BaseModel
app = FastAPI(
title="Project Name",
description="API description",
version="1.0.0",
)
@app.get("/health")
def health():
return {"status": "healthy"}
@app.get("/api/v1/items")
async def list_items(
skip: int = 0,
limit: int = 100,
service: ItemService = Depends(get_item_service),
):
return await service.list_items(skip, limit)
src/project_name/
โโโ cli/
โ โโโ main.py # Typer app
โ โโโ commands/
โ โ โโโ init.py
โ โ โโโ run.py
โ โโโ utils.py
โโโ core/ # Business logic
import typer
from rich import print
from rich.progress import track
app = typer.Typer(
name="project-name",
help="CLI tool description",
)
@app.command()
def process(
input_file: Path = typer.Argument(..., help="Input file"),
output: Path = typer.Option(None, "--output", "-o"),
verbose: bool = typer.Option(False, "--verbose", "-v"),
):
"""Process input file."""
for item in track(items, description="Processing..."):
# Process
pass
print("[green]โ Done![/green]")
if __name__ == "__main__":
app()
project/
โโโ data/ # Gitignored
โ โโโ raw/
โ โโโ processed/
โ โโโ results/
โโโ notebooks/ # Exploration
โโโ src/
โ โโโ project_name/
โ โโโ data/ # Data loading
โ โโโ features/ # Feature engineering
โ โโโ models/ # Model definitions
โ โโโ viz/ # Visualization
โโโ tests/
src/, not notebooks[project.optional-dependencies]
ml = [
"pandas",
"numpy",
"scikit-learn",
"matplotlib",
"seaborn",
]
notebook = [
"jupyter",
"ipykernel",
]
Causes: Python version mismatch, environment differences
Solutions:
# Check Python version
python --version
# Test in clean environment
uv venv --python 3.11
source .venv/bin/activate
uv pip install -e ".[dev]"
pytest tests/
Causes: Version conflicts, corrupted cache
Solutions:
# Clear cache
uv cache clean
# Check dependency tree
uv pip tree
# Verbose resolution
uv pip install -r requirements.txt -v
Causes: Missing type stubs, version mismatch
Solutions:
# Install type stubs
uv add --dev types-requests types-PyYAML
# Check with error codes
mypy --show-error-codes src/
Diagnosis:
pytest --durations=10
Solutions:
pytest -n autoDiagnosis:
python -X importtime -c "import mymodule"
Solutions:
โ Don't: open("/Users/me/file.txt")
โ
Do: Path(__file__).parent / "file.txt"
โ Don't: Only test in your dev environment โ Do: Test in fresh virtualenv regularly
โ Don't: One PR with bug fix + refactor + feature โ Do: Separate PRs for each concern
โ Don't: Update code without updating docs โ Do: Update README, docstrings, CHANGELOG together
Week 1: Foundation
Week 2: Code Quality
Week 3: Testing
Week 4: Modernization
Ongoing:
pip โ uv:
uv init --lib
uv add $(cat requirements.txt)
flake8/black โ ruff:
pip uninstall flake8 black isort
uv add --dev ruff
setup.py โ pyproject.toml: See pyproject.toml template above
Add to ~/.claude/CLAUDE.md:
## Repository Scaffolding
When I say "set up new repo in this folder" or similar phrases about creating a new repository:
1. Use the repo-scaffold-skill to guide repository creation
2. Ask about project type (library, API, CLI, data science, etc.)
3. Create appropriate directory structure and configuration files
4. Set up modern tooling (uv, ruff, mypy, pytest, pre-commit)
5. Create comprehensive documentation (README, CONTRIBUTING, SECURITY)
6. Configure CI/CD workflows
7. Initialize git repository with initial commit
8. Optionally help with GitHub setup and branch protection
The skill is located at: /path/to/repo-scaffold-skill/SKILL.md
For specific project, create .claude/CLAUDE.md:
# Project-Specific Instructions
This project follows repo-scaffold-skill best practices.
## Development Commands
* `just install` - Set up development environment
* `just test` - Run tests
* `just check` - Run all checks (CI simulation)
* `just lint` - Run linting and type checking
* `just docs` - Serve documentation locally
## Repository Standards
* Minimum 80% test coverage
* All code must have type hints
* Use conventional commits
* Keep PRs < 400 lines
* Update CHANGELOG with each PR
Version: 1.0.0 Last Updated: 2025-01-18 Maintained By: Your Organization License: CC-0 (Public Domain)
Changelog:
Contributing: To improve this skill, submit issues or PRs to the skill repository.