Agent skill

Backend Test

by qf-studio in qf-studio/navigator

Generate backend tests (unit, integration, mocks) for existing code.

MITAuto-check: notesTesting & QA

Install Backend Test

skills CLI
$ npx skills add qf-studio/navigator --skill backend-test -a claude-code

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

GitHub CLI
$ gh skill install qf-studio/navigator backend-test --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/qf-studio/navigator.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/backend-test .claude/skills/backend-test && 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
backend-test
GitHub stars
354
Token cost
~1.5k tokens
SKILL.md length
345 words
Files
1
Skills in repo
32
Repo updated
First seen
Licence
MIT

At a glance

Generate backend tests (unit, integration, mocks) for existing code.

  • Works in 6 steps: Check Existing Patterns (Phase 0) → Locate Code Under Test → Detect Test Framework → …
  • Says write test for
  • SKILL.md covers When to Invoke, Execution Steps, Success Criteria and When NOT to Use This Skill
  • Calls python3

What it does

Backend Test is an agent skill from qf-studio/navigator. Generate backend tests (unit, integration, mocks) for existing code. Auto-invoke when user says "write test for", "add test", "test this", or "create test".

Its SKILL.md is about 1.5k 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. The repository describes itself as: Finish What You Start — Context engineering for Claude Code. Sessions last 20+ exchanges instead of crashing at 7. The licence is MIT.

When your agent uses it

  • Says write test for
  • Tasks that involve Test generation

Example prompts

  • “write test for”
  • “add test”
  • “test this”
  • “/backend-test”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Check Existing Patterns (Phase 0)
  2. Locate Code Under Test
  3. Detect Test Framework
  4. Generate Test File
  5. Verify
  6. Emit Execution Summary (Graph Ingestion)

What it can do on your machine

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

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3

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

  • Network

    No URLs in SKILL.md.

    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

Backend Test loads about 1.5k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 345 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Grep, Glob, Bash

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 qf-studio/navigator at commit f1cf0eb, republished under its MIT licence (© qf-studio). 345 words, ~1,483 tokens.

Download SKILL.mdSave it as .claude/skills/backend-test/SKILL.md (or your agent's skills folder).
name
backend-test
description
Generate backend tests (unit, integration, mocks) for existing code. Auto-invoke when user says "write test for", "add test", "test this", or "create test".
allowed-tools
Read, Write, Edit, Grep, Glob, Bash
version
2.0.0

Backend Test Generator

Generate backend tests for existing code — typically code that was written without tests, or where additional coverage is needed beyond what a code-writing skill (backend-endpoint) already produced.

When to use this vs. backend-endpoint: backend-endpoint generates tests as part of creating a new endpoint. Use backend-test when the code already exists and you need to add or expand its tests.

When to Invoke

Auto-invoke when user says:

  • "Write test for [file/function]"
  • "Add test" / "Add tests"
  • "Test this"
  • "Create test for [thing]"
  • "Test the [api/service/function]"

Execution Steps

Step 0: Check Existing Patterns (Phase 0)

Query the knowledge graph for what we know about testing in this project:

bash
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$(cat "${NAVIGATOR_CONFIG_HOME:-${XDG_CONFIG_HOME:-$HOME/.config}/navigator}/plugin-root" 2>/dev/null)}"
[ -d "$PLUGIN_DIR/skills" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-graph/functions/graph_manager.py" \
  --action query --concept testing \
  --graph-path .agent/knowledge/graph.json 2>/dev/null | head -40

Surface patterns (preferred frameworks, mocking conventions) and pitfalls (flaky-test gotchas). If the graph returns nothing, proceed without it.

Step 1: Locate Code Under Test

If the user named a specific file, use it. Otherwise, ask:

What should I test?
  - File path (e.g., src/services/userService.ts)
  - Function name (e.g., authenticateUser)
  - API endpoint (e.g., POST /api/login)

Read the target file in full so the generated tests cover its actual behavior, not assumed behavior.

Step 2: Detect Test Framework
bash
# Jest
grep -q '"jest"' package.json 2>/dev/null && echo "Jest detected"
# Vitest
grep -q '"vitest"' package.json 2>/dev/null && echo "Vitest detected"
# Mocha
grep -q '"mocha"' package.json 2>/dev/null && echo "Mocha detected"
# Node test runner (built-in)
[ -f "package.json" ] && grep -q '"test":\s*"node --test' package.json && echo "node:test detected"

Detect existing test patterns by reading a peer test file under __tests__/, tests/, or *.test.ts alongside the target.

Step 3: Generate Test File

File location: place tests where existing tests live (mirror the project's convention — colocated *.test.ts next to source, or under a tests/ directory).

Structure (Jest/Vitest):

typescript
import { describe, it, expect, beforeEach, vi } from 'vitest';  // or 'jest'
import { {FUNCTION_NAME} } from '{TARGET_PATH}';

describe('{FUNCTION_NAME}', () => {
  describe('happy path', () => {
    it('returns expected result for valid input', () => {
      const result = {FUNCTION_NAME}({VALID_INPUT});
      expect(result).toEqual({EXPECTED});
    });
  });

  describe('error cases', () => {
    it('throws on invalid input', () => {
      expect(() => {FUNCTION_NAME}({INVALID_INPUT})).toThrow();
    });
  });

  describe('edge cases', () => {
    it('handles empty input', () => { /* ... */ });
    it('handles boundary values', () => { /* ... */ });
  });
});

For API/integration tests (supertest pattern):

typescript
import request from 'supertest';
import { app } from '{APP_PATH}';

describe('{METHOD} {PATH}', () => {
  it('returns 200 for valid request', async () => {
    const response = await request(app).{method}('{PATH}').send({BODY});
    expect(response.status).toBe(200);
    expect(response.body).toMatchObject({EXPECTED_SHAPE});
  });

  it('returns 4xx for invalid request', async () => {
    const response = await request(app).{method}('{PATH}').send({BAD_BODY});
    expect(response.status).toBe(400);
  });
});
Step 4: Verify

Run the generated tests:

bash
{TEST_COMMAND} {TEST_FILE_PATH}

If any fail because tests assume incorrect behavior, fix the tests, not the source — unless the source has an actual bug. If the source is buggy, surface that to the user; don't silently change it.

Step 5: Emit Execution Summary (Graph Ingestion)
json
{
  "execution_summary": {
    "skill": "backend-test",
    "task": "tests for {TARGET}",
    "files_created": ["{test file path}"],
    "files_modified": [],
    "tests_added": ["{test file path}"],
    "stack_detected": "{e.g. vitest+supertest}",
    "patterns_followed": [
      {"summary": "{e.g. supertest pattern for HTTP integration tests}", "concepts": ["testing", "api"], "confidence": 0.8}
    ],
    "decisions_made": [
      {"summary": "{e.g. mocked the DB client because tests must run offline}", "concepts": ["testing"], "confidence": 0.75}
    ],
    "pitfalls_avoided": [],
    "assumptions_made": ["{e.g. project uses Vitest globals — no explicit import needed}"]
  }
}

Ingest:

bash
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$(cat "${NAVIGATOR_CONFIG_HOME:-${XDG_CONFIG_HOME:-$HOME/.config}/navigator}/plugin-root" 2>/dev/null)}"
[ -d "$PLUGIN_DIR/skills" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
echo '<execution_summary JSON>' | python3 "$PLUGIN_DIR/skills/nav-graph/functions/execution_to_graph.py" -

Success Criteria

  • Test file located where the project keeps tests (mirrors convention)
  • Happy path, error cases, and at least one edge case covered
  • Mocks isolate the unit under test
  • All generated tests pass on first run (or surface real bugs in the source)
  • Execution summary emitted

When NOT to Use This Skill

  • You're creating a new endpoint from scratch — use backend-endpoint (it generates tests as part of its workflow)
  • You want to test a UI component — use frontend-test

© qf-studio, 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 skills/backend-test of qf-studio/navigator.

Open the folder on GitHubat commit f1cf0eb

Compare with similar skills

Backend Test 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.

Backend Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Backend Test this skillqf-studio/navigator354—~1.5kAutomated safety check: NotesMIT
Emcaklofas/kicad-happy1.4k1 repos~2.8kAutomated safety check: PassMIT
Swig Testswig/swig6.3k—~2.3kAutomated safety check: PassCustom licence
Generate Test Cases342164796/generate-test-cases1191 repos~2.9kAutomated safety check: PassNone
Verify Cc Safety Netkenryu42/cc-safety-net1.6k—~2kAutomated safety check: PassMIT
Wioworkersio/skills190—~5.8kAutomated safety check: PassMIT

Similar skills

  • Emc

    aklofas/kicad-happy

    EMC pre-compliance risk analysis for KiCad PCB designs — 18 check categories, 44 rule IDs covering ground planes, decoupling, I/O filtering, switching harmonics, clock routing, differential pair…

    1.4k GitHub starsUsed in 1 repo~2.8k tokens
    Testing & QAAuto-check passed
  • Swig Test

    swig/swig

    Run SWIG test suite for specific languages. An agent skill from swig/swig.

    6.3k GitHub stars~2.3k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Generate Test Cases

    342164796/generate-test-cases

    自主学习型测试文档生成器。从需求文档(Markdown)生成测试用例 XMind 文件,支持持久化记忆和持续学习。当用户提到"生成测试用例"、"根据需求生成测试"时触发。

    119 GitHub starsUsed in 1 repo~2.9k tokens
    Testing & QAAuto-check passed
  • Verify Cc Safety Net

    kenryu42/cc-safety-net

    Launch and drive the real cc-safety-net CLI — the hook decision path, explain, status/doctor, logs, and the local policy GUI — against an isolated home, capturing evidence.

    1.6k GitHub stars~2k tokensUpdated today
    Testing & QAAuto-check passed
  • Wio

    workersio/skills

    Testing workflow skill for finding high-value test candidates, writing focused tests, generating realistic workloads, reviewing test value, and diagnosing test-suite health.

    190 GitHub stars~5.8k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed
  • File Server

    microsoft/WindowsProtocolTestSuites

    Official

    ALWAYS LOAD THIS SKILL when working with FileServer, SMB, SMB2, SMB3, CIFS, file sharing, MS-SMB2, MS-FSCC, MS-FSA, MS-DFSC, MS-FSRVP, MS-RSVD, MS-SQOS, or any file server protocol test…

    567 GitHub stars~4.1k tokensUpdated 22 days ago
    Testing & QAAuto-check passed

More from qf-studio/navigator

All 32 skills in this repo
  • Backend Endpoint

    qf-studio/navigator

    Create REST/GraphQL API endpoint with validation, error handling, and tests.

    354 GitHub starsUsed in 1 repo~4.5k tokens
    Auto-check: notes
  • Nav Start

    qf-studio/navigator

    Load Navigator documentation navigator when starting development session, resuming work, or beginning new feature.

    354 GitHub stars~4.7k tokensUpdated today
    Auto-check: notes
  • Database Migration

    qf-studio/navigator

    Create database migration with schema changes and rollback. An agent skill from qf-studio/navigator.

    354 GitHub stars~3.7k tokensUpdated today
    Auto-check: notes
  • Frontend Component

    qf-studio/navigator

    Create React/Vue component with TypeScript, tests, and styles.

    354 GitHub stars~4.5k tokensUpdated today
    Auto-check: notes
  • Frontend Test

    qf-studio/navigator

    Generate frontend component tests (React Testing Library, Vue Test Utils, snapshot) for existing components.

    354 GitHub stars~1.6k tokensUpdated today
    Auto-check: notes
  • Nav Compact

    qf-studio/navigator

    Clear conversation context while preserving knowledge via context marker.

    354 GitHub stars~2.1k tokensUpdated today
    Auto-check: notes

Categories

Questions about Backend Test

What does Backend Test do?

Generate backend tests (unit, integration, mocks) for existing code. Backend Test is an agent skill from qf-studio/navigator. Generate backend tests (unit, integration, mocks) for existing code.

When should I use Backend Test?

Backend Test fits situations like: says write test for; tasks that involve Test generation.

How do I install Backend Test in Claude Code?

Run `npx skills add qf-studio/navigator --skill backend-test -a claude-code`. Or copy the skill folder (skills/backend-test in qf-studio/navigator) into .claude/skills/backend-test in your project. Claude Code loads it when a task matches its description.

How do I install Backend Test in Codex?

Run `npx skills add qf-studio/navigator --skill backend-test -a codex`. Or copy the skill folder (skills/backend-test in qf-studio/navigator) into .agents/skills/backend-test in your project. Codex loads it when a task matches its description.

Can I use Backend Test 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 qf-studio/navigator --skill backend-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/backend-test, .gemini/skills/backend-test, .github/skills/backend-test and .opencode/skills/backend-test in your project.

What does Backend Test need to run?

Going by SKILL.md and its folder, Backend Test needs the command-line tools its instructions call (python3). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash.

Does Backend Test 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 Backend Test safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Backend Test use?

Backend Test 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 Backend Test use?

About 1.5k tokens (SKILL.md is roughly 5.9k 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 Backend Test?

Skills that share tags, products or a category with Backend Test: Emc (aklofas/kicad-happy, 1.4k stars), Swig Test (swig/swig, 6.3k stars), Generate Test Cases (342164796/generate-test-cases, 119 stars) and Verify Cc Safety Net (kenryu42/cc-safety-net, 1.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Backend Test?

qf-studio (a GitHub organization) maintains it in qf-studio/navigator, which has 354 GitHub stars. The repository holds 32 skills in this directory. The repository was last updated on October 7, 2026.

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