编程开发
代码生成、调试优化、技术文档等编程辅助提示词
675 个提示词
shared mutable state; fixed clock; cleanup or ephemeral tenants. 4. Auth: seeded test…
Data strategy: per-test isolated schema/database, factory-based seeding, no
Redis}} and a mock server (WireMock/MockServiceWorker) for third-party APIs; contract…
Deterministic environment: docker-compose/testcontainers with real {{Postgres,
only for critical user journeys (list them with priority P0/P1).
Test pyramid plan: which behaviors belong in unit/integration/E2E; keep E2E
Designs deterministic end-to-end tests with fixtures, seeding, auth, and CI parallelization for web apps/APIs.
Integration / E2E Test Architect
Generates high-value tests: behavior tables, boundary cases, property-based tests, and failure injection — without testing implementation details.
Unit Test Engineer (Behavior-First)
from plain object literals.…
Edge cases: optional props, unions of events, readonly tuples, and inference
the exact compiler error expected. 3. A tsconfig.json relevant excerpt and the tsc…
Usage examples showing correct calls and 4+ calls that SHOULD error — each with
For difficult generic types, conditional/mapped types, and eliminating `any` safely. Outputs compile-safe types with explanations.
TypeScript Type System Solver
plan changes. Note write-amplification trade-offs. 5. Suggest denormalization or caching…
Provide exact CREATE INDEX statements (with CONCURRENTLY) and predict the
window functions, lateral joins, partial indexes, covering indexes) and explain why each…
Rewrite the query (CTEs vs subqueries, join order, semi-joins with EXISTS,
actions needed.
Point out stale statistics or planner mis-estimates and the ANALYZE/VACUUM
skewed joins, sort/hash spills, lock waits, network).
Read the plan bottom-up; identify the dominant cost (seq scans, bad estimates,
Paste a slow query and get a diagnosis, rewritten SQL, and index recommendations with EXPLAIN-based reasoning.
SQL Query Debugger & Optimizer
zero-downtime notes and lock-duration estimates. 6. Seed data and RLS policies if…
Migration plan: expand/contract (additive, backfill, switch, drop) with
them to be index-friendly (sargable predicates, no SELECT *).
The 8 most important queries as SQL with EXPLAIN ANALYZE expectations; write
with a recommendation for my scale.
Multi-tenancy strategy comparison (shared schema + tenant_id vs schema-per-tenant)
NOT NULL defaults, CHECK constraints, unique constraints, foreign keys with ON DELETE…
DDL with: correct types (bigint identity, timestamptz, jsonb vs columns),
and which normal form; note deliberate denormalizations with rationale).
ER model in text (entities, attributes, types, nullability, PK/FK, cardinalities,
Designs schemas (normalization, indexes, constraints) and writes/optimizes SQL. Use before coding features that touch the database.
Database Schema & SQL Expert
and tests using @apollo/server's executeOperation. Include a migration for schema…
Provide dataloaders, resolvers, generated types, context (with auth/prisma),
behavior with an example query and the resulting SQL count. 4. Pagination caps,…
Prevent N+1 with DataLoader per request; batch and cache; show the batching
INSIDE resolvers (never trust the client), including per-node field visibility.
Enumerate queries/mutations with auth requirements in a table. Enforce auth
spec for every list (edges/node/pageInfo, cursor opaque base64). Input objects for…
Schema design: nouns as types, verbs as mutations; use the Relay connection
For designing GraphQL schemas without over-fetching pitfalls: pagination, dataloaders, auth in resolvers, n+1 prevention, and persisted queries.