본문으로 건너뛰기
cccskills
무료GitHub에 공개

audit-hooks

Review specified files for outdated hook and API patterns, then replace them with the prescribed SWR hooks, API clients, or server API calls. The guidance covers data fetching, mutations, cache updates, and response handling, followed by a typecheck command.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Audit & fix hooks and API usage patterns — eliminate server actions, raw fetch, and stale patterns

trycompai/comp스타 2,061(GitHub 2,061 + cccskills 0)

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • Auditing files for disallowed API and hook patterns
  • Replacing raw fetch calls with the API client
  • Migrating server actions and database mutations to API hooks
  • Checking data fetching and cache update conventions

포함된 파일(1)

  • SKILL.md1.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Audit the specified files for hook and API usage compliance. Fix every issue found immediately.

Forbidden Patterns (fix immediately)

  1. useAction from next-safe-action → replace with SWR hook or custom mutation hook
  2. Server actions mutating via @db → delete and use API hook instead
  3. Direct @db in client components → replace with apiClient via hook
  4. Direct @db in Next.js pages for mutations → replace with serverApi
  5. Raw fetch() without credentials: 'include' → use apiClient
  6. window.location.reload() after mutations → use SWR mutate()
  7. router.refresh() after mutations → use SWR mutate()
  8. useEffect + apiClient.get for data fetching → replace with useSWR
  9. Callback props for data refresh (onXxxAdded, onSuccess) → remove, rely on SWR cache sharing

Required Patterns

  • Client data fetching: useSWR with apiClient or custom hook
  • Client mutations: custom hooks wrapping apiClient with mutate() for cache invalidation
  • Server components: serverApi from apps/app/src/lib/api-server.ts
  • SWR: fallbackData for SSR data, revalidateOnMount: !initialData
  • API response: lists = response.data.data, single = response.data
  • mutate() safety: guard against undefined in optimistic update functions
  • Array.isArray() checks: when consuming SWR data that could be stale

Process

  1. Read files specified in $ARGUMENTS
  2. Find forbidden patterns and fix them
  3. Ensure all data fetching uses SWR hooks
  4. Run typecheck to verify: bunx turbo run typecheck --filter=@trycompai/app

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Guide API endpoint changes so request DTOs, runtime validation, OpenAPI documentation, and MCP tool metadata stay aligned. It covers discoverability, authentication, uploads, long-running tasks, and response types that MCP tools cannot handle.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding an API endpoint with a request body
  • Updating DTO validation and OpenAPI metadata
  • Making an endpoint available as an MCP tool
trycompai/comp2.1천2026년 10월 24일 업데이트

Review specified files for design system usage, replace legacy @trycompai/ui components and lucide-react icons with available @trycompai/design-system equivalents, and run the app type check to verify the migration.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Migrating legacy UI components
  • Replacing lucide-react icons with Carbon icons
  • Checking specified files for design system compliance
trycompai/comp2.1천2026년 10월 24일 업데이트

Review NestJS API endpoints and frontend components for role-based access control and audit log compliance. The skill lists permission, guard, route, and UI gating rules, then directs the agent to fix violations and run type checks.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Auditing API routes for permission decorators
  • Checking UI actions against user permissions
  • Fixing access control inconsistencies
trycompai/comp2.1천2026년 10월 24일 업데이트

Audit unit tests for components that use permissions. Add missing tests and fix failures, checking that administrators can use mutation controls, auditors cannot, and read-only content remains visible to both.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding permission tests for a component
  • Checking admin and auditor behavior
  • Fixing failing permission-related tests
trycompai/comp2.1천2026년 10월 24일 업데이트

Set up Better Auth for TypeScript applications, including server and client configuration, database adapters, sessions, email and social sign-in, and plugins. The guide also highlights environment variables, schema generation, and security settings to review.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Configuring Better Auth in a TypeScript app
  • Connecting an ORM or database adapter
  • Setting up sessions and cookie storage
trycompai/comp2.1천2026년 10월 24일 업데이트

billing

무료

Use this skill when changing subscription billing with Stripe. It guides catalog and SKU updates, checkout, local entitlements and usage records, audit events, and webhook handling that tolerates retries and out-of-order delivery.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding or updating a billing SKU
  • Implementing subscription checkout
  • Handling billing webhooks safely
trycompai/comp2.1천2026년 10월 24일 업데이트

trycompai의 스킬 모두 보기

이 스킬의 문제 신고