Automated test scaffolding

VerifiedSafe

Generates unit, integration, and edge-case tests from existing code, including mocks and scenarios.

Sby Skills Guide Bot
TestingIntermediate
8/9/2026
Claude CodeCursorCodex
#unit-testing#test-generation#mocks#edge-cases#test-coverage

Recommended for

Automated summary

This skill generates a complete automated test structure (unit, integration and edge cases) from existing production code, scaffolding mocks for the external dependencies it detects.

Strengths

  • Identifies external boundaries (database, APIs, cache, system clock) and creates stubs, spies and mocks to isolate the component
  • Systematically covers happy paths, boundary values and exception handling (network failures, nulls, invalid returns)
  • Places the test file (*.spec.* or *_test.*) according to the framework convention detected in memorys/architecture.md
  • Enforces descriptive test names and behavior-focused testing over structural testing, reducing brittle tests

Limitations

  • Relies on memorys/architecture.md existing and being accurate for framework and test-location conventions
  • Does not mention running the tests or verifying they pass, so generated output needs manual validation
  • Dependency detection is heuristic; implicit coupling may be missed by the mock scaffolding
  • No actual coverage measurement is produced, despite the goal of increasing coverage
When to use it

Use it when production code already exists and you need to quickly produce a skeleton of isolated tests with mocks.

When not to use it

Avoid it when the project has no documented testing convention, or when the goal is to measure and drive coverage rather than write new tests.

Security analysis

Safe
Quality score78/100

The skill only describes a workflow for generating test files and mocks. It does not declare or instruct the use of destructive commands, network exfiltration, obfuscated payloads, or disabling safety mechanisms. No meaningful execution risk.

No concerns found

How this analysis is made

Examples

Tests pour un service
Escreva testes para src/services/payment.service.ts, cobrindo caminhos felizes, valores limite e falhas de rede.
Aumentar cobertura de utilitário
Aumente a cobertura de src/utils/date.ts criando testes de edge cases para datas inválidas e fusos horários.
Mocks de fronteiras externas
Crie mocks para as chamadas HTTP e ao banco de dados nos testes do UserRepository e gere o arquivo de teste no padrão do projeto.

name: test-scaffold description: Gera estrutura completa de testes automatizados (unitários, integração e edge cases) com base no código existente. Use para "escrever testes para este arquivo", "aumentar cobertura" ou "criar mocks".

Workflow

  1. Contexto de Teste: Analisa o código de produção alvo e identifica as dependências externas (banco, APIs, cache, relógio do sistema).
  2. Scaffolding de Mocks: Cria stubs, spies e mocks para todas as fronteiras externas detectadas, isolando o componente.
  3. Geração de Cenários:
    • Caminhos Felizes (Happy Paths).
    • Limites (Boundary values / Edge cases).
    • Tratamento de Exceções (Falhas de rede, null pointers, retornos inválidos).
  4. Criação de Artefatos: Gera o arquivo de teste *.spec.* ou *_test.* no local adequado conforme o padrão do framework detectado em memorys/architecture.md.

Restrições

  • Testes devem usar nomes descritivos.
  • Foco em testar o comportamento (Behavior) e não a implementação estrutural, evitando testes frágeis.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/automated-test-scaffolding-msl9ceps/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/automated-test-scaffolding-msl9ceps' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/automated-test-scaffolding-msl9ceps/download' --output '.skill-downloads/automated-test-scaffolding-msl9ceps/SKILL.md.part' && mv '.skill-downloads/automated-test-scaffolding-msl9ceps/SKILL.md.part' '.skill-downloads/automated-test-scaffolding-msl9ceps/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/automated-test-scaffolding-msl9ceps/SKILL.md' && test -s '.skill-downloads/automated-test-scaffolding-msl9ceps/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/test-scaffold' && cp -R '.skill-downloads/automated-test-scaffolding-msl9ceps' '.claude/skills/test-scaffold'

Cursor
test -f '.skill-downloads/automated-test-scaffolding-msl9ceps/SKILL.md' && test -s '.skill-downloads/automated-test-scaffolding-msl9ceps/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/test-scaffold' && cp -R '.skill-downloads/automated-test-scaffolding-msl9ceps' '.cursor/skills/test-scaffold'

Codex
test -f '.skill-downloads/automated-test-scaffolding-msl9ceps/SKILL.md' && test -s '.skill-downloads/automated-test-scaffolding-msl9ceps/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/test-scaffold' && cp -R '.skill-downloads/automated-test-scaffolding-msl9ceps' '.agents/skills/test-scaffold'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/automated-test-scaffolding-msl9ceps'

openskills read 'automated-test-scaffolding-msl9ceps'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/automated-test-scaffolding-msl9ceps/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills