Create a new Python invoke task for the dda CLI
65
58%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./.claude/skills/create-invoke-task/SKILL.mdCreate a new invoke task accessible via dda inv <namespace>.<task-name>.
Use AskUserQuestion to collect the following. If $ARGUMENTS provides values, skip those questions.
Task name: The function name (e.g. build, refresh_assets). Underscores become hyphens in the CLI.
Namespace: Which task module does it belong to?
tasks/ (e.g. agent, linter, dogstatsd). Check tasks/__init__.py for the full list.tasks/<name>.py file and register it.What does the task do?: Brief description (becomes the docstring / help text).
Parameters: What CLI flags does the task need? (name, type, default value, description)
Read an existing task file matching the desired complexity:
tasks/auth.pytasks/agent.py or tasks/linter.pytasks/__init__.py — to see how modules and tasks are registeredAdd the @task decorated function to the appropriate file. Follow the patterns from Step 2.
Key rules:
ctx (the invoke Context)ctx.run("command") to execute shell commandsdda inv --listinvoke: task, Exit (for errors), ContextIf you created a new module file, edit tasks/__init__.py:
from tasks import (...) block (alphabetical order)ns.add_collection(<module>) — creates dda inv <module>.<task>ns.add_task(<task>) — creates dda inv <task>If adding to an existing module, no registration is needed — invoke auto-discovers @task functions.
Test the task:
dda inv <namespace>.<task-name> --help/create-invoke-task — Interactive: prompts for all details/create-invoke-task agent my-task — Pre-fills namespace and name0f36ad4
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.