Official agent skill

Write Tests

by DataDog in DataDog/datadog-ci

Write tests for datadog-ci commands and helpers using established repository patterns.

OfficialApache-2.0Auto-check passedTesting & QA

Install Write Tests

skills CLI
$ npx skills add DataDog/datadog-ci --skill write-tests -a claude-code

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

GitHub CLI
$ gh skill install DataDog/datadog-ci write-tests --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-ci.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/write-tests .claude/skills/write-tests && 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
write-tests
GitHub stars
161
Token cost
~435 tokens
SKILL.md length
160 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
Apache-2.0

At a glance

Write tests for datadog-ci commands and helpers using established repository patterns.

  • Tasks that involve Test generation
  • SKILL.md covers Conventions, Key test utilities, Patterns and Running tests
  • Calls yarn; needs MOCK_DATADOG_API_KEY
  • Tasks that involve Design patterns

What it does

Write Tests is an agent skill from DataDog/datadog-ci, published by the product's own GitHub organization. Write tests for datadog-ci commands and helpers using established repository patterns.

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

It sits in Testing & QA, covering Test generation and Design patterns. It works with Datadog and Jest. The repository describes itself as: Use Datadog from your CI. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Test generation
  • Tasks that involve Design patterns

Example prompts

  • “/write-tests”

Requirements

  • A credential in MOCK_DATADOG_API_KEY

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • yarn

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

  • Network

    No URLs in SKILL.md. Its commands use yarn, which can reach the network depending on how they are called.

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • MOCK_DATADOG_API_KEY

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

Context cost

Write Tests loads about 435 tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 160 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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-ci at commit a17526b, republished under its Apache-2.0 licence (© DataDog). 160 words, ~435 tokens.

Download SKILL.mdSave it as .claude/skills/write-tests/SKILL.md (or your agent's skills folder).
name
write-tests
description
Write tests for datadog-ci commands and helpers using established repository patterns.

Write Tests

Write tests for datadog-ci commands and helpers following the repo's established patterns. Before writing tests, read existing tests in the same package to match local patterns.

Conventions

  • Place tests in __tests__/*.test.ts next to the source, fixtures in __tests__/fixtures/

Key test utilities

From packages/base/src/helpers/__tests__/testing-tools.ts:

  • createMockContext(opts?) -- creates a mock context with stdout and stderr writable streams. Use context.stdout.toString() / context.stderr.toString() to check output.
  • makeRunCLI(commandClass, baseArgs, opts?) -- returns an async function (extraArgs, extraEnv?) => {context, code} that registers and runs a command through the full CLI pipeline.
  • createCommand(commandClass, context?) -- instantiates a command with mock context and resolved option defaults. Good for unit-testing command methods directly.
  • MOCK_DATADOG_API_KEY, MOCK_BASE_URL -- standard mock values.
  • getRequestError(status, {errors?, message?}) -- creates a mock RequestError.

Patterns

  • Use jest.spyOn() for mocking, restore in afterEach or use jest.restoreAllMocks()
  • Use jest.mock() for module-level mocks when needed
  • Table-driven tests with describe.each / test.each where appropriate
  • Check both stdout output and exit code
  • For commands that make HTTP requests, mock the request layer (e.g., fetch)

Running tests

sh
yarn test                    # all tests
yarn test <path>             # specific package or file
yarn test --testPathPattern  # regex match

© 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 .claude/skills/write-tests of DataDog/datadog-ci.

Open the folder on GitHubat commit a17526b

Compare with similar skills

Write Tests 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.

Write Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Write Tests this skillDataDog/datadog-ci161—~435Automated safety check: PassApache-2.0
Write Testsgrafana/synthetic-monitoring-app171—~1.2kAutomated safety check: PassAGPL-3.0
Write Testsopenplayerjs/openplayerjs649—~1.8kAutomated safety check: PassMIT
MoAI TDD Workflowmodu-ai/moai-adk1.2k—~3.1kAutomated safety check: PassApache-2.0
Console Testingsynnaxlabs/synnax128—~5.4kAutomated safety check: PassCustom licence
Test Patternsrohitg00/skillkit1.5k—~1.8kAutomated safety check: PassApache-2.0

Similar skills

  • Write Tests

    grafana/synthetic-monitoring-app

    Official

    Write Jest integration and unit tests for the Grafana Synthetic Monitoring app using React Testing Library, MSW, and src/test helpers.

    171 GitHub stars~1.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Write Tests

    openplayerjs/openplayerjs

    Write or extend Jest tests for OpenPlayerJS to this repo's exact conventions — makeCore factories, typed internals handles instead of as any, media property mocking, fake timers, ads/vast mocks, and…

    649 GitHub stars~1.8k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • MoAI TDD Workflow

    modu-ai/moai-adk

    Drives test-first development through the RED, GREEN, REFACTOR cycle, with a config switch that selects between TDD and a DDD workflow for existing code.

    1.2k GitHub stars~3.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Console Testing

    synnaxlabs/synnax

    Rules for writing and editing unit tests in the Console (console/src//.spec.ts[x]).

    128 GitHub stars~5.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Test Patterns

    rohitg00/skillkit

    Applies proven testing patterns — Arrange-Act-Assert (AAA), Given-When-Then, Test Data Builders, Object Mother, parameterized tests, fixtures, spies, and test doubles — to help write maintainable…

    1.5k GitHub stars~1.8k tokensUpdated 4 mo ago
    Testing & QAAuto-check passed
  • Add Tests

    MichealWayne/fe-tools

    Add or update Jest unit tests for fe-tools utilities. An agent skill from MichealWayne/fe-tools.

    207 GitHub stars~359 tokensUpdated 29 days ago
    Testing & QAAuto-check passed

More from DataDog/datadog-ci

  • Create Plugin

    DataDog/datadog-ci

    Official

    Scaffold a new datadog-ci plugin end-to-end using repository conventions.

    161 GitHub stars~441 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Write Tests

What does Write Tests do?

Write tests for datadog-ci commands and helpers using established repository patterns. Write Tests is an agent skill from DataDog/datadog-ci, published by the product's own GitHub organization. Write tests for datadog-ci commands and helpers using established repository patterns.

When should I use Write Tests?

Write Tests fits situations like: tasks that involve Test generation; tasks that involve Design patterns.

How do I install Write Tests in Claude Code?

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

How do I install Write Tests in Codex?

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

Can I use Write Tests 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-ci --skill write-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/write-tests, .gemini/skills/write-tests, .github/skills/write-tests and .opencode/skills/write-tests in your project.

What does Write Tests need to run?

Going by SKILL.md and its folder, Write Tests needs the command-line tools its instructions call (yarn) and credentials named MOCK_DATADOG_API_KEY. Our summary lists: A credential in MOCK_DATADOG_API_KEY.

Does Write Tests 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 Write Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Write Tests use?

Write Tests 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 Write Tests use?

About 435 tokens (SKILL.md is roughly 1.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 Write Tests?

Skills that share tags, products or a category with Write Tests: Write Tests (grafana/synthetic-monitoring-app, 171 stars), Write Tests (openplayerjs/openplayerjs, 649 stars), MoAI TDD Workflow (modu-ai/moai-adk, 1.2k stars) and Console Testing (synnaxlabs/synnax, 128 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Write Tests?

DataDog (a GitHub organization, an official publisher) maintains it in DataDog/datadog-ci, which has 161 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 7, 2026.

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