ag-testar-codigo

ag-testar-codigo is a skill for Claude Code from andregusman-raiz/a-gusman-claude. It costs 38 tokens per session (1,773 once invoked), scanned A, original, MIT.

A testing helper that creates and runs unit tests for individual pieces of code and integration tests for connected parts. It checks program logic, not the user interface, and records failures in errors-log.md.

In plain words
What is it for?
Use it to build or run unit and integration test suites with frameworks such as Vitest, Jest, or pytest, including tests written before implementation as part of TDD.
Why use it?
It helps catch incorrect logic and broken connections between components before they reach users. It also leaves a written record of failed checks.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: model in frontmatter; mentions subagents.

Good fit Use it to build or run unit and integration test suites with frameworks such as Vitest, Jest, or pytest, including tests written before implementation as part of TDD.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/andregusman-raiz/a-gusman-claude/ag-testar-codigo
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add andregusman-raiz/a-gusman-claude --skill ag-testar-codigo
Clone the repo
git clone --depth 1 https://github.com/andregusman-raiz/a-gusman-claude

Made for: Claude Code.

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 ag-testar-codigo

README.md
[![agentmods](https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-testar-codigo/github.svg)](https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-testar-codigo)
Your own site
<a href="https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-testar-codigo"><img src="https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-testar-codigo/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 ag-testar-codigo

Your own site · 80×15
<a href="https://agentmods.dev/skills/andregusman-raiz/a-gusman-claude/ag-testar-codigo"><img src="https://agentmods.dev/badge/skills/andregusman-raiz/a-gusman-claude/ag-testar-codigo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,773 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 medium

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 →

  • medium Excessive Agency · line 4
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
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.00038 $0.01773
Opus 5 $0.00019 $0.00886
Sonnet 5 $0.00008 $0.00355
Haiku 4.5 $0.00004 $0.00177

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

Security

Grade A, and why

ag-testar-codigo 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 8d 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/ag-testar-codigo/SKILL.md · 171 lines

How it starts

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

ag-testar-codigo — Testar Codigo

Spawn the ag-testar-codigo agent to create and run unit/integration tests.

Invocation

Use the Agent tool with:

  • subagent_type: ag-testar-codigo
  • mode: bypassPermissions
  • run_in_background: true
  • prompt: Compose from template below + $ARGUMENTS

Prompt Template

Projeto: [CWD or user-provided path]
Scope: [modulo especifico, arquivo, ou "full" para suite completa]
Framework: [vitest, jest, pytest, ou "auto-detect"]
Modo: [--from-spec (Red/TDD) | pos-implementacao (Green) | default]


Criar e executar testes. Para suite completa, usar Agent Teams (unit + integration + e2e em paralelo).
Registrar falhas em errors-log.md. Seguir anti-teatralidade: cada expect() DEVE poder falhar.

Important

  • ALWAYS spawn as Agent subagent — do NOT execute inline
  • After spawning, confirm to the user
  • Supports parallel test execution via Agent Teams for full suites
  • Follows anti-theatricality rules: no .catch(() => false), no || true, no always-true expects

Tipos de Teste Esperados

Tipo Escopo Exemplo
Unit Funcao isolada, logica pura calculateDiscount(price, coupon)
Integration Componentes juntos, DB, APIs Service + Repository + real DB
Smoke Importa sem erro, endpoint retorna status valido import { MyService } sem crash
Error boundary Input invalido, erro tratado null, undefined, string vazia
Access control Role com/sem permissao (min 2 roles) admin=200, viewer=403, anon=401

NAO faz E2E (browser, UI) — isso e do ag-testar-e2e.

Template por Funcao (minimo)

describe('NomeDaFuncao', () => {
  test('happy path — valor hard-coded da spec', () => {
    expect(fn(validInput)).toBe(expectedOutput); // hard-coded, NUNCA calculado
  });
  test('error path — input invalido retorna erro', () => {
    expect(() => fn(null)).toThrow('Expected error message');
  });
  test('edge case — vazio', () => {
    expect(fn('')).toBe(defaultValue);
  });
  test('edge case — limite/negativo', () => {
    expect(fn(-1)).toBe(boundaryResult);
  });
  // Se app tem roles:
  test('access control — role sem permissao', () => {
    expect(fn(viewerContext)).rejects.toThrow('Forbidden');
  });
});

Read the full file on GitHub · 171 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. 8d ago First seen · 171 lines · 38 tokens per session scan A b902ae95aad1

Subscribe to this mod's changes

ag-testar-codigo is a skill published in the GitHub repository andregusman-raiz/a-gusman-claude (19 stars, last pushed 3d ago), licensed MIT. It adds 38 tokens to every session and 1,773 once invoked, about $0.0002 per session on Opus 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-09-03.

Related

Other skills, from other repositories

taiyi-dev

A software-development stage that implements planned tasks using test-driven development, or TDD: write a failing test, make it pass, then improve the code. It checks the task plan, dependencies, file boundaries, and required completion evidence.

Dong90/oh-my-taiyiforge · 21 tokens

cpp-testing

A guide for testing C++17/20 code with GoogleTest, GoogleMock, CMake, and CTest. It covers unit and integration tests, test discovery, coverage, and sanitizers.

loulanyue/awesome-claude-notes · 55 tokens

perl-testing

Perl testing patterns using Test2::V0, Test::More, prove runner, mocking, coverage with Devel::Cover, and TDD methodology.

loulanyue/awesome-claude-notes · 35 tokens

test-fixing

Run tests and systematically fix all failing tests using smart error grouping. Use when user asks to fix failing tests, mentions test failures, runs test suite and failures occur, or requests to make tests pass.

mhattingpete/claude-skills-marketplace · 44 tokens

improving-tests

Improve test design, speed, and coverage with behavior-focused tests, useful seams, characterization tests, TDD, and test refactoring. Use when improving tests, optimizing slow suites, adding coverage, refactoring brittle tests, removing test waste, or working test-first. NOT for fixing production bugs (use…

alexei-led/cc-thingz · 89 tokens

figma-to-react-workflow

Orchestrates end-to-end Figma-to-React conversion pipeline with enforced TDD, automated pixel-diff visual QA, E2E testing, and app-type awareness (web apps, Chrome extensions, PWAs). Keywords: Figma to React, design tokens, autonomous component generation, Figma conversion, Tailwind config, component library, TDD…

PMDevSolutions/Aurelius · 0 tokens