.rulesync/skills/trace-audit/SKILL.md
Analyze distributed traces to find blocking queries, N+1 patterns, and missing tRPC encapsulation, then produce prioritized fixes
npx skillsauth add washingtonguilhardes/example.hr-module trace-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Persona: Execute this task as the @architect subagent (Archer, Principal Architect).
Load the persona characteristics from .rulesync/subagents/architect.md before proceeding.
Required Context: Review these rules before proceeding:
.rulesync/rules/performance.md - Performance optimization criteria.rulesync/rules/database.md - Prisma query patterns and anti-patterns.rulesync/rules/architecture.md - tRPC architecture and boundaries.rulesync/rules/code-quality.md - Quality and risk prioritizationAnalyze a full distributed trace (JSON) plus Jaeger endpoint metadata to uncover low-hanging performance wins, especially blocking Prisma queries and missing tRPC encapsulation, then produce actionable, code-aligned fixes for this repository.
Collect required inputs (do not proceed without them):
Run mandatory analysis protocol (concise and empirical):
T0: Direct measurement from trace JSON / executed checksT1: Primary source from this codebaseT2: High-quality external guidanceT3: Inference (label clearly)T0-T2 must be marked [UNVERIFIED] or omitted.Validate trace completeness before interpretation:
Compute performance evidence from the trace:
Map findings to code in this repository:
Generate remediation plan aligned to tRPC + Prisma:
take, cursor pagination, and narrow selectPromise.allOutput format is mandatory:
{
"_audit": {
"obj": "Trace-specific optimization objective",
"inputs": ["trace_json", "jaeger_endpoint"],
"assumptions": ["load-bearing assumptions only"],
"plan": ["parse", "measure", "map", "recommend", "verify"],
"checks": ["coverage", "correctness", "counterexamples", "constraints", "evidence"],
"evidence": "T0|T1|T2|T3",
"risk": "weakest point",
"mitigation": "how risk was reduced",
"len": "target brevity"
}
}
Critical Path FindingsBlocking Prisma FindingstRPC Encapsulation OpportunitiesPrioritized Fix PlanVerification Plan (what new traces should prove)Counterexample pass before finalizing:
Optional implementation handoff:
N fixes directly in this repository.testing
required reading for all test/spec files or test related queries.
testing
Transform Product Brief into Technical Specification
development
Detect drift between code implementations and specification documents
development
Enforce relational schema design over JSON columns, and prevent TypeScript type-safety evasion (any, oxlint-disable, type casting)