Token导航 LogoToken导航TokenDH.com
研究检索权限需确认github未标认证来源可访问许可证需确认审计通过

debug-log调试日志

Agent Skill

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

总安装

216

周安装

9

GitHub Stars

公开资料未说明

下载量

72
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/nielsmadan/agentic-coding --skill debug-log

简介

为特定功能路径添加定向调试日志以追踪执行流与变量状态变化。

  • 适用于认证流程、支付环节等关键路径的运行时行为验证。
  • 单次只修改一处并立即测试,失败三次后停止尝试并升级处理。
  • 注意避免在条件表达式内插入日志语句造成语法错误或性能损耗。
  • debug-log 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Debug Log

Add targeted debug logging to trace execution flow and variable state.

Usage

/debug-log authentication flow
/debug-log                        # Uses last topic from conversation
/debug-log the checkout process

Debugging Discipline

One-Variable Rule:

  • Make ONE change at a time
  • Test after EACH individual change
  • If a change doesn't help, REVERT it before trying the next
  • Never stack untested changes

Circuit Breaker: If 3 sequential attempts fail to isolate the issue, STOP. Document findings and escalate to hard-fix for parallel investigation.

Gotchas

  • Log statements inside ternaries or short-circuit expressions change control flow — the return value becomes the log output, not the original expression.
  • String interpolation can trigger side effects (e.g., calling a getter that consumes an iterator or increments a counter). Log arguments must be pure reads.

Workflow

  1. Identify target - Use provided topic or infer from recent conversation
  2. Find relevant code - Locate functions, handlers, and key decision points
  3. Add logs at strategic points:

- Function entry/exit - Before/after async operations - Inside conditionals and loops - Variable assignments that matter

  1. Use descriptive prefixes - Make logs easy to trace

Log Format by Language

JavaScript/TypeScript:

console.log('[DEBUG][ModuleName] description:', variable);

Python:

print(f"[DEBUG][module_name] description: {variable}")

Go:

fmt.Printf("[DEBUG][PackageName] description: %v\n", variable)

Other languages: Adapt pattern - [DEBUG][Context] message

Strategic Log Placement

Place logs at these points:

LocationWhat to log
Function entryFunction name, key parameters
Before async/awaitWhat's about to happen
After async/awaitResult or error
ConditionalsWhich branch taken, why
LoopsIteration count, current item
Error pathsError details, state at failure

Example

For "debug the login flow":

async function login(email: string, password: string) {
  console.log('[DEBUG][Auth] login called with email:', email);

  const user = await findUser(email);
  console.log('[DEBUG][Auth] findUser result:', user ? 'found' : 'not found');

  if (!user) {
    console.log('[DEBUG][Auth] early return - user not found');
    return { error: 'User not found' };
  }

  const valid = await verifyPassword(password, user.hash);
  console.log('[DEBUG][Auth] password valid:', valid);

  if (!valid) {
    console.log('[DEBUG][Auth] early return - invalid password');
    return { error: 'Invalid password' };
  }

  console.log('[DEBUG][Auth] login successful, creating session');
  return { success: true, user };
}

Examples

Instrument auth flow with entry/exit and state logs:

/debug-log authentication flow

Locates login, token validation, and session creation functions. Adds [DEBUG][Auth] logs at each function entry/exit, before/after async calls like findUser and verifyPassword, and logs key state such as token presence and user lookup results.

Trace intermittent checkout error:

/debug-log checkout process

Finds the checkout handler, payment processing, and cart validation code. Adds logs at each conditional branch and async boundary to capture the exact execution path and variable state when the intermittent error occurs.

Troubleshooting

Added logging breaks functionality

Solution: Revert the last logging change immediately and re-test. Ensure log statements do not alter control flow (e.g., accidentally placed inside a ternary or before a return) and that string interpolation does not call methods with side effects.

Too many log points obscure the issue

Solution: Remove all but the entry/exit logs for the top-level function, then re-add logs one layer deeper at a time. Use distinct prefixes per module (e.g., [DEBUG][Auth] vs [DEBUG][Cart]) and filter output with grep to isolate the relevant trace.

Notes

  • Keep logs concise but informative
  • Don't log sensitive data (passwords, tokens, PII)
  • Use consistent prefixes for easy filtering
  • Focus on the specific area requested, don't over-instrument

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.97%
按下载量换算24

Claude

33.88%
按下载量换算24

Cursor

20.5%
按下载量换算15

Gemini CLI

9.63%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

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

来源信息

继续浏览同类 Skills