supertest

supertest is a skill for Claude Code from aks-builds/quality-skills. It costs 106 tokens per session (2,203 once invoked), scanned A, original, MIT.

A testing library for sending requests directly to Node.js web applications such as Express, Koa, Fastify, or NestJS. It checks how an API responds without needing a separately running server.

In plain words
What is it for?
Use it to write, debug, or expand API tests with Jest, Vitest, Mocha, or Node's built-in test runner.
Why use it?
It helps developers test HTTP endpoints quickly and consistently inside their test suite.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import app from '../src/app';.

Part of the quality-skills plugin — 57 skills shipped together

Good fit Use it to write, debug, or expand API tests with Jest, Vitest, Mocha, or Node's built-in test runner.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/aks-builds/quality-skills
agentmods
npx agentmods add skills/aks-builds/quality-skills/supertest

Made for: Claude Code.

Or install quality-skills, the plugin that ships this one along with the rest of its 57 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for supertest

README.md
[![agentmods](https://agentmods.dev/badge/skills/aks-builds/quality-skills/supertest/github.svg)](https://agentmods.dev/skills/aks-builds/quality-skills/supertest)
Your own site
<a href="https://agentmods.dev/skills/aks-builds/quality-skills/supertest"><img src="https://agentmods.dev/badge/skills/aks-builds/quality-skills/supertest/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for supertest

Your own site · 80×15
<a href="https://agentmods.dev/skills/aks-builds/quality-skills/supertest"><img src="https://agentmods.dev/badge/skills/aks-builds/quality-skills/supertest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,203 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00106 $0.02203
Opus 5.5 $0.00042 $0.00881
Sonnet 5.5 $0.00021 $0.00441
Haiku 4.5 $0.00011 $0.00220

Measured 3mo ago against content hash 99179df828df, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

supertest scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/supertest/SKILL.md · 244 lines

How it starts

The opening of the file, as written. The whole thing — 244 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Supertest

You are an expert in supertest for Node.js HTTP testing. Your goal is to help engineers write fast, deterministic in-process API tests against Express, Koa, Fastify, NestJS, or any Node HTTP server — without fabricating method signatures or chain operations. When uncertain, point the reader to github.com/ladjs/supertest for the version they are using.

Initial Assessment

Check .agents/qa-context.md (fallback: .claude/qa-context.md) before answering. Pay attention to:

  • Node framework — Express, Koa, Fastify, NestJS, Hapi. Supertest works with any HTTP server or a callable (req, res) app. The injection point differs (e.g., app, app.callback(), app.getHttpServer()).
  • Test runner — Jest, Vitest, Mocha, Node's built-in test runner. Lifecycle hooks differ.
  • Async strategy — modern code uses async/await with supertest's promise interface; legacy code may use .end((err, res) => ...) callbacks.
  • Test depth — supertest is great for in-process tests. For black-box tests against deployed services, use plain fetch/axios + Jest, or pytest-api / rest-assured.

If the file does not exist, ask: Node framework, test runner, whether the API is HTTP-only or also talks to DB / cache / external services.


Why supertest

  • In-process — instantiates an ephemeral HTTP server on a random port and tears it down per test. No external server to manage.
  • Lightweight — a thin wrapper over superagent + http.Server. Fast startup, fast assertion.
  • Pairs well with Jest/Vitest/Mocha — async/await is the default mode.
  • Works with any Node HTTP app — Express, Koa, Fastify, NestJS, plain http.createServer.

When not to use supertest:

  • Black-box tests against a deployed service → use plain fetch/axios + Jest, or pytest-api.
  • Tests that need realistic network behavior (TLS, proxies, DNS) → use a deployed instance and axios.
  • Heavy load testing → not its purpose; see k6 / gatling.

Basic shape

import request from 'supertest';
import app from '../src/app';

describe('GET /users/:id', () => {
  it('returns the user', async () => {
    const res = await request(app)
      .get('/users/user-42')
      .set('Accept', 'application/json')
      .expect(200)
      .expect('Content-Type', /json/);

    expect(res.body).toMatchObject({
      id: 'user-42',
      email: expect.stringMatching(/@example\.com$/),
    });
  });
});

Read the full file on GitHub · 244 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 244 lines · 106 tokens per session scan A 99179df828df

Subscribe to this mod's changes

supertest is a skill published in the GitHub repository aks-builds/quality-skills (5 stars, last pushed 1mo ago), licensed MIT. It adds 106 tokens to every session and 2,203 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

supertest compared with skills from other repositories

supertest next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
supertestaks-builds/quality-skillsSkill51mo agoMITA106Claude Code
api-testingfishzjp/qa-skillsSkill722d agoMITA102Claude Code, Codex
defect-analyzerukkuru/testmetry-skillsSkill17mo agononeA38Claude Code
test-case-writerukkuru/testmetry-skillsSkill17mo agononeA50Claude Code
add-matrixnanocoai/nanoclawSkill31ktodayMITA19Claude Code
django-storages-s3Jeffallan/claude-skillsSkill13ktodayMITA138Claude Code
laravel-specialistJeffallan/claude-skillsSkill13ktodayMITA86Claude Code