Official agent skill

Create Subcommand

by DataDog in DataDog/datadog-agent

Add a new CLI subcommand to an agent binary (agent, cluster-agent, etc.)

OfficialApache-2.0Auto-check: notes

Install Create Subcommand

skills CLI
$ npx skills add DataDog/datadog-agent --skill create-subcommand -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install DataDog/datadog-agent create-subcommand --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/DataDog/datadog-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/create-subcommand .claude/skills/create-subcommand && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
create-subcommand
GitHub stars
3.8k
Token cost
~677 tokens
SKILL.md length
233 words
Files
1
Skills in repo
35
Repo updated
First seen
Licence
Apache-2.0

At a glance

Add a new CLI subcommand to an agent binary (agent, cluster-agent, etc.)

  • Works in 5 steps: Gather information from the user → Read reference examples → Create the subcommand → …
  • SKILL.md covers Agent Binaries, Instructions and Usage
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Create Subcommand is an agent skill from DataDog/datadog-agent, published by the product's own GitHub organization. Add a new CLI subcommand to an agent binary (agent, cluster-agent, etc.)

Its SKILL.md is about 680 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Datadog. The repository describes itself as: Main repository for Datadog Agent. The licence is Apache-2.0.

Example prompts

  • “/create-subcommand”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Write, Edit, Glob, Grep, AskUserQuestion

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Gather information from the user
  2. Read reference examples
  3. Create the subcommand
  4. Register
  5. Verify

What it can do on your machine

Read from SKILL.md and the folder at commit 20eff25. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Write
    • Edit
    • Glob
    • Grep
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Create Subcommand loads about 677 tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 233 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~677

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Write, Edit, Glob, Grep, AskUserQuestion

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from DataDog/datadog-agent at commit 20eff25, republished under its Apache-2.0 licence (© DataDog). 233 words, ~677 tokens.

Download SKILL.mdSave it as .claude/skills/create-subcommand/SKILL.md (or your agent's skills folder).
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 Binaries

AgentSubcommands dirRegistration file
Core Agentcmd/agent/subcommands/cmd/agent/subcommands/subcommands.go
Cluster Agentcmd/cluster-agent/subcommands/cmd/cluster-agent/subcommands/subcommands.go
Process Agentcmd/process-agent/subcommands/cmd/process-agent/subcommands/subcommands.go
Security Agentcmd/security-agent/subcommands/cmd/security-agent/subcommands/subcommands.go
System Probecmd/system-probe/subcommands/cmd/system-probe/subcommands/subcommands.go
DogStatsDcmd/dogstatsd/subcommands/cmd/dogstatsd/subcommands/subcommands.go

Instructions

Step 1: Gather information from the user

Use AskUserQuestion to collect the following. If $ARGUMENTS provides values, skip those questions.

  1. Target agent: Which agent binary? (Core Agent is most common)
  2. Subcommand name: e.g. health, hostname, flare
  3. Description: What does the subcommand do?
  4. Complexity: Simple (no Fx, e.g. version) or with config/IPC (fxutil.OneShot, e.g. hostname)?
  5. Shared across agents?: Yes → pkg/cli/subcommands/<name>/, No → cmd/<agent>/subcommands/<name>/
Step 2: Read reference examples

Read the reference matching the chosen pattern, plus the target agent's registration file:

PatternReference file
Simple (no Fx)cmd/agent/subcommands/version/command.go
With config/IPCcmd/agent/subcommands/hostname/command.go
Shared across agentspkg/cli/subcommands/health/command.go + cmd/agent/subcommands/health/command.go

Also read the target agent's command/command.go for available GlobalParams fields.

Step 3: Create the subcommand

Create cmd/<agent>/subcommands/<name>/command.go following the reference patterns exactly.

Step 4: Register

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.

Step 5: Verify
  1. Build: dda inv agent.build --build-exclude=systemd
  2. Test: ./bin/agent/agent <name> --help
  3. Lint: dda inv linter.go

Usage

  • /create-subcommand — Interactive: prompts for all details
  • /create-subcommand agent my-command — Pre-fills agent and name

© DataDog, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/create-subcommand of DataDog/datadog-agent.

Open the folder on GitHubat commit 20eff25

Compare with similar skills

Create Subcommand next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Create Subcommand compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Create Subcommand this skillDataDog/datadog-agent3.8k—~677Automated safety check: NotesApache-2.0
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Apm IntegrationsDataDog/dd-trace-js836—~3kAutomated safety check: PassCustom licence
Bump LibdatadogDataDog/dd-trace-dotnet573—~1.7kAutomated safety check: PassApache-2.0
Dd IdpDataDog/pup1k—~2kAutomated safety check: PassApache-2.0
Datadog Data Source GeneratorDataDog/terraform-provider-datadog468—~2.7kAutomated safety check: PassMPL-2.0

Similar skills

  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Apm Integrations

    DataDog/dd-trace-js

    Official

    A skill your agent uses when adding, debugging, fixing, or modifying instrumentation and plugins for third-party libraries in dd-trace-js.

    836 GitHub stars~3k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Bump Libdatadog

    DataDog/dd-trace-dotnet

    Official

    Update/bump the libdatadog native library version in dd-trace-dotnet.

    573 GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Dd Idp

    DataDog/pup

    Official

    Find, filter, count, and connect software, teams, engineering work and delivery, infrastructure, and operational or security records through Pup's read-only Datadog entity graph.

    1k GitHub stars~2k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Datadog Data Source Generator

    DataDog/terraform-provider-datadog

    Official

    Generates a Datadog Terraform provider data source from an OpenAPI operation with tfgen and opens a review-ready GitHub PR with a risk scan and testing guide.

    468 GitHub stars~2.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Release

    DataDog/datadog-go

    Official

    Cut a new datadog-go release and update CHANGELOG.md following the repo's house style.

    375 GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from DataDog/datadog-agent

All 35 skills in this repo
  • Triage CI Failure

    DataDog/datadog-agent

    Official

    Classify a failed CI as either caused by an active incident, flakiness, or a true code regression.

    3.8k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Elicit

    DataDog/datadog-agent

    Official

    Run a structured discovery session to build an Allium specification through conversation.

    3.8k GitHub starsUsed in 1 repo~3.7k tokens
    Auto-check passed
  • Follow PR

    DataDog/datadog-agent

    Official

    Monitor the current PR's GitLab pipeline to completion, then report success, auto-fix, or investigate a failure.

    3.8k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Create Epic Recap

    DataDog/datadog-agent

    Official

    A skill your agent uses when an engineer or manager asks to recap, summarize, or post an update on a Jira Epic — a progress update for an in-progress Epic (how far along it is, what's shipped so…

    3.8k GitHub stars~5k tokensUpdated today
    Auto-check: notes
  • Explain Lading Config

    DataDog/datadog-agent

    Official

    Explains a lading.yaml config file from the regression test suite, using the lading Rust source as ground truth for field meanings and defaults.

    3.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Distill

    DataDog/datadog-agent

    Official

    Extract an Allium specification from an existing codebase. An agent skill from DataDog/datadog-agent.

    3.8k GitHub starsUsed in 1 repo~7k tokens
    Auto-check passed

Works with

Questions about Create Subcommand

What does Create Subcommand do?

Add a new CLI subcommand to an agent binary (agent, cluster-agent, etc.). Create Subcommand is an agent skill from DataDog/datadog-agent, published by the product's own GitHub organization.

How do I install Create Subcommand in Claude Code?

Run `npx skills add DataDog/datadog-agent --skill create-subcommand -a claude-code`. Or copy the skill folder (.agents/skills/create-subcommand in DataDog/datadog-agent) into .claude/skills/create-subcommand in your project. Claude Code loads it when a task matches its description.

How do I install Create Subcommand in Codex?

Run `npx skills add DataDog/datadog-agent --skill create-subcommand -a codex`. Or copy the skill folder (.agents/skills/create-subcommand in DataDog/datadog-agent) into .agents/skills/create-subcommand in your project. Codex loads it when a task matches its description.

Can I use Create Subcommand in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DataDog/datadog-agent --skill create-subcommand -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/create-subcommand, .gemini/skills/create-subcommand, .github/skills/create-subcommand and .opencode/skills/create-subcommand in your project.

What does Create Subcommand need to run?

SKILL.md names no scripts, command-line tools or credentials: Create Subcommand is instructions for the agent only. Its frontmatter pre-approves these tools: Bash, Read, Write, Edit, Glob, Grep, AskUserQuestion.

Does Create Subcommand access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Create Subcommand safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Create Subcommand use?

Create Subcommand is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Create Subcommand use?

About 677 tokens (SKILL.md is roughly 2.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Create Subcommand?

Skills that share tags, products or a category with Create Subcommand: Code Design Rationale Investigator (cursor/plugins, 10k stars), Apm Integrations (DataDog/dd-trace-js, 836 stars), Bump Libdatadog (DataDog/dd-trace-dotnet, 573 stars) and Dd Idp (DataDog/pup, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Create Subcommand?

DataDog (a GitHub organization, an official publisher) maintains it in DataDog/datadog-agent, which has 3,757 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 8, 2026.

Source: DataDog/datadog-agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.