Use this skill when the user asks to "add a skill", "create a skill", "new skill", "write a skill for", "skill for cx <something>", "add a user-facing skill", "create a SKILL.md", "teach an agent how to use", "agent skill for", "document a command as a skill", "make a skill", "add skill to skills/", "create agent instructions for", "build a skill", or wants to create a new user-facing skill in the skills/ directory that teaches AI agents how to use a cx CLI command. Use this even when the user is following the add-command workflow and reaches the skill creation step.
End-to-end workflow for creating a skill in skills/ that teaches AI agents how to use a cx CLI command. This skill is often invoked from add-command Step 6, but can also be used standalone when documenting an existing command.
contributing/adding-a-skill.md has the full reference guide and a copy-pasteable template. Read it alongside this workflow.
Before writing anything, answer these questions:
cx alerts list, cx alerts get, cx alerts create).references/ file.Before writing any skill, read existing ones to internalize the project's patterns. Agents that study existing skills first produce consistent, high-quality results rather than inventing new formats.
Always read:
contributing/adding-a-skill.md - full guide with directory structure, frontmatter conventions, reference file rules, and a copy-pasteable templateskills/README.md - the public catalog you'll update in Step 4Study at least two existing skills:
| Skill | Why study it |
|---|---|
skills/cx-alerts/SKILL.md | REST-based command with rich examples, JSON payloads, investigation workflow; uses both shared and skill-local reference files |
skills/cx-telemetry-querying/SKILL.md | Gateway skill that loads shared reference files per pillar — good model for cross-pillar routing and reference-loading patterns |
skills/cx-create-dashboard/SKILL.md | Complex multi-step workflow; uses shared references (dataprime, promql, logs, spans) plus skill-local references |
skills/cx-cost-optimization/SKILL.md | Workflow skill covering 5 commands unified by "reduce costs" intent — good model for multi-command skills |
Pick the two closest to what you're building and read them completely.
Create skills/cx-<domain-name>/SKILL.md. All skill directories use the cx- prefix. Use the directory structure, frontmatter format, and templates from contributing/adding-a-skill.md § "Directory Structure" through "Complete Template" (single-command) or § "Workflow Skills" (multi-command).
The description frontmatter field is the primary trigger mechanism - agents use it to decide when to activate a skill. This is the single most important line in the file. Write at least 10 trigger phrases covering:
"list alerts", "get alert by ID")"investigate alert failures", "debug noisy alerts")"check", "find", "search", "analyze")"SLO breach", "error budget")Follow this order (see contributing/adding-a-skill.md § "Complete Template" for a starting point):
cx commands it uses| Command | Purpose | Key flags | for every subcommand. Include -o json/-o agents and -p <profile> notes.-o json with jq, multi-profile behavior, always verify, etc.references/ files and related skillsjq filtering examples when the command supports -o jsonreferences/Follow contributing/adding-a-skill.md § "Reference Files" for when and how to create references/ files, and § "Updating skills/README.md" for adding the skill to the public catalog.
Before creating a new reference file, check whether the content is language-level or telemetry-pillar material:
skills/shared/skills/shared/skills/cx-your-domain/references/If your skill needs a file from skills/shared/:
scripts/sync-shared-references.shbash scripts/sync-shared-references.sh — it copies the file(s) into your references/references/ copies togetherIf you're adding a new shared reference:
skills/shared/name matches directory, description has 10+ trigger phrases, version is 0.1.0references/ paths in SKILL.md point to files that actually existskills/README.md has the new rowreferences/skills/shared/, confirm bash scripts/sync-shared-references.sh was run and the generated references/ copies are committedFor advanced trigger optimization, use the /skill-creator skill to run eval-driven description testing and iterate on your trigger phrases.
Use the PR checklist from contributing/adding-a-skill.md § "PR Checklist" in your PR description.
defdc4d
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.