Initialize a new Python project with uv, git, env files, README/AGENTS docs, pyproject tooling (ruff, ty, pytest, python-dotenv as dev), agents/skills layout, workflows folder, and starter package structure. Trigger whenever the user asks to start or scaffold a Python project, set up uv, git, env/pyproject files, or prepare agent skill configuration. Ask for missing project/package/python version, agent type/name, and base framework before generating files.
Use this skill to scaffold a fresh Python project that is uv-based, git-init’d, tool-configured, and agent-ready. Keep outputs lean, conventional, and ready to run.
Evals: test prompts live in evals/evals.json (covers base uv project, FastAPI variant, Typer CLI) with assertions for git, tooling deps, env files, structure, framework stubs, commands. When running iterative improvements, grade against these.
.agents/skills)..agents/skills/ as starting point; keep config movable/duplicable (e.g., allow .kilocode/ or alternative paths if specified).src/<package_name>/ with __init__.py and __main__.py (simple entrypoint stub).cd context (conceptually; write files with paths).git init.uv init --package --python <version> <project_name> (or uv init then adjust) and ensure pyproject.toml updated per below..gitignore (Python/uv/venv/pycache/.env/.DS_Store/.idea/.vscode/.ruff_cache/.pytest_cache/.venv/.tox/.mypy_cache/.coverage, coverage reports, .python-version)..env (empty, with “# add secrets locally” header) and .env.example (same keys, no secrets; add placeholders only if user gives variables).README.md (project overview, setup steps with uv, run/test commands, env guidance).AGENTS.md (general project context, agent rules/constraints, how to extend/move configs; note default .agents/skills root and portability guidance).pyproject.toml updates: add ruff, ty, pytest, and python-dotenv (dev/optional-deps) to [tool.uv.dependencies] or equivalent; add [tool.ruff] baseline; add [tool.pytest.ini_options]; add [tool.ty] stub; set python requires; include framework dependency if confirmed.workflows/ folder (placeholder README.md noting intended workflow automations)..agents/skills/ folder (placeholder README.md with defaults and relocation note; keep config minimal and relocatable).src/:
src/<package>/__init__.py (export __version__ = "0.1.0").src/<package>/__main__.py (simple CLI entrypoint using if __name__ == "__main__": main()).tests/ with test_smoke.py using pytest to import package.src/<package>/app.py + optional __main__.py runner; Typer CLI in cli.py; etc.) and document run command in README.uv commands to README: uv sync, uv run, uv run pytest, uv tool run ruff check ...env.example; remind user to fill .env locally only..agents/skills/ — place skill configs or README here. Keep instructions so configs can be moved (e.g., to .kilocode/) by updating paths and references.AGENTS.md and .agents/skills/README.md..gitignore: standard Python + uv + env + editor caches..env: header comment only..env.example: same keys as .env (if any) with placeholders.README.md: project summary; prereqs (Python <version>, uv); setup (uv sync); usage (uv run); tests; lint; env instructions; agent layout note.AGENTS.md: describe agent purpose, constraints (no secrets, portable paths), default root .agents/skills, how to adapt to other folders (e.g., .kilocode/), and duplication guidance.pyproject.toml: project metadata, requires-python, dependencies (ruff, ty, pytest, python-dotenv as dev-required, framework if any), optional dev-dependencies section; tool configs for ruff/pytest/ty; include packages = [{ include = "<package>", from = "src" }] under [tool.uv] or [project] layout.workflows/README.md: brief note on intended automations (CI, agents, scripts) and how to add..env stays local.evals/evals.json and report assertion outcomes..gitignore, .env, .env.example, README.md, AGENTS.md, workflows/, .agents/skills/ present.src/; tests import package; entrypoint exists.