chore: add data-fetching-perf-audit skill#519
Conversation
Encodes the data-fetching performance audit methodology from PRs #502 (batch N+1 across organizer routes) and #512 (eliminate waterfalls on public compete pages): - SKILL.md: audit workflow, anti-pattern quick-reference table, the three stack facts (server fn = round trip; mysql2 serializes per connection; push-based DB workflow), verification checklist - references/anti-patterns.md: 9-pattern catalog with detect/fix and real before/after code (waterfalls, N+1, fake parallelism, etc.) - references/stack-gotchas.md: mysql2 serialization, cloudflare:workers client-bundle leak, push-based indexes, security holes found while optimizing Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Entire-Checkpoint: b9d1dedc0a41
WalkthroughThree new Markdown files are added under ChangesData-Fetching Perf Audit Claude Skill
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.claude/skills/data-fetching-perf-audit/SKILL.md (1)
18-18: 💤 Low valueConsider conciseness: "almost never" → "rarely" or "seldom".
Line 18 uses "almost never" where a single-word alternative ("rarely" or "seldom") would be more direct without changing meaning.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.claude/skills/data-fetching-perf-audit/SKILL.md at line 18, The phrase "almost never" in the documentation is unnecessarily verbose and can be replaced with a more concise single-word alternative. In the SKILL.md file where "almost never" appears in the context of describing query performance wins, replace "almost never" with either "rarely" or "seldom" to improve conciseness while maintaining the same meaning and clarity.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.claude/skills/data-fetching-perf-audit/SKILL.md:
- Line 18: The phrase "almost never" in the documentation is unnecessarily
verbose and can be replaced with a more concise single-word alternative. In the
SKILL.md file where "almost never" appears in the context of describing query
performance wins, replace "almost never" with either "rarely" or "seldom" to
improve conciseness while maintaining the same meaning and clarity.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d48bd64e-7820-4c16-ad6c-557ced84ae95
📒 Files selected for processing (3)
.claude/skills/data-fetching-perf-audit/SKILL.md.claude/skills/data-fetching-perf-audit/references/anti-patterns.md.claude/skills/data-fetching-perf-audit/references/stack-gotchas.md
Summary
Adds a Claude Code skill,
data-fetching-perf-audit, that encodes the data-fetching performance methodology proven in two prior PRs:It turns those one-off optimizations into a repeatable audit another agent can run on any slow route or route group.
What's in the skill
SKILL.md— the audit workflow (scope → trace loader→server-fn→query chains → classify → fix → verify), a 9-row anti-pattern quick-reference table, the three stack facts that drive every decision (server fn = HTTP round trip; mysql2 serializes per connection; push-based DB workflow), and a verification checklist.references/anti-patterns.md— full catalog with detect/fix and real before/after code: loader waterfalls, N+1 server-fn calls, sequential independent awaits, fake parallelism, over-fetching, scan-to-check, missing hot-path indexes, dead queries, deferring off the critical path.references/stack-gotchas.md— the traps that silently undo the work: mysql2 single-connection serialization,cloudflare:workersleaking into the client bundle, push-based index workflow, loader-shape stability, and the IDOR / draft-exposure security holes surfaced while tracing fetches.All examples cite real symbols from the codebase (
getPublicCompetitionPageDataFn,getScoreAccessMapFn,getCompetitionLeaderboard, etc.).Changes
.claude/skills/data-fetching-perf-audit/SKILL.md(new).claude/skills/data-fetching-perf-audit/references/anti-patterns.md(new).claude/skills/data-fetching-perf-audit/references/stack-gotchas.md(new)Notes
.claude/is gitignored (.gitignore:72); like the other tracked skills, these files were added withgit add -f.skill-creator(package-skill.ts→ "Skill is valid").lat checkpasses. No application code changed.🤖 Generated with Claude Code
Summary by cubic
Adds the
data-fetching-perf-auditskill to standardize data‑fetching performance audits across loaders, server fns, and queries. Encodes the approach from #502 and #512; no application code changed.SKILL.md: audit workflow, quick anti‑pattern table, stack facts, verification checklist.references/anti-patterns.md: 9 patterns with detect/fix and real before/after (waterfalls, N+1, fake parallelism, over‑fetching, scan‑to‑check, missing indexes, dead queries, deferrals).references/stack-gotchas.md:mysql2single‑connection serialization,cloudflare:workersclient‑bundle leak, push‑based indexes, loader‑shape stability, auth checks.Written for commit 136d305. Summary will update on new commits.
Summary by CodeRabbit