testing
Testing doctrine, pyramid (unit, integration, API, security, smoke), AAA pattern, and coverage enforcement.
Skill by Mihir-Rabari
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mihir-rabari-testing
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, testing, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
testing- Description
- Testing doctrine, pyramid (unit, integration, API, security, smoke), AAA pattern, and coverage enforcement.
- License
- MIT
- Instructions
- 48 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Testing Skill
## 1. When to Use
Use this skill when writing unit tests, API integration tests, security adversarial suites, database constraint tests, or executing quality verification gates.
## 2. Core Testing Principle
> **Behavior must be verified at the narrowest appropriate level, and security-sensitive behavior must also be verified at an integration boundary.**
## 3. Testing Pyramid & Taxonomy
- **`unit`**: Fast, isolated tests for pure functions, cryptographic utilities, Zod validation schemas, policy evaluation logic.
- **`integration`**: Tests for component interactions using Fastify `app.inject()` and database clients.
- **`security` / `adversarial`**: Explicit negative tests demonstrating that unauthorized access, privilege escalation, and parameter tampering are blocked.
- **`generator` / `smoke`**: Verifying project scaffolding, metadata transformations, and distributable `.tgz` tarball unpacking.
## 4. The Arrange / Act / Assert (AAA) Pattern
Every test must be independently understandable and follow the AAA pattern:
```typescript
it('rejects login for suspended users with 403 Forbidden', async () => {
// Arrange
const suspendedUser = await createTestUser({ status: 'SUSPENDED' });
const credentials = { email: suspendedUser.email, password: 'ValidPassword123!' };
// Act
const response = await app.inject({
method: 'POST',
url: '/api/v1/auth/login',
payload: credentials,
});
// Assert
expect(response.statusCode).toBe(403);
const json = response.json();
expect(json.code).toBe('ACCOUNT_SUSPENDED');
expect(json.requestId).toBeDefined();
});
```
## 5. Inviolable Testing Laws
1. **Rule T1**: Every new behavior requires automated tests.
2. **Rule T2**: Every bug fix requires a regression test.
3. **Rule T3**: Security-sensitive changes require adversarial negative tests.
4. **Rule T4**: API changes require route & contract tests.
5. **Rule T5**: Database schema changes require migration & seed idempotency tests.
6. **Rule T6**: Generator changes require smoke coverage.
7. **Rule T7**: Never reduce coverage thresholds or delete tests to make a build pass.
8. **Rule T8**: Always run the full verification gate (`pnpm verify`) before declaring work complete.From Mihir-Rabari/baseline, MIT.
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 1
- Last commit (this folder)
- Oct 3, 2026 (26 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Mihir-Rabari/baseline
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from Mihir-Rabari
- 0.561score
agent
Mihir-Rabari
AI chat agent that acts as the signed-in user, tool registry, staged write actions with confirmation, permission-filtered tools, and prompt-injection rules.
SkillAFreshness: AClaude Code +9 - 0.561score
design
Mihir-Rabari
Visual design law for the generated app — screen structure, colour tokens, typography, icons, spacing, and the states every screen owes the user.
SkillAFreshness: AClaude Code +9 - 0.558score
authentication
Mihir-Rabari
Password hashing (scrypt), server-side session tokens, HTTP-only cookies, and auth events.
SkillAFreshness: AClaude Code +9 - 0.558score
architecture
Mihir-Rabari
Monorepo package boundaries, layering rules, and extension patterns.
SkillAFreshness: AClaude Code +9 - 0.558score
api
Mihir-Rabari
Fastify route development, Zod type providers, OpenAPI documentation, structured logging, and error responses.
SkillAFreshness: AClaude Code +9 - 0.558score
database
Mihir-Rabari
PostgreSQL schema conventions, Drizzle ORM, migrations, deterministic seeding, and database integrity.
SkillAFreshness: AClaude Code +9
Cite this page
testing skill. Agent Mart. https://agentmart.dev/skills/mihir-rabari-testing (last updated 2026-10-24)