Token导航 LogoToken导航

Agent Skill · 研究检索

bknd-debugging(背景调试)

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

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

总安装 303周安装 13GitHub Stars 3下载 106核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/cameronapak/bknd-skills --skill bknd-debugging

这个 Skill 是做什么的

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

bknd-debugging 用于诊断和修复常见 Bknd 问题,适合在 Codex、Claude、Cursor、Gemini CLI 中排查配置错误、路由异常或 API 响应故障。适用场景包括检查注册路由、分析 HTTP 状态码含义、审查 server logs 及验证配置路径正确性。

核心能力是提供一组 CLI 调试命令,如 show routes、check config、inspect errors 等实用工具。使用方式优先尝试 CLI 命令快速定位问题,必要时结合 admin panel 可视化界面交叉验证。遇到 5xx 错误时应重点检查数据库连接和业务逻辑异常堆栈信息。

来源仓库内路径:skills/bknd-debugging

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

bknd-debugging 怎么安装?

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

bknd-debugging 支持哪些 AI 工具?

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

bknd-debugging 需要什么权限?

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

bknd-debugging 是免费的吗?

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

bknd-debugging 用的人多吗?

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

bknd-debugging 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

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

值得选的地方

  • 同时适配 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调用外部服务未明确有提醒
bknd-debugging

背景调试 · 本页

3033接触敏感数据未明确通过

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

SKILL.md 原文

Debugging Common Issues

Diagnose and fix common Bknd problems using CLI tools, error analysis, and systematic troubleshooting.

Prerequisites

  • Bknd project set up locally
  • Terminal/command line access
  • Basic understanding of HTTP status codes

When to Use UI Mode

  • Inspecting data in admin panel (/admin)
  • Verifying entity schema visually
  • Testing CRUD operations manually
  • Checking user/role configurations

When to Use Code Mode

  • Running debug CLI commands
  • Analyzing API response errors
  • Checking route registration
  • Inspecting configuration paths
  • Reviewing server logs

CLI Debug Commands

Show All Registered Routes

npx bknd debug routes

Output shows every HTTP endpoint:

  • API routes (/api/data/*, /api/auth/*, /api/media/*)
  • Admin routes (/admin/*)
  • Custom Flow HTTP triggers
  • Plugin routes

Use when: endpoint returns 404, verifying custom routes registered.

Show Internal Paths

npx bknd debug paths

Output:

[PATHS] {
  rootpath: '/path/to/bknd',
  distPath: '/path/to/dist',
  relativeDistPath: './dist',
  cwd: '/your/project',
  dir: '/path/to/cli',
  resolvedPkg: '/path/to/package.json'
}

Use when: config file not loading, path resolution issues.

CLI Help

npx bknd --help
npx bknd run --help
npx bknd types --help

HTTP Error Codes

CodeMeaningCommon Causes
400Bad RequestInvalid JSON, missing required fields, validation error
401UnauthorizedMissing/invalid/expired token
403ForbiddenValid token but insufficient permissions
404Not FoundWrong endpoint, entity doesn't exist, record not found
409ConflictDuplicate unique field, user already exists
413Payload Too LargeFile upload exceeds body_max_size
500Server ErrorUnhandled exception, database error

Common Issues & Solutions

Config File Not Loading

Symptoms: "Config file could not be resolved" error

Diagnose:

# Check config exists
ls bknd.config.*

# Check current directory
pwd

# Check what bknd sees
npx bknd debug paths

Solutions:

# Ensure correct extension
mv bknd.config.js bknd.config.ts

# Specify explicitly
npx bknd run -c ./bknd.config.ts

# Check supported extensions: .ts, .js, .mjs, .cjs, .json

Database Not Persisting

Symptoms: Data disappears on server restart

Diagnose:

# Check if using memory mode
# Look for "Using in-memory" in startup output
npx bknd run

# Check for database file
ls *.db

Solutions:

# Use file-based database
npx bknd run --db-url "file:data.db"

# NOT memory mode
npx bknd run --memory  # Data will be lost!

# Verify in config:
# connection: { url: "file:data.db" }  ✓
# connection: { url: ":memory:" }      ✗

Port Already in Use

Symptoms: EADDRINUSE: address already in use

Diagnose:

# Find process using port
lsof -i :3000

# Or on Windows
netstat -ano | findstr :3000

Solutions:

# Use different port
npx bknd run --port 3001

# Kill existing process
kill -9 <PID>

# Or on Windows
taskkill /PID <PID> /F

Authentication Not Working

Symptoms: 401 errors, token not persisting, user always null

Diagnose:

# Test login endpoint
curl -X POST http://localhost:3000/api/auth/password/login \
  -H "Content-Type: application/json" \
  -d '{"email":"test@example.com","password":"password"}'

# Check auth configuration
# Look for "strategy" in response errors

Solutions:

  1. Auth not enabled:
export default {
  app: {
    auth: { enabled: true },  // Required!
  }
}
  1. Wrong strategy path:
# Password auth endpoint:
POST /api/auth/password/login    # ✓
POST /api/auth/login             # ✗ 404
  1. JWT secret not set (production):
auth: {
  jwt: {
    secret: process.env.JWT_SECRET,  // Required for production
  }
}
  1. Cookie not set (CORS):
auth: {
  cookie: {
    secure: false,     // Set true only for HTTPS
    sameSite: "lax",   // Not "strict" for OAuth
  }
}
  1. Token not persisting (frontend):
const api = new Api({
  host: "http://localhost:3000",
  storage: localStorage,  // Required for token persistence
});

Permission Denied (403)

Symptoms: Valid token but 403 Forbidden

Diagnose:

# Check user's role
curl http://localhost:3000/api/auth/me \
  -H "Authorization: Bearer <token>"

# Check role permissions in config

Solutions:

  1. Guard not enabled:
export default {
  app: {
    auth: {
      guard: { enabled: true },  // Required for permissions
    }
  }
}
  1. No default role (anonymous access):
auth: {
  guard: {
    roles: {
      anonymous: {
        is_default: true,  // Allow unauthenticated access
        permissions: ["data.entity.read"],
      }
    }
  }
}
  1. Role missing permission:
roles: {
  user: {
    permissions: [
      "data.entity.read",
      "data.entity.create",  // Add if needed
    ]
  }
}
  1. Entity-specific permission needed:
permissions: [
  { permission: "data.entity.read", entity: "posts" },
]

Entity/Record Not Found (404)

Symptoms: 404 on data endpoints

Diagnose:

# List all entities
curl http://localhost:3000/api/data

# Check entity name (case-sensitive)
curl http://localhost:3000/api/data/Posts    # ✗
curl http://localhost:3000/api/data/posts    # ✓

# Verify routes
npx bknd debug routes | grep data

Solutions:

  1. Schema not synced:
# Restart server to sync schema
npx bknd run
  1. Entity name case mismatch:
// Schema defines lowercase
entity("posts", { ... })

// API call must match exactly
api.data.readMany("posts");     // ✓
api.data.readMany("Posts");     // ✗ 404
  1. Record doesn't exist:
const result = await api.data.readOne("posts", 999);
if (!result.ok) {
  console.log("Not found:", result.status);  // 404
}

Type Errors with em()

Symptoms: TypeScript errors using schema object

Problem: em() returns schema definition, NOT queryable EntityManager.

// WRONG - this will fail
const schema = em({
  posts: entity("posts", { title: text() }),
});
schema.repo("posts").find();  // ✗ Error!

// CORRECT - use SDK for queries
const api = new Api({ url: "http://localhost:3000" });
await api.data.readMany("posts");  // ✓

For direct database access (server-side only):

const app = new App(config);
await app.build();
const posts = await app.em.repo("posts").findMany();  // ✓

Schema Sync Issues

Symptoms: Entity exists in code but not in database, or vice versa

Diagnose:

# Check admin panel -> Schema view
# Or query directly
curl http://localhost:3000/api/system/schema

Solutions:

  1. Restart server - schema syncs on startup:
npx bknd run
  1. Force sync (may drop data):
options: {
  sync: {
    force: true,  // Dangerous! Can drop tables
  }
}
  1. Check mode - Database Mode ignores code schema:
// Code Mode (default) - schema from code
mode: "code"

// Hybrid Mode - merges code + database
mode: "hybrid"

File Upload Failing

Symptoms: 413 error, upload silently fails

Diagnose:

# Check file size
ls -la myfile.jpg

# Test upload
curl -X POST http://localhost:3000/api/media/upload \
  -H "Authorization: Bearer <token>" \
  -F "file=@myfile.jpg"

Solutions:

  1. File too large:
media: {
  body_max_size: 10 * 1024 * 1024,  // 10MB
}
  1. Storage not configured:
media: {
  adapter: {
    type: "s3",
    // ... S3 config
  }
}
  1. Local storage (dev only):
import { registerLocalMediaAdapter } from "bknd/adapter/node";
const local = registerLocalMediaAdapter();

export default {
  app: {
    media: { adapter: local }
  }
}

CORS Errors

Symptoms: "Access-Control-Allow-Origin" errors in browser console

Diagnose:

# Check CORS headers
curl -I http://localhost:3000/api/data/posts \
  -H "Origin: http://localhost:5173"

Solutions:

export default {
  app: {
    server: {
      cors: {
        origin: ["http://localhost:5173", "https://myapp.com"],
        credentials: true,  // For cookies
      }
    }
  }
}

For development (allow all):

server: {
  cors: {
    origin: "*",
  }
}

Headless Environment Crash

Symptoms: spawn xdg-open ENOENT on server without display

Solution:

npx bknd run --no-open

Windows ESM Errors

Symptoms: ERR_UNSUPPORTED_ESM_URL_SCHEME on Windows

Solutions:

  1. Use Node.js 18+
  2. Ensure "type": "module" in package.json
  3. Use .mjs extension for config

TypeScript Types Not Updating

Symptoms: IDE shows old types, autocomplete wrong

Solutions:

# Regenerate types
npx bknd types

# Restart TypeScript server (VS Code)
# Cmd/Ctrl + Shift + P -> "TypeScript: Restart TS Server"

# Clear cache
rm -rf node_modules/.cache

Debug Script Pattern

Create a debug helper for systematic troubleshooting:

// debug.ts
import { Api } from "bknd/client";

async function debug() {
  const api = new Api({ host: "http://localhost:3000" });

  // 1. Check server health
  console.log("=== Health Check ===");
  const entities = await fetch("http://localhost:3000/api/data");
  console.log("Status:", entities.status);
  console.log("Entities:", await entities.json());

  // 2. Check auth
  console.log("\n=== Auth Check ===");
  const me = await api.auth.me();
  console.log("Auth status:", me.ok ? "authenticated" : "not authenticated");
  if (me.data) console.log("User:", me.data);

  // 3. Check schema
  console.log("\n=== Schema Check ===");
  const schema = await fetch("http://localhost:3000/api/system/schema");
  console.log("Schema:", await schema.json());

  // 4. Test entity access
  console.log("\n=== Entity Access ===");
  const posts = await api.data.readMany("posts", { limit: 1 });
  console.log("Posts access:", posts.ok ? "success" : `failed (${posts.status})`);
}

debug().catch(console.error);

Run with:

npx tsx debug.ts

Logging Patterns

Server-Side Logging

// In seed function or plugin
options: {
  seed: async (ctx) => {
    console.log("[SEED] Starting...");
    console.log("[SEED] Entities:", Object.keys(ctx.em.entities));

    try {
      await ctx.em.mutator("posts").insertOne({ title: "Test" });
      console.log("[SEED] Created post");
    } catch (e) {
      console.error("[SEED] Error:", e);
    }
  }
}

API Response Logging

const api = new Api({
  host: "http://localhost:3000",
  verbose: true,  // Logs all requests/responses
});

// Or manual logging
const result = await api.data.readMany("posts");
console.log("Request result:", {
  ok: result.ok,
  status: result.status,
  data: result.data,
  error: result.error,
});

Custom Fetcher with Logging

const api = new Api({
  host: "http://localhost:3000",
  fetcher: async (url, options) => {
    console.log("→", options?.method || "GET", url);
    const start = Date.now();
    const response = await fetch(url, options);
    console.log("←", response.status, `(${Date.now() - start}ms)`);
    return response;
  },
});

Flow/Task Debugging

HTTP Trigger Errors

Sync mode returns errors in response:

{
  "success": false,
  "errors": [
    {
      "task": "fetchUser",
      "error": "Failed to fetch user: 404 Not Found",
      "timestamp": "2024-01-15T10:30:00Z"
    }
  ]
}

Task Error Handling

import { Task, Condition } from "bknd/flows";

const flow = new Flow("myFlow", [
  mainTask,
  errorTask.connect(mainTask, Condition.error()),  // Handle errors
]);

Verification Checklist

When debugging, check these in order:

  1. Server running? curl http://localhost:3000/api/data
  2. Config loaded?

- Check startup logs for "Using config from"

  1. Schema synced?

- Check admin panel or /api/system/schema

  1. Auth enabled? (if needed)

- Check auth: {enabled: true} in config

  1. Permissions set? (if 403)

- Check guard: {enabled: true} and roles

  1. CORS configured? (if browser errors)

- Check server: {cors: {...}}

DOs and DON'Ts

DO:

  • Check server logs first
  • Use npx bknd debug routes for 404s
  • Verify entity names match exactly (case-sensitive)
  • Test with curl before debugging frontend
  • Use verbose: true in Api for request logging
  • Restart server after schema changes

DON'T:

  • Assume em() returns a queryable EntityManager
  • Forget --no-open on headless servers
  • Use :memory: database for persistent data
  • Skip checking HTTP status codes in responses
  • Ignore CORS when debugging frontend issues
  • Use sync: {force: true} in production

Related Skills

  • bknd-local-setup - Initial project setup
  • bknd-env-config - Environment variables
  • bknd-setup-auth - Authentication configuration
  • bknd-assign-permissions - Permission troubleshooting
  • bknd-api-discovery - Explore available endpoints

平台分布

Codex

36.44%
按下载量换算39

Claude

29.57%
按下载量换算31

Cursor

19.04%
按下载量换算20

Gemini CLI

8.7%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

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

安装前确认

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

继续浏览同类 Skills