Scaffold a multi-repo Python workspace with models library, core library, Flask backend, and optional sub-projects. Creates directory structure and root CLAUDE.md describing each sub-project and which skills to use next. Use when starting a new Python project, setting up a multi-repo workspace, or scaffolding a project skeleton.
npx claudepluginhub jmazzahacks/byteforge-claude-skills --plugin byteforge-skillsThis skill uses the workspace's default tool permissions.
This skill creates a multi-repo workspace skeleton for a new Python project. It sets up the directory structure and a root `CLAUDE.md` that describes each sub-project's purpose, how they connect, and which existing skills to run next. No application code is generated — actual code generation is deferred to existing skills.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
This skill creates a multi-repo workspace skeleton for a new Python project. It sets up the directory structure and a root CLAUDE.md that describes each sub-project's purpose, how they connect, and which existing skills to run next. No application code is generated — actual code generation is deferred to existing skills.
Use this skill when:
{project}/{project}/CLAUDE.md — root development guide describing each sub-project and which skills to use{project}/.gitignore — workspace-level gitignore for Python projectsIMPORTANT: Before creating anything, ask the user these questions using AskUserQuestion:
"What is your project name?" (e.g., "arcana", "trading-bot", "my-app")
{project} — kebab-case (e.g., arcana, trading-bot){project_name} — snake_case (e.g., arcana, trading_bot){ProjectName} — PascalCase (e.g., Arcana, TradingBot){PROJECT_NAME} — UPPER_SNAKE (e.g., ARCANA, TRADING_BOT)"Brief project description?" (one or two sentences for the CLAUDE.md header)
"What is the GitHub org or owner?" (e.g., jmazzahacks)
"Which optional sub-projects do you need?" (multi-select)
python-scripts — standalone utility scripts{project}-api-python — Python API client library{project}-api-js — TypeScript API client library{project}-frontend — Next.js frontend"Does the backend need Celery + Redis for background tasks?" (yes/no)
"Which license?"
Create empty directories under {project}/. Use mkdir -p to create each directory with a .gitkeep file so they are tracked by git.
Always created:
{project}/
├── {project}-models/
├── {project}-core/
└── {project}-backend/
Conditionally created based on Step 1 answers:
├── python-scripts/ # if "python-scripts" selected
├── {project}-api-python/ # if Python API client selected
├── {project}-api-js/ # if TypeScript API client selected
└── {project}-frontend/ # if Next.js frontend selected
Create {project}/CLAUDE.md with the following structure. Replace all {project}, {project_name}, {ProjectName}, and {PROJECT_NAME} placeholders with actual values.
# {ProjectName} — Development Guide
{description}
## Project Structure
This is a multi-repo workspace. Each sub-directory is an independent project with its own virtual environment, git history, and dependencies.
| Directory | Purpose | Type |
|-----------|---------|------|
| `{project}-models/` | Shared data models and schemas | pip package (library) |
| `{project}-core/` | Business logic and service layer | pip package (library) |
| `{project}-backend/` | Flask REST API server | Docker service |
{# Include rows for optional sub-projects only if selected: }
{# | `python-scripts/` | Standalone utility scripts | Scripts | }
{# | `{project}-api-python/` | Python API client library | pip package (library) | }
{# | `{project}-api-js/` | TypeScript API client library | npm package | }
{# | `{project}-frontend/` | Next.js frontend application | Docker service | }
## Dependency Chain
{project}-models → {project}-core → {project}-backend
- **{project}-models** has no internal dependencies. It defines shared data models.
- **{project}-core** depends on `{project}-models`. It contains business logic.
- **{project}-backend** depends on both `{project}-models` and `{project}-core`.
## Setting Up Each Sub-Project
### {project}-models (shared models library)
Use the `python-lib-setup` skill to initialize this as a pip package:
cd {project}-models
### {project}-core (business logic library)
Use the `python-lib-setup` skill to initialize this as a pip package:
cd {project}-core
Add `{project}-models` as a GitHub dependency in `pyproject.toml`:
```toml
dependencies = [
# Public repo:
"{project}-models @ git+https://github.com/{github_org}/{project}-models.git",
# Private repo (requires CR_PAT environment variable):
# "{project}-models @ git+https://{env:CR_PAT}@github.com/{github_org}/{project}-models.git",
]
Set up in this order:
flask-smorest-api — Flask app factory, blueprints, Marshmallow schemaspostgres-setup — Database schema and setup scriptflask-docker-deployment — Dockerfile, build script, versioningbyteforge-loki-logging — Structured logging to Grafana LokiAdd model and core libraries as GitHub dependencies in requirements.txt:
# Public repos:
{project}-models @ git+https://github.com/{github_org}/{project}-models.git
{project}-core @ git+https://github.com/{github_org}/{project}-core.git
# Private repos (requires CR_PAT environment variable):
# {project}-models @ git+https://${CR_PAT}@github.com/{github_org}/{project}-models.git
# {project}-core @ git+https://${CR_PAT}@github.com/{github_org}/{project}-core.git
{# Include this section only if Celery + Redis was selected: }
This backend uses Celery for background task processing with Redis as the broker. Environment variables:
{PROJECT_NAME}_REDIS_URL — Redis connection URL (e.g., redis://localhost:6379/0){# Include this section only if {project}-frontend was selected: }
Use the aegis-nextjs-frontend skill to scaffold the frontend:
cd {project}-frontend
# Invoke aegis-nextjs-frontend skill
{# Include this section only if python-scripts was selected: }
Standalone scripts for development, data migration, or maintenance tasks. Each script should:
#!/usr/bin/env python shebangpython-dotenv to load .env{project}-models and {project}-core as needed{# Include this section only if {project}-api-python was selected: }
Use the python-lib-setup skill to initialize this as a pip package:
cd {project}-api-python
# Invoke python-lib-setup skill
{# Include this section only if {project}-api-js was selected: }
Initialize as a TypeScript npm package. Publish to GitHub Packages or npm.
Each sub-project with Python uses its own virtual environment:
cd {project}-models/
python -m venv bin
source bin/activate
pip install -r dev-requirements.txt
Run tests:
source bin/activate && pytest
Start the backend locally:
cd {project}-backend/
source bin/activate && python {project_name}.py
BIGINT (epoch seconds), never TIMESTAMP or DATETIMEgen_random_uuid() in PostgreSQLpsycopg2.extras.RealDictCursor for queries{PROJECT_NAME}_ (e.g., {PROJECT_NAME}_DB_HOST)source bin/activate before running Pythonpip install -e ../sibling-project or file: references. Cross-repo dependencies MUST use GitHub URLs. Public repos: git+https://github.com/{github_org}/pkg.git. Private repos: add CR_PAT token — in pyproject.toml: git+https://{env:CR_PAT}@github.com/..., in requirements.txt: git+https://${CR_PAT}@github.com/...
**IMPORTANT**: When generating the actual CLAUDE.md file:
- Remove all `{# ... }` comment lines
- Only include sections for sub-projects that were selected in Step 1
- Replace all placeholders with actual values
- Do NOT wrap the entire file in a code fence — write it as a real markdown file
## Step 4: Create Root .gitignore
Create `{project}/.gitignore`:
```gitignore
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
*.egg-info/
*.egg
dist/
build/
*.whl
# Virtual environments
bin/
lib/
lib64/
pyvenv.cfg
include/
share/
# Environment
.env
*.env.local
# IDE
.idea/
.vscode/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# Docker
VERSION
# Node (if frontend selected)
node_modules/
.next/
out/
After creating all files, tell the user:
{project}/ directorycd {project}-models/ → run python-lib-setupcd {project}-core/ → run python-lib-setupcd {project}-backend/ → run flask-smorest-api, then postgres-setup, then flask-docker-deployment, then byteforge-loki-loggingcd {project}-frontend/ → run aegis-nextjs-frontendcd {project}-api-python/ → run python-lib-setup{github_org}/.env files with required environment variables