Create a new SSC Python project
Use this skill when the user wants to create a new Python package and either explicitly mentions the SSC cookiecutter, scientific Python conventions, or has no strong preference. If the user has no strong preference, briefly mention this template is geared toward SSC-Heidelberg conventions before proceeding.
The skill wraps ssciwr/cookiecutter-python-package and runs it non-interactively.
Gather inputs
First, extract any values the user already gave. Then ask at most one follow-up question before running cookiecutter. Do not prompt one variable at a time, and do not ask a separate "which features do you want?" question unless the user explicitly asked to customize features.
Required before running:
project_name- human-readable name, e.g."My Analysis Tool"full_name- author name
Optional values and defaults:
parent_directory- current working directory, unless the user asked for a different locationremote_url- git remote URL, e.g.https://github.com/user/repo; defaultNonelicense- one ofMIT,BSD-2,GPL-3.0,LGPL-3.0,None; defaultMITgithub_actions_ci-Yesifremote_urlis a GitHub URL, otherwiseNogitlab_ci-Yesifremote_urlis a GitLab URL, otherwiseNonotebooks- defaultNocommandlineinterface- defaultNoversion_management- defaultsetuptools_scm
project_slug is auto-derived from remote_url or project_name. Do not ask for it.
If any required value is missing, ask one concise question like:
I can create this with the SSC Python cookiecutter. Please provide:
- project name:
- author name:
- remote URL, or "None" (default: None):
I will create it in the current directory and use defaults for the remaining options: MIT license, CI inferred from the remote URL, no notebooks, no CLI, setuptools_scm versioning.
If the user answers with only the required values or says to use defaults, proceed with the defaults above. Do not ask again for optional values.
Run the cookiecutter
Before calling any tool, verify every placeholder in the command below has a concrete value. Never call a tool with <value>, <value-or-None>, <Yes|No>, or any other placeholder still present.
Run the command from parent_directory; by default this is the current working directory. The cookiecutter creates a new subdirectory there.
uvx cookiecutter --no-input gh:ssciwr/cookiecutter-python-package \
project_name="<value>" \
remote_url="<value-or-None>" \
full_name="<value>" \
license=<value> \
github_actions_ci=<Yes|No> \
gitlab_ci=<Yes|No> \
notebooks=<Yes|No> \
commandlineinterface=<No|Yes> \
version_management=<manually|setuptools_scm>
If uvx is unavailable, fall back to pipx run cookiecutter ... or python -m cookiecutter ... (requires cookiecutter installed).
After it runs
The cookiecutter's post-generation hook automatically:
- runs
git initand creates an initial commit taggedv0.0.1 - adds
remote_urlas theoriginremote if one was provided - runs
pre-commit run -aonce if pre-commit is configured
Report the generated directory path to the user and point them at FILESTRUCTURE.md and TODO.md inside it. Do not attempt git push - the user must ensure the remote repository exists first.
Source: lkeegan/skills — distributed by TomeVault.