基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/DataDog/datadog-agent --skill create-invoke-task命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | create-invoke-task |
| description | Create a new Python invoke task for the dda CLI |
| allowed-tools | Bash, Read, Write, Edit, Glob, Grep, AskUserQuestion |
| argument-hint | [namespace] [task-name] |
| model | sonnet |
Create 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 nameWrite or extend Datadog Agent new-e2e tests, including fakeintake coverage and the GitLab wiring that runs them; derives scope from the current diff when no target is named. Not for running tests that already exist (run-e2e, run-windows-e2e), or for judging whether a behavior belongs in E2E at all (e2e-audit).
Run one already-written new-e2e test locally and triage the setup failures that stop it — "run the containers e2e tests", "my e2e run fails before any test starts".
Create a pull request for the current branch with proper labels and description. Any agent opening a PR in this repo (via `gh pr create` or otherwise), whether invoked directly as /create-pr or as part of a larger task, MUST follow this skill's process rather than improvising.