基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/DataDog/datadog-agent --skill create-subcommand命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | create-subcommand |
| description | Add a new CLI subcommand to an agent binary (agent, cluster-agent, etc.) |
| allowed-tools | Bash, Read, Write, Edit, Glob, Grep, AskUserQuestion |
| argument-hint | [agent] [subcommand-name] |
| model | sonnet |
Add a new CLI subcommand to a Datadog Agent binary. Each agent binary uses Cobra commands registered via a central subcommands.go file.
| Agent | Subcommands dir | Registration file |
|---|---|---|
| Core Agent | cmd/agent/subcommands/ | cmd/agent/subcommands/subcommands.go |
| Cluster Agent | cmd/cluster-agent/subcommands/ | cmd/cluster-agent/subcommands/subcommands.go |
| Process Agent | cmd/process-agent/subcommands/ | cmd/process-agent/subcommands/subcommands.go |
| Security Agent | cmd/security-agent/subcommands/ | cmd/security-agent/subcommands/subcommands.go |
| System Probe | cmd/system-probe/subcommands/ | cmd/system-probe/subcommands/subcommands.go |
| DogStatsD | cmd/dogstatsd/subcommands/ | cmd/dogstatsd/subcommands/subcommands.go |
Use AskUserQuestion to collect the following. If $ARGUMENTS provides values, skip those questions.
health, hostname, flareversion) or with config/IPC (fxutil.OneShot, e.g. hostname)?pkg/cli/subcommands/<name>/, No → cmd/<agent>/subcommands/<name>/Read the reference matching the chosen pattern, plus the target agent's registration file:
| Pattern | Reference file |
|---|---|
| Simple (no Fx) | cmd/agent/subcommands/version/command.go |
| With config/IPC | cmd/agent/subcommands/hostname/command.go |
| Shared across agents | pkg/cli/subcommands/health/command.go + cmd/agent/subcommands/health/command.go |
Also read the target agent's command/command.go for available GlobalParams fields.
Create cmd/<agent>/subcommands/<name>/command.go following the reference patterns exactly.
Edit the agent's subcommands.go: add an import with the cmd<Name> alias convention and add cmd<Name>.Commands to the factory slice. Follow the existing entries.
dda inv agent.build --build-exclude=systemd./bin/agent/agent <name> --helpdda inv linter.go/create-subcommand — Interactive: prompts for all details/create-subcommand agent my-command — Pre-fills agent and nameMonitor the current PR's GitLab pipeline to completion, then report success or investigate a failure. Use when the user asks to follow, babysit, watch, or wait on a PR/pipeline, or just after pushing to / creating a PR.
Classify a failed CI as either caused by an active incident, flakiness, or a true code regression. Use when a PR's pipeline is red and it isn't obvious whether the PR's own changes are at fault. Trigger phrases include: - "investigate this CI failure" - "please fix CI" - "why did this job fail" - "is there an incident affecting CI" - "should I retry this" This should also be invoked whenever the user asks you to investigate _or fix_ a failing CI, to ensure we don't spend hours trying to fix something broken upstream.
Write 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).