backend/testing-guide

backend/testing-guide is a skill for Claude Code from echoVic/boss-skill. It costs 30 tokens per session (4,164 once invoked), scanned A, original, MIT.

A guide for writing backend tests: small unit tests, tests that check connected parts such as an API and database, and end-to-end tests that follow a complete user flow.

In plain words
What is it for?
Use it when adding or reviewing backend tests, especially for service layers, API endpoints, database access, and full request flows.
Why use it?
It gives developers a clear testing structure and helps ensure business logic, API endpoints, database operations, and complete API flows are covered.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: agent in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { UserRepository } from '../repositories/userRepository';.

Part of the boss plugin — 39 skills, 10 commands, 10 agents, 8 hooks shipped together

Good fit Use it when adding or reviewing backend tests, especially for service layers, API endpoints, database access, and full request flows.

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/echoVic/boss-skill
agentmods
npx agentmods add skills/echovic/boss-skill/testing-guide

Made for: Claude Code.

Or install boss, the plugin that ships this one along with the rest of its 39 skills, 10 commands, 10 agents, 8 hooks.

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 backend/testing-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/echovic/boss-skill/testing-guide/github.svg)](https://agentmods.dev/skills/echovic/boss-skill/testing-guide)
Your own site
<a href="https://agentmods.dev/skills/echovic/boss-skill/testing-guide"><img src="https://agentmods.dev/badge/skills/echovic/boss-skill/testing-guide/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 backend/testing-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/echovic/boss-skill/testing-guide"><img src="https://agentmods.dev/badge/skills/echovic/boss-skill/testing-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,164 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 251
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00030 $0.04164
Opus 5.5 $0.00012 $0.01666
Sonnet 5.5 $0.00006 $0.00833
Haiku 4.5 $0.00003 $0.00416

Measured 11d ago against content hash ecedd6fed53b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

backend/testing-guide 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 11d 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.

skill/skills/backend/testing-guide/SKILL.md · 605 lines

How it starts

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

后端测试编写指南

测试要求(强制)

职责边界:Backend Agent 是测试的编写者,QA Agent 是测试的验证者。

测试金字塔

测试类型 占比 要求
单元测试 ~70% Service 层、业务逻辑必须有测试
集成测试 ~20% API 端点、数据库操作测试
E2E 测试 ~10% 必须编写,完整 API 流程测试

单元测试编写

Service 层测试

// services/userService.test.ts
import { UserService } from './userService';
import { UserRepository } from '../repositories/userRepository';

jest.mock('../repositories/userRepository');

describe('UserService', () => {
  let userService: UserService;
  let userRepository: jest.Mocked<UserRepository>;

  beforeEach(() => {
    userRepository = new UserRepository() as jest.Mocked<UserRepository>;
    userService = new UserService(userRepository);
  });

  describe('getById', () => {
    it('returns user when found', async () => {
      const mockUser = { id: '1', name: 'Alice', email: '[email protected]' };
      userRepository.findById.mockResolvedValue(mockUser);

      const result = await userService.getById('1');

      expect(result).toEqual(mockUser);
      expect(userRepository.findById).toHaveBeenCalledWith('1');
    });

    it('throws NotFoundError when user not found', async () => {
      userRepository.findById.mockResolvedValue(null);

      await expect(userService.getById('999')).rejects.toThrow('User not found');
    });
  });

  describe('create', () => {
    it('creates user with valid data', async () => {
      const createData = { name: 'Bob', email: '[email protected]' };
      const mockUser = { id: '2', ...createData };

      userRepository.findByEmail.mockResolvedValue(null);
      userRepository.create.mockResolvedValue(mockUser);

      const result = await userService.create(createData);

      expect(result).toEqual(mockUser);
      expect(userRepository.findByEmail).toHaveBeenCalledWith('[email protected]');
      expect(userRepository.create).toHaveBeenCalledWith(createData);
    });

    it('throws ConflictError when email already exists', async () => {
      const createData = { name: 'Bob', email: '[email protected]' };
      userRepository.findByEmail.mockResolvedValue({
        id: '1',
        name: 'Existing',
        email: '[email protected]',
      });

      await expect(userService.create(createData)).rejects.toThrow('Email already exists');
    });
  });
});

Read the full file on GitHub · 605 lines

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. 11d ago Changed · -1 lines ecedd6fed53b
  2. 15d ago Changed · +3 lines d1cada07c7db
  3. 1mo ago Changed · -25 lines e574c63a212e
  4. 2mo ago Changed · +2 lines e6ff5e8fa365
  5. 3mo ago First seen · 626 lines · 30 tokens per session scan A f6683e48051e

Subscribe to this mod's changes

backend/testing-guide is a skill published in the GitHub repository echoVic/boss-skill (630 stars, last pushed yesterday), licensed MIT. It adds 30 tokens to every session and 4,164 once invoked, about $0.0001 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-30.

Related

backend/testing-guide compared with skills from other repositories

backend/testing-guide next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
backend/testing-guideechoVic/boss-skillSkill630yesterdayMITA30Claude Code
convex-testopenclaw/clawhubSkill9.6ktodayMITA16Claude Code, Codex
dsh-ci-test-reliabilityqufei1993/skills-hubSkill1.9k2d agoMITA76Codex
test-runnerPrismer-AI/PrismerCloudSkill1.4k1mo agoMITA59Claude Code
testingevanca/flutter-ai-rulesSkill67719d agoMITA33Claude Code
designing-testsCloudAI-X/claude-workflow-v2Skill1.4k1mo agoMITA48Claude Code
Codeception TestingPramodDutta/qaskillsSkill25328d agoMITA42Claude Code, Codex