Token导航 LogoToken导航

Agent Skill · 研究检索

nextjs-debug(Next.js 调试)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

nextjs-debug 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 62,001。

总安装 343周安装 14GitHub Stars 4下载 110核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:nextjs-debug(Next.js 调试)
来源仓库:https://github.com/wghust/stark-skills
仓库路径:skills/nextjs-debug
安装命令:
npx skills add https://github.com/wghust/stark-skills --skill nextjs-debug
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wghust/stark-skills --skill nextjs-debug

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于诊断和修复 Next.js 应用中的运行时问题。适合排查页面异常、API 错误或构建失败等开发阶段故障。提供日志分析与代码定位支持,提升调试效率。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。应配合本地环境复现问题,并参考输出结果进行针对性修复。

nextjs-debug 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/nextjs-debug

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/wghust/stark-skills --skill nextjs-debug;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

nextjs-debug 怎么安装?

在终端执行 npx skills add https://github.com/wghust/stark-skills --skill nextjs-debug。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

nextjs-debug 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

nextjs-debug 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

nextjs-debug 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

nextjs-debug 用的人多吗?

公开数据是累计安装 343 次,近一周安装 14 次,下载 110 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

nextjs-debug 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
nextjs-debug

Next.js 调试 · 本页

3434接触敏感数据未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Next.js Debug

Language: Respond in the same language as the user (中文提问则中文回答).

Execution Flow

Run all steps in order. Steps marked [if project detected] are skipped when no Next.js project is found.

Step 0 · Receive Input

Accept one of:

  • Log: raw terminal output pasted by user
  • Description: natural-language problem description
  • Both: prioritize log for classification; use description to disambiguate

Output one line before starting:

Diagnosing Next.js issue — analyzing [log / description / both]...

Step 1 · Gather Context (run in parallel)

1A · Version Stack [if project detected]

Read package.json and extract:

VersionStack = { next, react, reactDom, typescript, nodeEngine }

Also run node -v or read .nvmrc / .node-version for the active Node.js version.

Compatibility checks (flag as VERSION_COMPAT warning if triggered):

ConditionWarning
next ≥ 15 and Node.js < 18.18Node.js too old
next ≥ 14 and Node.js < 18.17Node.js too old
next ≥ 15 and react < 19React/Next.js version mismatch
next ≤ 14 and react ≥ 19React/Next.js version mismatch

Deprecated API scan (run with rg, conditional on Next.js version):

  • next ≥ 13: grep app/ for getServerSideProps|getStaticProps → flag as Pages Router API in App Router
  • next ≥ 13: grep source for <Image layout=|<Image objectFit= → flag as removed next/image props
  • next ≥ 15: check next.config.* for webpack: callback → note Turbopack doesn't run it
1B · Dependency Audit [if project detected]
  1. Package manager: check for pnpm-lock.yaml → pnpm; yarn.lock → yarn; package-lock.json → npm
  2. node_modules check: if node_modules/ is absent → output install command and stop (no further diagnosis needed)
  3. Duplicate React: scan lockfile for multiple resolved react versions → list them and note overrides/resolutions fix
  4. .next cache: if user description contains "worked yesterday" / "no code changes" → prepend rm -rf.next && <pm> run dev as first fix step
1C · Git Context [if .git directory exists]
  1. git log --oneline -10 → record as RecentCommits
  2. git status --porcelain → if any modified/untracked file overlaps with affected files → flag as top suspect, run git diff -- <file>
  3. git log --oneline -3 -- package.json → if commits found → run git diff HEAD~N HEAD -- package.json and correlate with error class

Step 2 · Project Detection

Check for next.config.js, next.config.ts, next.config.mjs at workspace root, or "next" in package.json dependencies.

  • Monorepo: if not found at root, search one level deeper (apps/*/, packages/*/)
  • Detected → set PROJECT_ROOT, activate code-location steps
  • Not detected → note "No Next.js project detected — code-level location unavailable", proceed with log-only diagnosis

Step 3 · Classify Error

Parse log / description and assign each error to one class:

ClassRecognition Keywords
COMPILE_ERRORSyntaxError, Type error, Failed to compile, TS\d+:
MODULE_ERRORModule not found, Cannot find module, Cannot resolve
BOUNDARY_ERRORYou're importing a component that needs, Event handlers cannot be passed to Client Component, Hooks can only be called inside of the body, async/await is not yet supported in Client Components
ENV_ERRORMissing required environment variable, process.env.* is undefined, NEXT_PUBLIC_ in error
CONFIG_ERRORInvalid next.config, Unrecognized key(s) in object, webpack/turbopack plugin error from config file
RUNTIME_ERRORHydration failed, Text content did not match, EADDRINUSE, uncaught exception in stack trace

If multiple classes detected → list all, order by severity (blocking first).


Step 4 · Extract Identifiers & Search Code [if project detected]

Extract from log before searching:

TypePattern ExampleSearch Action
FileRef./src/app/page.tsx:34:12 or app/layout.tsx(18,5)Read file at line, extract [line-5, line+5] snippet
SymbolName'UserCard', Cannot find name 'fetchData'`rg -n "export.*(function\const\class\default) SymbolName" app/ src/ lib/ components/`
ModulePath@/utils/api, ./hooks/useAuthGlob **/useAuth.{tsx,ts,jsx,js} + rg "from.*useAuth" for all import sites
StackFrameat fn (filepath:line:col)Filter out node_modules frames, Read each project-owned file at indicated line

Code snippet format (use ▶ for error line):

`src/app/dashboard/page.tsx` line 34
  33 | export default function Dashboard() {
▶ 34 |   const data = await fetchUserData()
  35 |   return <div>{data.name}</div>

File too large (>500 lines): read only [line-10, line+20], note range in header.

BOUNDARY_ERROR without file path: glob app/**/*.{tsx,jsx}, check each file for client-only APIs (useState, useEffect, onClick, window., document.) without "use client" on line 1.


Step 5 · Deep Trace [if project detected]

MODULE_ERROR — Import Chain Tracing
  1. Run rg -n "from.*<missingPath>" across project source to find all importers
  2. For each importer, check if it is itself imported: rg -n "from.*<importerFile>" (max 2 levels up)
  3. tsconfig alias resolution: read tsconfig.json → compilerOptions.paths, resolve @/xxx to real path, re-run search
RUNTIME_ERROR — Stack Trace Mapping
  1. Parse each non-node_modules stack frame → {file, line}
  2. If frame path is .next/server/... → map to source file by matching page segment name
  3. Read each source file at [line-5, line+5], include snippets innermost-first
COMPILE_ERROR — Type Error Scope

If Type error with TS2307 (cannot find module) → treat as MODULE_ERROR and also run import chain tracing.


Step 6 · Generate Diagnostic Report

Output the report using this template. Omit sections that have no findings.

## Version Stack
- Next.js: X.Y.Z | React: X.Y.Z | Node.js: X.Y.Z | TypeScript: X.Y.Z
- [VERSION_COMPAT warnings if any]

## Likely Regression
[git-context findings: uncommitted changes / recent commits / package.json diff]

---

## Error 1: <CLASS> · <severity: blocking | warning>

### Root Cause
One sentence describing the root cause.

### Affected Files
- `path/to/file.tsx` line N
    N-1 | ...context...
  ▶ N   | ...error line...
    N+1 | ...context...

### Fix Steps
1. Step one (include code diff or exact command)
2. Step two

### Verify Fix
Run: `<command>`
Expected: `<expected output>`

### References
- [Title](https://nextjs.org/docs/...)

Repeat ## Error N block for each error found, ordered blocking → warning.

If no fix can be determined → replace Fix Steps with:

### Next Steps
- Additional info needed: [full log / Next.js version / Node.js version]
- Search: https://github.com/vercel/next.js/issues?q=<error-keywords>
- Community: https://github.com/vercel/next.js/discussions

Examples

Example A — Module not found (with project context)

Input log:

Module not found: Can't resolve './components/UserCard'
./src/app/dashboard/page.tsx

Actions:

  1. Class: MODULE_ERROR
  2. FileRef: src/app/dashboard/page.tsx — read import line
  3. Glob: **/UserCard.{tsx,ts,jsx,js} — not found
  4. tsconfig paths: check for alias → none

Report excerpt:

## Error 1: MODULE_ERROR · blocking

### Root Cause
`UserCard` component file does not exist at the imported path.

### Affected Files
- `src/app/dashboard/page.tsx` line 3
  2 | import { useState } from 'react'
▶ 3 | import UserCard from './components/UserCard'

### Fix Steps
1. Create `src/app/dashboard/components/UserCard.tsx` or correct the import path
2. Check for casing mismatch (e.g., `userCard.tsx` vs `UserCard.tsx`)

### Verify Fix
Run: `npm run build`
Expected: `✓ Compiled successfully`

### References
- [Resolving Modules](https://nextjs.org/docs/app/api-reference/config/typescript)

Example B — Missing "use client"

Input log:

You're importing a component that needs useState. It only works in a Client Component but none of its parents are marked with "use client".

Actions:

  1. Class: BOUNDARY_ERROR
  2. No file path → glob app/**/*.{tsx,jsx}, grep for useState without "use client" on line 1
  3. Find offending file

Fix step: Add "use client"; as line 1 of the offending file.

Verify: Run next dev → no You're importing a component... error in terminal.


Example C — ENV_ERROR (NEXT_PUBLIC_ prefix missing)

Input log:

process.env.API_URL is undefined

Actions:

  1. Class: ENV_ERROR
  2. Grep source for process.env.API_URL → find usage in a client component
  3. Check .env.local → variable exists as API_URL without NEXT_PUBLIC_

Fix step: Rename .env.local entry to NEXT_PUBLIC_API_URL, update all references.

Verify: Run next build → no undefined reference.


Additional Resources

  • For error patterns, version matrix, and code search templates → see reference.md

平台分布

Codex

34.77%
按下载量换算38

Claude

29.76%
按下载量换算33

Cursor

19.87%
按下载量换算22

Gemini CLI

9.66%
按下载量换算11

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills