Official agent skill

Run Unit Tests

by Azure in Azure/cosmos-explorer

Run unit tests for the Cosmos Explorer project. An agent skill from Azure/cosmos-explorer.

OfficialMITAuto-check passedTesting & QA

Install Run Unit Tests

skills CLI
$ npx skills add Azure/cosmos-explorer --skill run-unit-tests -a claude-code

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

GitHub CLI
$ gh skill install Azure/cosmos-explorer run-unit-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/Azure/cosmos-explorer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/run-unit-tests .claude/skills/run-unit-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
run-unit-tests
GitHub stars
131
Token cost
~638 tokens
SKILL.md length
261 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Run unit tests for the Cosmos Explorer project. An agent skill from Azure/cosmos-explorer.

  • Asked to run tests
  • SKILL.md covers Pre-Test: Check Dependencies, Run All Unit Tests, Run a Single Test File and Run Tests in Debug Mode, plus 2 more sections
  • Calls npm and npx
  • Check test results

What it does

Run Unit Tests is an agent skill from Azure/cosmos-explorer, published by the product's own GitHub organization. Run unit tests for the Cosmos Explorer project. Use this skill when asked to run tests, check test results, or debug test failures.

Its SKILL.md is about 640 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 Unit testing and Failing and flaky tests. It works with Jest and npm. The repository describes itself as: UI for Azure Cosmos DB. Powers the Azure Portal, https://cosmos.azure.com/, and the Cosmos DB Emulator. The licence is MIT.

When your agent uses it

  • Asked to run tests
  • Check test results
  • Debug test failures

Example prompts

  • “/run-unit-tests”

Requirements

  • Node.js
  • Pre-approved tools (allowed-tools): shell

What it can do on your machine

Read from SKILL.md and the folder at commit 226a7a2. 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:

    • shell

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • npx

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

  • Network

    No URLs in SKILL.md. Its commands use npm and npx, 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 no API keys, tokens, secrets or passwords.

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

Context cost

Run Unit Tests loads about 638 tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 261 words of instructions outside code blocks.

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

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 Azure/cosmos-explorer at commit 226a7a2, republished under its MIT licence (© Azure). 261 words, ~638 tokens.

Download SKILL.mdSave it as .claude/skills/run-unit-tests/SKILL.md (or your agent's skills folder).
name
run-unit-tests
description
Run unit tests for the Cosmos Explorer project. Use this skill when asked to run tests, check test results, or debug test failures.
allowed-tools
shell

Test Skill

Use the following commands to run unit tests for the Cosmos Explorer project.

Pre-Test: Check Dependencies

Before running tests, check whether npm install needs to be run:

bash
if [ ! -d node_modules ] || [ package.json -nt node_modules ] || [ package-lock.json -nt node_modules ]; then
  npm install
fi

On Windows PowerShell:

powershell
if (-not (Test-Path node_modules) -or
    (Get-Item package.json).LastWriteTime -gt (Get-Item node_modules).LastWriteTime -or
    (Get-Item package-lock.json).LastWriteTime -gt (Get-Item node_modules).LastWriteTime) {
    npm install
}

Always run this check before proceeding with any test command.

Run All Unit Tests

Run the full test suite with coverage:

bash
npm test

This clears the coverage/ directory and runs Jest with coverage collection enabled.

Run a Single Test File

Run a specific test file without coverage (faster):

bash
npm run test:file -- path/to/file.test.ts

Run Tests in Debug Mode

Run tests serially (useful for debugging flaky or interdependent tests):

bash
npm run test:debug

Run Tests Matching a Pattern

Run only tests whose names match a pattern:

bash
npx jest --coverage=false --testPathPattern="SomeComponent"

Guidelines

  • When asked to simply "run tests" or "test", run npm test for the full suite.
  • When asked to test a specific file or component, use npm run test:file -- <path>.
  • When debugging test failures, use npm run test:debug to run serially.
  • Unit test files live adjacent to source files (Foo.test.ts next to Foo.ts in src/).
  • Tests use Jest with jest-environment-jsdom.
  • Use @testing-library/react for new component tests. Do not use Enzyme for new tests.
  • Use Jest built-in mocking, not sinon.js.
  • Coverage thresholds are enforced globally: branches 25%, functions 24%, lines 28%, statements 28%.
  • If tests fail, read the error output carefully. Common issues include:
    • Snapshot mismatches: Review the diff. If the change is intentional, update snapshots with npx jest --updateSnapshot.
    • Mock issues: Ensure mocks are set up correctly and reset between tests.
    • Import errors: Check that module name mappings in jest.config.js are correct.
    • Type errors in tests: Run npm run compile to check for TypeScript issues.

© Azure, MIT. 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 .github/skills/run-unit-tests of Azure/cosmos-explorer.

Open the folder on GitHubat commit 226a7a2

Compare with similar skills

Run Unit 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.

Run Unit Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Run Unit Tests this skillAzure/cosmos-explorer131—~638Automated safety check: PassMIT
Handsontable Unit Testinghandsontable/handsontable22k—~1.2kAutomated safety check: PassCustom licence
Parse Error Logsmaslennikov-ig/claude-code-orchestrator-kit260—~1.5kAutomated safety check: PassCustom licence
Test Guidelinesgetsentry/sentry-react-native1.8k—~1.3kAutomated safety check: PassMIT
Designing TestsCloudAI-X/claude-workflow-v21.4k1 repos~1.5kAutomated safety check: PassMIT
Playwright Testingchongdashu/vibejam-starter-pack149—~2.1kAutomated safety check: PassNone

Similar skills

  • Handsontable Unit Testing

    handsontable/handsontable

    Conventions for Handsontable's Jest unit and TypeScript type tests: where files go, how to run them, mocking limits and when to write an E2E test instead.

    22k GitHub stars~1.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Parse Error Logs

    maslennikov-ig/claude-code-orchestrator-kit

    Parse build errors, test failures, type-check output, and validation logs into structured data.

    260 GitHub stars~1.5k tokensUpdated 7 mo ago
    Testing & QAAuto-check passed
  • Test Guidelines

    getsentry/sentry-react-native

    Official

    Enforce Sentry React Native SDK test conventions for naming, structure, mocking, and fixtures with Jest.

    1.8k GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Designing Tests

    CloudAI-X/claude-workflow-v2

    Designs and implements testing strategies for any codebase. An agent skill from CloudAI-X/claude-workflow-v2.

    1.4k GitHub starsUsed in 1 repo~1.5k tokens
    Testing & QAAuto-check passed
  • Playwright Testing

    chongdashu/vibejam-starter-pack

    Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.

    149 GitHub stars~2.1k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Playwright Testing

    chongdashu/vibejam-starter-pack

    Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.

    149 GitHub stars~2.2k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed

More from Azure/cosmos-explorer

  • Dev Server

    Azure/cosmos-explorer

    Official

    Start the local webpack dev server and connect to it with the Playwright browser.

    131 GitHub stars~1.6k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Run Unit Tests

What does Run Unit Tests do?

Run unit tests for the Cosmos Explorer project. An agent skill from Azure/cosmos-explorer. Run Unit Tests is an agent skill from Azure/cosmos-explorer, published by the product's own GitHub organization. Run unit tests for the Cosmos Explorer project.

When should I use Run Unit Tests?

Run Unit Tests fits situations like: asked to run tests; check test results; debug test failures.

How do I install Run Unit Tests in Claude Code?

Run `npx skills add Azure/cosmos-explorer --skill run-unit-tests -a claude-code`. Or copy the skill folder (.github/skills/run-unit-tests in Azure/cosmos-explorer) into .claude/skills/run-unit-tests in your project. Claude Code loads it when a task matches its description.

How do I install Run Unit Tests in Codex?

Run `npx skills add Azure/cosmos-explorer --skill run-unit-tests -a codex`. Or copy the skill folder (.github/skills/run-unit-tests in Azure/cosmos-explorer) into .agents/skills/run-unit-tests in your project. Codex loads it when a task matches its description.

Can I use Run Unit 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 Azure/cosmos-explorer --skill run-unit-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/run-unit-tests, .gemini/skills/run-unit-tests, .github/skills/run-unit-tests and .opencode/skills/run-unit-tests in your project.

What does Run Unit Tests need to run?

Going by SKILL.md and its folder, Run Unit Tests needs the command-line tools its instructions call (npm and npx). Our summary lists: Node.js. Its frontmatter pre-approves these tools: shell.

Does Run Unit Tests access the network?

SKILL.md contains no URLs. Its commands use npm and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Run Unit 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 Run Unit Tests use?

Run Unit Tests is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Run Unit Tests use?

About 638 tokens (SKILL.md is roughly 2.6k 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 Run Unit Tests?

Skills that share tags, products or a category with Run Unit Tests: Handsontable Unit Testing (handsontable/handsontable, 22k stars), Parse Error Logs (maslennikov-ig/claude-code-orchestrator-kit, 260 stars), Test Guidelines (getsentry/sentry-react-native, 1.8k stars) and Designing Tests (CloudAI-X/claude-workflow-v2, 1.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Run Unit Tests?

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

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