with one click
conventions-testing
Apply when writing or reviewing tests.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Apply when writing or reviewing tests.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | conventions-testing |
| description | Apply when writing or reviewing tests. |
Apply when writing or reviewing tests.
Test when code has: parsing/transformation logic, security boundaries, business rules with arithmetic, state machines, non-obvious edge cases, or CRUD paths with auth, tenancy, validation, serialization, uploads/downloads, or other side effects. Skip: shallow CRUD handlers with no meaningful branching, library wrappers, layout components, constants.
When the input space is large (parsers, document transforms, normalization, sorting/filtering, security boundaries, Unicode-heavy logic), start by asking what must always be true, then encode that as a property test, fuzzy test, or adversarial regression test. Reach for ordinary example tests when they communicate a business rule more clearly than a property.
Good property/fuzz targets in Stella: DOCX/OOXML roundtrips, template/block-directive parsing, filename and header sanitization, search/filter/sort helpers, tenant-scope enforcement, and error normalization.
Colocate foo.test.ts next to foo.ts. For frontend, default
to extracting logic into foo.logic.ts and test that in Bun.
Use Playwright for browser-only behavior: auth redirects, route
guards, uploads/downloads, keyboard/focus, drag/drop, and
viewer/editor flows. Structural invariant tests (auth
enforcement, branded types) live in
apps/api/src/tests/security/.
bun:test for unit, invariant, and integration tests;
use Playwright for browser behavior. Do not add another test
runner without a clear gap Bun and Playwright cannot cover.beforeEach only for deterministic reset, and use expensive
shared fixtures only when explicit and isolatedDrive the stella command-line client (@stll/cli), a legal-workspace CLI whose command surface is generated from the stella MCP tool registry. Covers install, OAuth login, the full command tree grouped by domain, JSON output for scripting, the --input escape hatch for deep payloads, cursor pagination, destructive-op confirmation, and exit codes.
Apply when writing or reviewing React effects in apps/web. Direct useEffect is banned; use the sanctioned wrappers or a better primitive.
Apply when writing or modifying database schema, queries, or migrations.
Apply when a performance-guard check (network baseline, bundle baseline, DB query count, loader-prefetch lint, RC bailouts) fails or when touching a hot route/endpoint.
Internationalization conventions for Stella. Apply when adding or modifying user-facing strings.
Apply when building or modifying user-facing UI components.