scaffold-repo
Initialize a new Python repository with correct structure following RAE guidelines. Use when the user says "new repo", "new project", "initialize", "scaffold", "create a project", "set up a repo", or "start a new package". Creates src/ layout, pyproject.toml, tests, .gitignore, and optionally a devcontainer.
What this skill does
## Overview
This skill creates a properly structured Python repository from scratch. It enforces
the standards in `enforce-guidelines/references/repo-structure.md`.
**Use when:**
- Creating a new Python project
- Converting an unstructured project to proper layout
- User says "new repo", "new project", "initialize", "scaffold"
## Parameters
- **name** (required): Project name (lowercase, hyphens allowed)
- **description** (required): One-line project description
- **package_name** (optional): Python package name (defaults to name with underscores)
- **author** (optional): Author name (defaults to "James Cotton")
- **extras** (optional): Additional optional-dependencies groups to include
## Steps
### 1. Validate Inputs
- You MUST verify project name is lowercase with hyphens only
- You MUST derive package_name from project name (replace hyphens with underscores)
- You MUST NOT proceed without a description
### 2. Create Directory Structure
```bash
mkdir -p src/{package_name}
mkdir -p tests
touch src/{package_name}/__init__.py
touch src/{package_name}/py.typed
touch tests/__init__.py
```
- You MUST use src/ layout
- You MUST create both src/ and tests/ directories
- You MUST include py.typed marker for type hint support
### 3. Create pyproject.toml
Copy the canonical template from `templates/pyproject.toml` in the RAE plugin and customize:
- Replace `your-project-name` with `{name}`
- Replace `your_package` with `{package_name}`
- Replace author name/email
- Set the project description
- Add any project-specific dependencies
The template is the **single source of truth** for ruff, pytest, and coverage config.
Do not hardcode these values — always read from the template file.
- You MUST set line-length = 120
- You MUST put pytest and ruff in dev optional-dependencies
- You MUST NOT put dev tools in main dependencies
### 4. Create .gitignore
```gitignore
# Python
__pycache__/
*.py[cod]
*.egg-info/
dist/
build/
.eggs/
# Virtual environments
.venv/
venv/
ENV/
# IDE
.idea/
.vscode/
*.swp
# Testing
.pytest_cache/
.coverage
htmlcov/
# RAE
scraps/
scratch/
.rae-version
# OS
.DS_Store
Thumbs.db
```
### 5. Create README.md
```markdown
# {name}
{description}
## Installation
```bash
uv pip install -e ".[dev]"
```
## Development
```bash
# Run tests
pytest
# Format code
ruff format .
# Lint code
ruff check .
```
```
### 6. Create Initial Test Files
Create `tests/conftest.py`:
```python
"""Shared test fixtures."""
```
Create `tests/test_placeholder.py`:
```python
"""Placeholder test to verify pytest works."""
def test_placeholder() -> None:
"""Remove this test once real tests exist."""
assert True
```
- You MUST include type hints (-> None)
- You MUST create conftest.py for shared fixtures
### 7. Initialize Git (if not already)
```bash
git init
git add .
git commit -m "feat: Initialize {name} with RAE structure"
```
- You MUST NOT commit if already in a git repo with uncommitted changes
- You SHOULD offer to commit but confirm with user first
### 8. Create CLAUDE.md
Create a `CLAUDE.md` with project-specific instructions. If the project uses DataJoint, **always** include this section:
```markdown
## CRITICAL: NEVER Modify Database Entries
**DO NOT update, delete, or alter any DataJoint database entries.** This includes:
- `update1()`, `delete()`, `drop()` on any table
- Modifying settings lookup tables (KinematicReconstructionSettingsLookup, ProbabilisticReconstructionSettingsLookup, KineticReconstructionSettingsLookup, KeypointSet, etc.)
- Altering any computed table entries
Database entries are shared state used by the entire lab. Changing a settings entry changes it for everyone and invalidates prior results computed with those settings.
```
- You MUST include this section if datajoint is in the project's dependencies
- You SHOULD include it by default for any biomechanics/motion-capture project
### 9. Verify Structure
```bash
ruff format .
ruff check .
pytest
```
- You MUST run ruff format before completing
- You MUST run ruff check with no errors
- You MUST run pytest with all tests passing
### 10. (Optional) Add Devcontainer
If the user wants devcontainer support, ask which template to use:
**Option 1: CPU-only (lightweight, faster startup)**
- Copy from `templates/devcontainer-cpu/devcontainer.json`
- Uses `mcr.microsoft.com/devcontainers/python:3.11`
- No GPU support, minimal dependencies
- Best for: web apps, APIs, general Python development
**Option 2: GPU-enabled (CUDA + cuDNN for ML/CV)**
- Copy from `templates/devcontainer-gpu/devcontainer.json`
- Uses `nvidia/cuda:12.6.0-cudnn-devel-ubuntu24.04`
- Includes: GPU access, OpenCV dependencies, git-lfs, Jupyter
- Requires: `--env-file .env` in project root
- Best for: machine learning, computer vision, biomechanics
Both templates:
- Install Claude Code, pyright, RAE plugin, and full plugin suite via `postCreateCommand`
- Mount `~/.claude` for config persistence
- Configure VSCode with ruff, Python testing, 120-char rulers
- Include Node.js via `"ghcr.io/devcontainers/features/node:1": {}` (required for excalidraw rendering via npx)
- No Dockerfile needed - everything via features and install script
**Beads (bead-driven development):**
Ask the user whether they want beads enabled for this project. Beads is **off by default**.
Only enable if the user explicitly opts in. If enabled, add the beads plugin to the
devcontainer's postCreateCommand install list.
**Note:** Ensure `~/.claude` exists on the host before starting: `mkdir -p ~/.claude`
**GPU template also requires:** Create a `.env` file in project root for secrets (gitignored)
## Adding Optional Dependencies
If user requests specific libraries, add appropriate optional-dependencies:
**OpenCV:**
```toml
[project.optional-dependencies]
opencv = ["opencv-python>=4.0.0"]
opencv-headless = ["opencv-python-headless>=4.0.0"]
opencv-contrib = ["opencv-contrib-python>=4.0.0"]
```
**PyTorch:**
```toml
[project.optional-dependencies]
torch-cpu = ["torch>=2.0"]
torch-cuda = ["torch>=2.0"] # User installs with CUDA separately
```
**Jupyter:**
```toml
[project.optional-dependencies]
notebooks = ["jupyter>=1.0", "ipykernel>=6.0"]
```
## Examples
**User:** "/scaffold-repo my-analysis-tool A tool for analyzing motion capture data"
**Agent:**
1. Creates directory structure
2. Generates pyproject.toml with name="my-analysis-tool", package="my_analysis_tool"
3. Creates .gitignore, README.md
4. Creates placeholder test
5. Runs ruff format, ruff check, pytest
6. Reports success with next steps
**User:** "/scaffold-repo cv-processor Image processing pipeline --extras opencv-headless"
**Agent:**
1. Creates standard structure
2. Adds opencv-headless to optional-dependencies
3. Completes verification
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.