Token导航 LogoToken导航

Agent Skill · 研究检索

debug-local(调试本地)

debug-local 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

debug-local 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 52,216。

总安装 563周安装 23GitHub Stars 5,839下载 182核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/lightdash/lightdash --skill debug-local

这个 Skill 是做什么的

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

遵循铁律:未查明根本原因前不得修改代码,避免症状修复导致的重复性问题。适用于日志缺失、回归测试失败或生产环境异常等需证据支撑的场景。分阶段收集症状、检查最近提交、验证假设并记录排查过程。操作前应确认 git 历史可访问性及是否需要临时分支进行实验性验证。

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

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

debug-local 怎么安装?

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

debug-local 支持哪些 AI 工具?

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

debug-local 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

debug-local 是免费的吗?

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

debug-local 用的人多吗?

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

debug-local 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 5,839 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 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调用外部服务未明确有提醒
debug-local

调试本地 · 本页

5635,839操作浏览器未明确未通过

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

SKILL.md 原文

Debugging Lightdash

Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.

Do not edit application code until you have a confirmed root cause hypothesis backed by evidence (logs, traces, reproduction). Fixing symptoms creates whack-a-mole debugging.


Phase 1: Gather Evidence

Before forming any hypothesis, collect facts.

1. Collect symptoms

Read error messages, stack traces, and reproduction steps. If the user hasn't provided enough context, ask ONE clarifying question.

2. Check recent changes

git log --oneline -20 -- <affected-files>

Was this working before? A regression means the root cause is in the diff.

3. Check logs and traces

pnpm exec pm2 logs lightdash-api --lines 50 --nostream

Then use Spotlight MCP:

  • mcp__spotlight__search_errors with {"timeWindow": 300} for recent errors with stack traces
  • mcp__spotlight__search_traces with {"timeWindow": 300} for recent request traces
  • mcp__spotlight__get_traces with a trace ID for full span breakdown

4. Reproduce

Can you trigger the bug deterministically? Use browser automation or curl to reproduce. If you can't reproduce, gather more evidence before proceeding.

5. Read the code

Trace the code path from the symptom back to potential causes. Use Grep to find all references, Read to understand the logic.

Output: State your root cause hypothesis — a specific, testable claim about what is wrong and why.


Phase 2: Pattern Matching

Check if the bug matches a known Lightdash pattern:

PatternSignatureWhere to look
Permission error403 ForbiddenCASL abilities in projectMemberAbility.ts, organizationMemberAbility.ts
Slow query / N+1Response >1s, many db spansSpotlight span breakdown — count db.* spans, check for loops
Stale explore cacheShows old columns/metricscached_explores table, CompileService
Migration issueColumn not found, schema mismatchpackages/backend/src/database/migrations/, check rollback
Scheduler job failureJob not running, stuckPM2 scheduler logs, graphile_worker.jobs table
Frontend stale dataUI shows old data after mutationTanStack Query cache invalidation, check queryClient.invalidateQueries
Race conditionIntermittent, timing-dependentConcurrent access to shared state, missing await
Cross-service file issueFile not found in worker/headlessMust use S3 via FileStorageClient, not local filesystem
Config driftWorks locally, fails in CI/stagingEnv vars, .env.development.local vs container env
Null propagationTypeError, cannot read propertyMissing guards on optional values, Knex .first() returning undefined

Also check:

  • git log for prior fixes in the same area — recurring bugs in the same files are an architectural smell
  • Whether the issue is in common, backend, or frontend — misattributing the layer wastes time

Phase 3: Hypothesis Testing

Before writing ANY fix, verify your hypothesis.

  1. Confirm: Add a temporary log, assertion, or use Spotlight/PM2 to check the suspected root cause. Reproduce. Does evidence match?
  2. If wrong: Return to Phase 1. Gather more evidence. Do not guess.
  3. 3-strike rule: If 3 hypotheses fail, STOP. Ask the user:

- Continue with a new hypothesis (describe it) - Escalate for human review - Add instrumentation and wait to catch it next time


Phase 4: Fix

Once root cause is confirmed:

  1. Fix the root cause, not the symptom. Smallest change that eliminates the actual problem.
  2. Minimal diff. Fewest files touched, fewest lines changed. Do not refactor adjacent code.
  3. Write a regression test that fails without the fix and passes with it.
  4. Run the relevant test suite. Paste output.
  5. Blast radius check: If fix touches >5 files, pause and confirm with the user before proceeding.

Phase 5: Verify & Report

Reproduce the original bug scenario and confirm it's fixed. This is not optional.

Output a structured debug report:

DEBUG REPORT
════════════════════════════════════════
Symptom:         [what the user observed]
Root cause:      [what was actually wrong]
Fix:             [what was changed, with file:line references]
Evidence:        [test output, trace showing fix works]
Regression test: [file:line of the new test]
Status:          DONE | DONE_WITH_CONCERNS | BLOCKED
════════════════════════════════════════

Status definitions:

  • DONE — root cause found, fix applied, regression test written, tests pass
  • DONE_WITH_CONCERNS — fixed but cannot fully verify (e.g., intermittent bug, needs staging)
  • BLOCKED — root cause unclear after investigation, escalated to user

Prerequisites

Ensure the development environment is running:

/docker-dev              # Start Docker services (postgres, minio, etc.)
pnpm pm2:start           # Start all PM2 processes including Spotlight
pnpm pm2:status          # Verify all processes are online

Services:

Tools Reference

Server Logs (PM2)

pnpm pm2:logs              # Stream all logs (Ctrl+C to exit)
pnpm pm2:logs:api          # API server logs only
pnpm pm2:logs:scheduler    # Background job scheduler logs
pnpm pm2:logs:frontend     # Vite dev server logs
pnpm pm2:logs:spotlight    # Spotlight sidecar logs

For non-blocking log viewing (last N lines):

pnpm exec pm2 logs lightdash-api --lines 20 --nostream
Log format

Lightdash logs include a 32-character trace ID for correlation:

[700aa55e784a437aa97de9b8c5c3ed3a] GET /api/v1/health 200 - 37 ms
[4d40816e5a7d433e88f99008de5f4be5] GET /api/v1/user/login-options 200 - 2 ms

Use the first 8 characters (e.g., 700aa55e) to look up traces in Spotlight.

Trace Lookup (Spotlight MCP)

Use the Spotlight MCP tools to query telemetry programmatically:

List recent traces
mcp__spotlight__search_traces with filters: {"timeWindow": 300}

Returns summary of recent traces with trace ID, endpoint, duration, span count.

Get trace details
mcp__spotlight__get_traces with traceId: "700aa55e"

Returns the full span tree with timing breakdown:

GET /api/v1/health [816224a9 · 39ms]
   ├─ select * from "knex_migrations" [db · 8ms]
   ├─ select * from "organizations" [db · 2ms]
   ├─ session [middleware.express · 1ms]
   └─ /api/v1/health [request_handler.express · 0ms]
Search for errors
mcp__spotlight__search_errors with filters: {"timeWindow": 300}

Returns runtime errors and exceptions with stack traces.

Search logs
mcp__spotlight__search_logs with filters: {"timeWindow": 300}

Returns application log entries.

Browser Debugging (Chrome DevTools MCP)

Use the Chrome DevTools MCP tools for browser automation:

Opening pages
mcp__chrome-devtools__new_page with url: "http://localhost:3000/login"
mcp__chrome-devtools__navigate_page with url: "http://localhost:3000", type: "url"
Taking snapshots
mcp__chrome-devtools__take_snapshot

Returns a text snapshot of the page based on the accessibility tree with unique uid identifiers for each element.

Interacting with elements
mcp__chrome-devtools__click with uid: "1_5"
mcp__chrome-devtools__fill with uid: "1_4", value: "test@example.com"
mcp__chrome-devtools__hover with uid: "1_3"
Screenshots
mcp__chrome-devtools__take_screenshot
mcp__chrome-devtools__take_screenshot with fullPage: true
mcp__chrome-devtools__take_screenshot with filePath: "/tmp/debug.png"
Console and network
mcp__chrome-devtools__list_console_messages
mcp__chrome-devtools__list_network_requests
mcp__chrome-devtools__get_network_request with reqid: 123
Page management
mcp__chrome-devtools__list_pages
mcp__chrome-devtools__select_page with pageId: 1
mcp__chrome-devtools__close_page with pageId: 2

Database Inspection

# Check table schema
psql -c "\d <table_name>"

# Query data directly
psql -c "SELECT * FROM <table> WHERE <condition> LIMIT 5;"

# Check scheduler jobs
psql -c "SELECT id, task_identifier, attempts, last_error FROM graphile_worker.jobs WHERE last_error IS NOT NULL LIMIT 10;"

Trace Attributes (Wide Events)

Traces contain contextual attributes beyond timing:

AttributeExampleDescription
http.route/api/v1/projects/:projectUuidRoute pattern
http.status_code200Response status
http.methodGETHTTP method
sentry.opdb, http.serverOperation type
db.systempostgresqlDatabase type

Common Debugging Scenarios

SymptomWhat to check
401 UnauthorizedTrace auth middleware, check session/JWT spans
403 ForbiddenCheck user ability/permissions in trace attributes, review CASL abilities
404 Not FoundVerify route exists, check resource lookup spans
400 Bad RequestLook for validation errors in trace/error logs
Slow responseCheck span breakdown for slow db.* or external calls, count db spans for N+1
Empty resultsVerify query parameters, check db query spans
500 Server ErrorUse search_errors for stack trace and context
UI not updatingCheck TanStack Query devtools, verify cache invalidation after mutations
Scheduler not runningCheck pnpm pm2:logs:scheduler, query graphile_worker.jobs table

Quick Commands Reference

ActionCommand
View all logspnpm pm2:logs
View API logs (non-blocking)pnpm exec pm2 logs lightdash-api --lines 20 --nostream
Check process statuspnpm pm2:status
Restart APIpnpm pm2:restart:api
Recent tracesmcp__spotlight__search_traces {"timeWindow": 300}
Trace detailsmcp__spotlight__get_traces "<8-char-prefix>"
Recent errorsmcp__spotlight__search_errors {"timeWindow": 300}
Browser snapshotmcp__chrome-devtools__take_snapshot
Open Spotlight UIhttp://localhost:8969

Cross-Agent Validation

Use another AI agent to validate your findings, challenge your conclusions, and provide independent evidence. This is not just for when you're stuck — actively seek validation throughout the debugging process to ensure your analysis is sound.

Detect your environment

which claude 2>/dev/null && echo "HAS_CLAUDE=true" || echo "HAS_CLAUDE=false"
which codex 2>/dev/null && echo "HAS_CODEX=true" || echo "HAS_CODEX=false"

If you are Claude → ask Codex

codex exec "Given this context from a Lightdash debugging session:

<context>
[paste relevant logs, traces, error messages, or code snippets]
</context>

<question>
[your specific question — e.g., 'Does this trace confirm that the query cache is being bypassed?' or 'Given this stack trace, is my conclusion that the middleware short-circuits before auth correct?']
</question>"

If you are Codex → ask Claude

claude -p "Given this context from a Lightdash debugging session:

<context>
[paste relevant logs, traces, error messages, or code snippets]
</context>

<question>
[your specific question]
</question>"

When to consult

  • Validate a hypothesis: Before concluding root cause, ask the other agent if the evidence supports your theory or if there's an alternative explanation
  • Verify your interpretation of data: When reading traces, logs, or query output — confirm you're reading it correctly
  • Challenge your fix: Before suggesting a code change, ask whether the fix actually addresses the root cause or just masks a symptom
  • Cross-check complex logic: When the issue involves multiple systems (frontend + API + database + permissions), get an independent read on the interaction
  • Justify a conclusion: If you're about to tell the user "X is the cause", make sure another perspective agrees — or surface the disagreement

Guidelines

  • Set a 5-minute timeout: Codex can take a while to respond. When running codex exec via the Bash tool, set the Bash timeout to 300000ms (5 minutes) to avoid premature termination. Do NOT pass --timeout to codex exec itself — it doesn't support that flag.
  • Be specific: Include the actual error, trace output, or code snippet — not just a vague description
  • Ask for validation, not just answers: "Does this evidence support my conclusion that X?" is better than "What's wrong?"
  • Include your current hypothesis: Let the other agent confirm or challenge it, rather than starting from scratch
  • Include what you've already ruled out: This avoids duplicate investigation and focuses the consultation
  • Always report back to the user: When you consult another agent, tell the user you did so. Summarize what you asked, what the other agent found, and whether you agree with their assessment. If there's a disagreement, present both perspectives and the supporting evidence for each. The user should never be unaware that another agent was consulted.

Test User Credentials

For testing authenticated flows:

API Access (Personal Access Token)

Prefer this method over using fetch() via Chrome DevTools MCP for API calls. curl with the PAT is faster, more reliable, and doesn't require a browser session or page context. Reserve browser MCP tools for UI interaction and visual debugging only.

A dev PAT is auto-provisioned by the seed data. Use it for direct API calls without browser login:

# Source the env file to get LDPAT and LIGHTDASH_API_URL
source .env.development.local

# Example: list projects
curl -s -H "Authorization: ApiKey $LDPAT" "$LIGHTDASH_API_URL/api/v1/org/projects" | jq

# Example: get user info
curl -s -H "Authorization: ApiKey $LDPAT" "$LIGHTDASH_API_URL/api/v1/user" | jq

The token (ldpat_deadbeefdeadbeefdeadbeefdeadbeef) is defined in SEED_PAT from @lightdash/common and inserted during database seeding. It belongs to the admin user (demo@lightdash.com) and never expires.

平台分布

Codex

37.25%
按下载量换算68

Claude

27.87%
按下载量换算51

Cursor

19.65%
按下载量换算36

Gemini CLI

9.78%
按下载量换算18

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

未通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

继续浏览同类 Skills