Skip to content
cccskills
FreePublished on GitHub

test

Behavior-first test guidance.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Test

Invocation

This skill is performed in the Developer persona. If you are not already running as Developer (for example, the user invoked /test directly), read subagents/developer.md and adopt its role guidance for the rest of this task. Stay in the current chat—do not delegate to a subagent.

Objective

Write or improve tests that defend real user-visible behavior without encoding broken behavior as correct.

Core Rules

  • Start from the expected user behavior or contract, not implementation details.
  • Test names must describe observable behavior only.
  • Never write a green test that asserts a known bug as correct behavior.
  • If a test reveals a product bug, call that out explicitly instead of mutating the test to hide it.
  • Prefer existing test helpers, fixtures, and patterns before creating new ones.

Naming Guidance

  • Good: when a valid user signs in, they reach the dashboard
  • Good: when repo access is removed, the preview no longer shows that collaborator
  • Bad: useThing works correctly
  • Bad: POST /api/foo returns 200
  • Bad: someHelper handles edge cases

Repo Conventions

  • Place unit tests close to the code they cover as *.test.ts or *.test.tsx.
  • Run the relevant test suite for unit-level verification.
  • Run E2E tests when the change requires browser-flow validation.
  • If the repo does not provide a narrower script for the exact test slice you want, say so explicitly rather than inventing one.

Bug Discovery Protocol

  1. A failing test that exposes a real bug is a useful deliverable.
  2. If the observed behavior looks wrong, ask whether it is intentional before turning it into the asserted contract.
  3. Fix the application behavior when it is in scope.
  4. If the bug is out of scope, document the gap clearly instead of pretending the behavior is correct.

Review Checklist

  • Does the test assert a real contract or user-visible behavior?
  • Does it verify more than status-only success?
  • Does it match existing repo test structure and helpers?
  • Does it avoid broad mocks when the contract is integration-sensitive?
  • Does it run under the right repo verification command?

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

brief

Free

Create a product brief document for a feature or project.

The English summary is being prepared. Showing the original description.

g2i-ai/agents52Updated Apr 21, 2026

code

Free

Implement production changes with or without new test coverage.

The English summary is being prepared. Showing the original description.

g2i-ai/agents52Updated Apr 21, 2026

Prepare commits, push a branch, and create a draft PR targeting your base branch.

The English summary is being prepared. Showing the original description.

g2i-ai/agents52Updated Apr 21, 2026

Generate a PR description for the current branch against your base branch.

The English summary is being prepared. Showing the original description.

g2i-ai/agents52Updated Apr 21, 2026

review

Free

Review a branch or PR for merge readiness and produce a QA report.

The English summary is being prepared. Showing the original description.

g2i-ai/agents52Updated Apr 21, 2026

spec

Free

Transform a product brief into a technical specification.

The English summary is being prepared. Showing the original description.

g2i-ai/agents52Updated Apr 21, 2026

See all skills by g2i-ai

Report a problem with this skill