build-with-tests

Enforces test-driven coding standards and clean code rules for builder agents.

1|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/OgenticAI/ogentic-shield --skill build-with-tests-ogenticai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: build-with-tests
Source: https://github.com/OgenticAI/ogentic-shield/tree/main/.claude/skills/build-with-tests
Command: npx skills add https://github.com/OgenticAI/ogentic-shield --skill build-with-tests-ogenticai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Builder agents often produce inconsistent code without tests, leak errors to clients, or introduce unapproved dependencies. This Skill defines a shared build standard so every agent writes tested, tenant-scoped, clean code that passes lint, typecheck, and test checks before finishing. ## Core Features & Use Cases - Test-Alongside-Code Standard: Requires happy-path and failure-path tests next to every source file, with acceptance tests delegated to a test-verifier agent. - Pre-Finish Verification: Mandates running stack-specific checks (pnpm typecheck/lint/test for TypeScript, ruff/mypy/pytest for Python) and forbids finishing on red. - Clean Code Enforcement: Applies Robert Martin's Clean Code rules — small single-purpose functions, intention-revealing names, ≤3 arguments, typed errors instead of nulls, and FIRST tests. - Use Case: A backend builder agent implementing a new FastAPI endpoint follows this standard to write tests first, scope queries by tenant, sanitize errors, and end with a structured summary for downstream agents. ## Quick Start Apply the build-with-tests standard while implementing the new payment endpoint, writing tests next to the code and running the full check suite before finishing.

Frequently Asked Questions about build-with-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce test-driven development with AI coding agents?▼

Define a build standard requiring tests next to code, with at least one happy-path and one failure-path test per public function. Agents must run the full check suite (typecheck, lint, tests) and fix failures before finishing.

What clean code rules should AI agents follow when writing code?▼

Apply Robert Martin's Clean Code: small single-purpose functions under 30 lines, intention-revealing names, at most 3 arguments, no hidden side effects, typed errors instead of nulls, and FIRST tests that are fast and independent.

How do I prevent AI agents from leaking errors to API clients?▼

Catch domain errors at the route handler or server action boundary, log with structured context, and return sanitized messages. Stack traces, database errors, and provider responses must never reach the client.

Does this standard work for both TypeScript and Python projects?▼

Yes. TypeScript projects run pnpm typecheck, lint, and test; Python projects run ruff, mypy, and pytest via uv. Tests live next to code as feature.test.ts or test_feature.py files.

How should AI agents handle multi-tenant database queries?▼

Every query touching a tenant-scoped table must filter by tenant, derived from the authenticated principal rather than the request body. This prevents cross-tenant data access and is enforced by a validator.

Can AI agents add new package dependencies automatically?▼

No. New dependencies require explicit approval. The agent must stop and surface the need as an open question so a human decides before running pnpm add or uv add.