Agent skill

Unit Testing

by javierbrea in javierbrea/eslint-plugin-boundaries

Complete or maximize unit test coverage for a specific TypeScript file in this repo.

MITAuto-check passedTesting & QA

Install Unit Testing

skills CLI
$ npx skills add javierbrea/eslint-plugin-boundaries --skill unit-testing -a claude-code

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

GitHub CLI
$ gh skill install javierbrea/eslint-plugin-boundaries unit-testing --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/javierbrea/eslint-plugin-boundaries.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/unit-testing .claude/skills/unit-testing && 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
unit-testing
GitHub stars
997
Token cost
~618 tokens
SKILL.md length
236 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Complete or maximize unit test coverage for a specific TypeScript file in this repo.

  • Works in 5 steps: Run the target test file with coverage… → Find missing branches by inspecting… → Add tests to hit uncovered branches.… → …
  • : a test run is short of the 100% coverage threshold and you need to find and close the gap
  • SKILL.md covers Completing coverage for a… and Handling unreachable or…
  • Calls pnpm

What it does

Unit Testing is an agent skill from javierbrea/eslint-plugin-boundaries. Complete or maximize unit test coverage for a specific TypeScript file in this repo. Use when: a test run is short of the 100% coverage threshold and you need to find and close the gap, or when deciding whether an uncovered branch is genuinely unreachable. For everyday test-writing conventions (AAA, mocking, placement, type safety), see .agents/rules/unit-testing.md instead — it loads automatically for any .spec.ts file.

Its SKILL.md is about 620 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. It works with TypeScript and ESLint. The repository describes itself as: Enforce architectural boundaries in your JavaScript and TypeScript projects. The licence is MIT.

When your agent uses it

  • : a test run is short of the 100% coverage threshold and you need to find and close the gap
  • Deciding whether an uncovered branch is genuinely unreachable

Example prompts

  • “/unit-testing”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Run the target test file with coverage to get a baseline
  2. Find missing branches by inspecting packages//coverage/lcov.info for BRDA entries with zero hits. Map uncovered branches to exact…
  3. Add tests to hit uncovered branches. Re-run after each change. Repeat until resolved or justified.
  4. Prefer adding tests over suppressing coverage.
  5. If uncovered logic appears obsolete, do not change production code — present evidence and request user confirmation first.

What it can do on your machine

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

    • pnpm

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

  • Network

    No URLs in SKILL.md. Its commands use pnpm, 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

Unit Testing loads about 618 tokens when it runs. Until then it costs about 110 tokens; SKILL.md has 236 words of instructions outside code blocks.

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

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 javierbrea/eslint-plugin-boundaries at commit 50f2d31, republished under its MIT licence (© javierbrea). 236 words, ~618 tokens.

Download SKILL.mdSave it as .claude/skills/unit-testing/SKILL.md (or your agent's skills folder).
name
unit-testing
description
Complete or maximize unit test coverage for a specific TypeScript file in this repo. Use when: a test run is short of the 100% coverage threshold and you need to find and close the gap, or when deciding whether an uncovered branch is genuinely unreachable. For everyday test-writing conventions (AAA, mocking, placement, type safety), see .agents/rules/unit-testing.md instead — it loads automatically for any *.spec.ts file.
argument-hint
Path to target test or source file under packages/ (e.g., packages/elements/src/Matcher/ElementsMatcher.ts)

Unit Testing — closing coverage gaps

All packages enforce 100% coverage (branches, functions, lines, statements) via jest.config.js's coverageThreshold.global; any drop below fails the build. For AAA structure, mocking, placement, and type safety, follow .agents/rules/unit-testing.md — this skill only covers the coverage-completion workflow. For the general Nx-vs-direct command choice, see the root AGENTS.md.

Completing coverage for a specific file

  1. Run the target test file with coverage to get a baseline:
    bash
    cd packages/<package-name>
    pnpm test:unit <test-file>
  2. Find missing branches by inspecting packages/<package-name>/coverage/lcov.info for BRDA entries with zero hits. Map uncovered branches to exact conditions in the source.
  3. Add tests to hit uncovered branches. Re-run after each change. Repeat until resolved or justified.
  4. Prefer adding tests over suppressing coverage.
  5. If uncovered logic appears obsolete, do not change production code — present evidence and request user confirmation first.

Handling unreachable or defensive branches

When a branch is genuinely unreachable at runtime and cannot be exercised through tests, mark it with an istanbul ignore comment that justifies why:

typescript
/* istanbul ignore next -- Defensive guard: invalid parser state is impossible through public API */

Rules for istanbul ignore:

  1. Always include a justification after the -- separator.
  2. Prefer making code non-optional over ignoring it. If a default is never exercised, remove it instead of adding an ignore comment.
  3. Only use for genuinely unreachable code. If a branch can be triggered through a public API, write a test for it.
  4. Keep the ignore scope as narrow as possible. Place on the specific line or branch, not on entire functions.

© javierbrea, 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 .agents/skills/unit-testing of javierbrea/eslint-plugin-boundaries.

Open the folder on GitHubat commit 50f2d31

Compare with similar skills

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

Unit Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unit Testing this skilljavierbrea/eslint-plugin-boundaries997—~618Automated safety check: PassMIT
Eslint Vitest Rule Testerantfu-collective/eslint-vitest-rule-tester142—~1.3kAutomated safety check: PassMIT
Run Pre Commit Checksmicrosoft/vscode-python-environments141—~898Automated safety check: PassMIT
Typescriptalinaqi/maggy707—~1.3kAutomated safety check: PassMIT
Typescript Rulessoftspark/ai-toolkit179—~2.7kAutomated safety check: NotesApache-2.0
Implementing Lint Rulesflint-fyi/flint311—~857Automated safety check: PassMIT

Similar skills

  • Eslint Vitest Rule Tester

    antfu-collective/eslint-vitest-rule-tester

    Help users test ESLint rules with Vitest, supporting snapshot testing and custom assertions

    142 GitHub stars~1.3k tokensUpdated 28 days ago
    Testing & QAAuto-check passed
  • Run Pre Commit Checks

    microsoft/vscode-python-environments

    Official

    Run the mandatory pre-commit checks before committing code. An agent skill from microsoft/vscode-python-environments.

    141 GitHub stars~898 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Typescript

    alinaqi/maggy

    TypeScript strict mode with eslint and jest. An agent skill from alinaqi/maggy.

    707 GitHub stars~1.3k tokensUpdated 13 days ago
    Testing & QAAuto-check passed
  • Typescript Rules

    softspark/ai-toolkit

    TypeScript/JavaScript coding rules: style, patterns, security, testing.

    179 GitHub stars~2.7k tokensUpdated today
    Testing & QAAuto-check: notes
  • Implements ESLint-style lint rules with proper AST handling, targeted reporting, and comprehensive unit tests.

    311 GitHub stars~857 tokensUpdated today
    DevelopmentAuto-check passed
  • Npx CLI

    jwynia/agent-skills

    Build and publish npx-executable CLI tools using Bun as the primary toolchain with npm-compatible output.

    165 GitHub stars~2.4k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed

More from javierbrea/eslint-plugin-boundaries

  • Boundaries Architect

    javierbrea/eslint-plugin-boundaries

    Act as a software architect: analyze a repository's folder structure and cross-file import dependencies, detect its architectural pattern, design element/file boundaries with the user, and configure…

    997 GitHub stars~4.2k tokensUpdated 2 days ago
    Auto-check passed
  • Review PR

    javierbrea/eslint-plugin-boundaries

    Review a GitHub pull request from three perspectives — functional fit against its linked issue, code correctness/quality, and architectural boundaries — then post a single GitHub review: one general…

    997 GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed
  • Create PR

    javierbrea/eslint-plugin-boundaries

    Create or update a GitHub pull request for the current branch from the repository's fixed PR template (.github/PULLREQUESTTEMPLATE.md) and the branch changes.

    997 GitHub stars~2.3k tokensUpdated 2 days ago
    Auto-check passed
  • Repo Architecture

    javierbrea/eslint-plugin-boundaries

    Cross-cutting architecture reference for the eslint-plugin-boundaries monorepo — the dependency graph between packages, the Nx target graph, and the release flow.

    997 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Unit Testing

What does Unit Testing do?

Complete or maximize unit test coverage for a specific TypeScript file in this repo. Unit Testing is an agent skill from javierbrea/eslint-plugin-boundaries. Complete or maximize unit test coverage for a specific TypeScript file in this repo.

When should I use Unit Testing?

Unit Testing fits situations like: : a test run is short of the 100% coverage threshold and you need to find and close the gap; deciding whether an uncovered branch is genuinely unreachable.

How do I install Unit Testing in Claude Code?

Run `npx skills add javierbrea/eslint-plugin-boundaries --skill unit-testing -a claude-code`. Or copy the skill folder (.agents/skills/unit-testing in javierbrea/eslint-plugin-boundaries) into .claude/skills/unit-testing in your project. Claude Code loads it when a task matches its description.

How do I install Unit Testing in Codex?

Run `npx skills add javierbrea/eslint-plugin-boundaries --skill unit-testing -a codex`. Or copy the skill folder (.agents/skills/unit-testing in javierbrea/eslint-plugin-boundaries) into .agents/skills/unit-testing in your project. Codex loads it when a task matches its description.

Can I use Unit Testing 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 javierbrea/eslint-plugin-boundaries --skill unit-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/unit-testing, .gemini/skills/unit-testing, .github/skills/unit-testing and .opencode/skills/unit-testing in your project.

What does Unit Testing need to run?

Going by SKILL.md and its folder, Unit Testing needs the command-line tools its instructions call (pnpm).

Does Unit Testing 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 Unit Testing 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 Unit Testing use?

Unit Testing 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 Unit Testing use?

About 618 tokens (SKILL.md is roughly 2.5k 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 Unit Testing?

Skills that share tags, products or a category with Unit Testing: Eslint Vitest Rule Tester (antfu-collective/eslint-vitest-rule-tester, 142 stars), Run Pre Commit Checks (microsoft/vscode-python-environments, 141 stars), Typescript (alinaqi/maggy, 707 stars) and Typescript Rules (softspark/ai-toolkit, 179 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unit Testing?

javierbrea (a GitHub user) maintains it in javierbrea/eslint-plugin-boundaries, which has 997 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 5, 2026.

Source: javierbrea/eslint-plugin-boundaries on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.