add-diagnostic

작성자: vercel

Add a new diagnostic code following the defineDiagnostics() conventions from nostics

npx skills add https://github.com/vercel-labs/nostics --skill add-diagnostic

Add a New Diagnostic Code

  1. Find the catalog. Grep for defineDiagnostics to locate the codes object the new entry belongs in. With several catalogs, pick by area.
  2. Pick the code. PREFIX_XNNNN: PREFIX is the project name uppercased (NUXT, I18N); X is the area letter (B build, R runtime, C config, D deprecation); NNNN is the next free number. Read existing codes to choose. Never rename or reuse a published code.
  3. Add the entry:
LIB_R0001: {
  why: (p: { hook: string }) => `${p.hook}() must run at the top of setup().`, // string or typed fn; becomes Error.message (required)
  fix: 'Move the call into setup() or a composable it calls.', // optional, but add whenever the fix is known
  docs: 'https://example.com/custom', // optional: overrides docsBase, or `false` to opt out
},
  • why is the only required field. Params from why and fix are intersected and required at the call site.
  • Runtime fields (cause, sources) are passed at the call site, never in the definition.
  1. Call it: diagnostics.LIB_R0001({ hook }) to report, throw diagnostics.LIB_R0001({ hook, cause: err }) to raise. Both run the reporters.

Full API and reporter/formatter/plugin details: the nostics skill.

vercel의 다른 스킬

benchmark-sandbox
vercel
Vercel Sandbox에서 vercel-plugin eval 시나리오를 로컬 WezTerm 패널 대신 실행합니다. Claude Code와 플러그인이 사전 설치된 임시 마이크로VM을 프로비저닝합니다.
official
emil-design-eng
vercel
이 스킬은 Emil Kowalski의 UI 폴리시, 컴포넌트 디자인, 애니메이션 결정, 그리고 소프트웨어를 훌륭하게 만드는 보이지 않는 세부 사항에 대한 철학을 인코딩합니다.
official
vercel-react-best-practices
vercel
Vercel Engineering의 React 및 Next.js 성능 최적화 가이드라인입니다. 이 스킬은 React/Next.js 코드를 작성, 검토 또는 리팩토링할 때 사용해야 합니다.
official
vercel-react-best-practices
vercel
Vercel Engineering의 React 및 Next.js 성능 최적화 가이드라인입니다. 이 스킬은 React/Next.js 코드를 작성, 검토 또는 리팩토링할 때 사용해야 합니다.
official
write-guide
vercel
점진적인 예제를 통해 실제 사용 사례를 가르치는 기술 가이드를 제작합니다. 개념은 독자가 필요로 할 때만 소개됩니다.
official
release
vercel
Vercel-plugin 릴리스 — 게이트 실행, 버전 업, 아티팩트 생성, 커밋 및 푸시. "릴리스", "배포", "버전 업 및 푸시", "릴리스 생성" 요청 시 사용.
official
deepsec
vercel
dev3000에서 체크아웃한 Vercel 프로젝트에 대해 DeepSec을 실행합니다. 원클릭 DeepSec 설정, 프로젝트 컨텍스트 부트스트래핑, 제한된 1차 처리 등에 사용합니다.
official
backport-pr
vercel
Backport a merged Next.js pull request from canary to a previous release branch such as next-16-2. Use when the user asks to backport, cherry-pick, or open a…
official