All skills
mblode avatar

/tidy

@1c00344
by Matthew Blodemblode/agent-skills136 stars
12

Reviews a local diff, branch diff, or PR with file:line findings in confirmed and plausible tiers, gates any test the diff adds or changes, and in apply mode lands the fixes and diff-scoped simplifications. Use when asked to "review my changes", "code review", "tidy this", "simplify my diff", "deslop this", "structural review", "security audit", or "audit these tests in my PR". For the PR itself use pr-creator; for CI and review threads use pr-babysitter; for UI defects use ui-design; for repo architecture use codebase-architecture; for pruning the whole suite to a target use test-audit.

Use this Skill: https://skilld.dev/gh/mblode/agent-skills/tidy

This session only. Nothing lands on disk.

referencesperformance-checklist.md

≈748 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Performance Checklist

Common bottlenecks to flag in review. Load when the diff touches data fetching, rendering, images, dependencies, or bundle-affecting imports.

Contents

  • Performance budgets
  • Database and API bottlenecks
  • React and frontend bottlenecks
  • Image and asset bottlenecks
  • Bundle size bottlenecks

Performance Budgets

Metric Target
LCP ≤ 2.5s
INP ≤ 200ms
CLS ≤ 0.1
JS bundle (gzipped) < 200KB
API response (p95) < 200ms
Lighthouse Performance ≥ 90

Database and API

Problem What to flag
N+1 queries Loop containing a query. Batch with dataloader, JOIN, or ORM include
Unbounded data fetching Missing pagination or limit on list endpoints
Missing indexes WHERE, ORDER BY, or JOIN on unindexed columns
Redundant queries Same data fetched multiple times. Use cache(), Redis, or unstable_cache
No response caching Missing Cache-Control or stale-while-revalidate headers on stable data
Blocking the event loop readFileSync, execSync, sync crypto or compression inside a request handler or middleware. Use the async API, or do the work once at boot

React and Frontend

Problem What to flag
Unnecessary re-renders State too high in the tree. Move state down or split components
Large tree re-rendering Parent state change re-renders all children. Use children pattern to isolate
Heavy initial JS Large page components not code-split. Use dynamic() or lazy()
Layout shift from async content Missing explicit dimensions on async-loaded elements
Blocking hydration Client-heavy components blocking server render. Use RSC or Suspense boundaries
Waterfall data fetching Sequential client-side fetches. Move to Server Components or Promise.all

Images and Assets

Problem What to flag
Unoptimized images Not using next/image, missing width/height, not serving WebP/AVIF
Missing responsive sizes No sizes attribute matching layout breakpoints
Large fonts Not subset, missing font-display: swap, not preloading critical fonts

Bundle Size

Problem What to flag
Large dependencies Heavy libraries with lighter alternatives (lodash to native, moment to date-fns)
Importing entire libraries Barrel imports pulling in unused code. Use named imports, verify tree-shaking
Duplicate dependencies Same package at multiple versions. Check npm ls, deduplicate

Red Flags

Flag these even without profiling data; they are almost always problems:

  • N+1 query pattern (query inside a loop)
  • List endpoint without pagination
  • Images without explicit dimensions
  • React.memo/useMemo/useCallback applied without evidence of re-render cost
  • API response returning full objects when the client uses two fields

Source: SKILL.md on GitHub

1 warning3d3 checks · Risk SAFE
  • Gen Agent Trust Hub3d

    This skill is a code review and automated refactoring tool that analyzes git diffs, pull requests, and codebase subsystems. It uses standard developer utilities like git and gh to retrieve context and can optionally invoke other installed AI CLIs for secondary analysis. While it executes repository-defined commands like tests and linters in its 'apply' mode, this behavior is consistent with its primary purpose as a developer productivity tool.

  • Socket3d

    No alerts

  • Snyk3d

    Risk: MEDIUM · 1 issue

Signed by skilld at 1c00344. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 1 hour ago.

Activeupdated 5 days ago

README badge

README badge for mblode/agent-skills/tidy