audit-hooks
SkillDev toolsLets your agent audit and fix hook and API usage patterns like raw fetch calls and stale code.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the audit-hooks skill
About this capability
Audit & fix hooks and API usage patterns — eliminate server actions, raw fetch, and stale patterns
What this skill tells your AI
The instructions your AI receives, as published by trycompai/comp in .agents/skills/audit-hooks/SKILL.md and read by ahel’s review.
Audit the specified files for hook and API usage compliance. Fix every issue found immediately.
Forbidden Patterns (fix immediately)
useActionfromnext-safe-action→ replace with SWR hook or custom mutation hook- Server actions mutating via
@db→ delete and use API hook instead - Direct
@dbin client components → replace withapiClientvia hook - Direct
@dbin Next.js pages for mutations → replace withserverApi - Raw
fetch()withoutcredentials: 'include'→ useapiClient window.location.reload()after mutations → use SWRmutate()router.refresh()after mutations → use SWRmutate()useEffect+apiClient.getfor data fetching → replace withuseSWR- Callback props for data refresh (
onXxxAdded,onSuccess) → remove, rely on SWR cache sharing
Required Patterns
- Client data fetching:
useSWRwithapiClientor custom hook - Client mutations: custom hooks wrapping
apiClientwithmutate()for cache invalidation - Server components:
serverApifromapps/app/src/lib/api-server.ts - SWR:
fallbackDatafor SSR data,revalidateOnMount: !initialData - API response: lists =
response.data.data, single =response.data mutate()safety: guard againstundefinedin optimistic update functionsArray.isArray()checks: when consuming SWR data that could be stale
Process
- Read files specified in
$ARGUMENTS - Find forbidden patterns and fix them
- Ensure all data fetching uses SWR hooks
- Run typecheck to verify:
bunx turbo run typecheck --filter=@trycompai/app
Signals
- GitHub stars
- 2k
- Forks
- 412
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
audit-hooks- Source
- github.com/trycompai/comp