log-focus-debug
DashPlayer 日志聚焦调试技能。Use when developers ask to reduce noisy logs, focus on one feature log chain, add temporary focus markers (e.g. [FOCUS:token]), or clean up temporary debug logs after task completion. Triggers on: "日志太乱", "只看某个功能日志", "focus token", "withFocus", "临时日志标记", "清理调试日志".
Install
mkdir -p .claude/skills/log-focus-debug && curl -L -o skill.zip "https://mcp.directory/api/skills/download/6571" && unzip -o skill.zip -d .claude/skills/log-focus-debug && rm skill.zipInstalls to .claude/skills/log-focus-debug
About this skill
目的
在 DashPlayer 中快速建立“只看当前功能点日志”的调试闭环,并确保临时日志标记在任务结束后被清理。
适用范围
- Main + Renderer 全链路日志调试
- 临时功能聚焦(短期)
- AI 辅助排障与回收
先决条件
- 确认项目日志能力已可用:
DP_LOG_LEVEL/VITE_DP_LOG_LEVELDP_LOG_INCLUDE_MODULES/DP_LOG_EXCLUDE_MODULESVITE_DP_LOG_INCLUDE_MODULES/VITE_DP_LOG_EXCLUDE_MODULESDP_LOG_FOCUS_TOKEN/VITE_DP_LOG_FOCUS_TOKEN
- 确认 logger API 可用:
- Main:
getMainLogger('Module').withFocus(token) - Renderer:
getRendererLogger('Module').withFocus(token)
- Main:
标准操作流程
1) 定义本次调试 token
使用稳定命名:<feature>-<yyyymmdd>,例如:player-speed-20260207。
2) 开启聚焦过滤
在 .env 中设置:
DP_LOG_LEVEL=debug
VITE_DP_LOG_LEVEL=debug
DP_LOG_FOCUS_TOKEN=player-speed-20260207
VITE_DP_LOG_FOCUS_TOKEN=player-speed-20260207
可选叠加模块过滤:
DP_LOG_INCLUDE_MODULES=PlaybackService,PlayerWithControlsPage,SpeedSlider
VITE_DP_LOG_INCLUDE_MODULES=PlayerWithControlsPage,SpeedSlider
3) 注入临时聚焦日志
优先使用 withFocus:
const mainLogger = getMainLogger('PlaybackService').withFocus('player-speed-20260207');
mainLogger.debug('sync playback rate', { rate, source });
const rendererLogger = getRendererLogger('SpeedSlider').withFocus('player-speed-20260207');
rendererLogger.debug('speed changed by user', { rate });
兼容写法(仅临时):
logger.debug('[FOCUS:player-speed-20260207] speed changed', { rate });
4) 验证
- 控制台仅出现目标功能链路
- 主进程落盘日志仅包含目标 token(在设置了
DP_LOG_FOCUS_TOKEN时)
清理规约(必须执行)
任务结束时必须移除临时标记,避免调试噪音进入长期代码。
- 搜索:
rg "\\[FOCUS:|withFocus\\(" src
- 删除本次任务临时加的
withFocus(...)与[FOCUS:...]。 - 保留有长期价值的结构化日志字段(如关键业务上下文),但去掉临时 token。
- 运行最小验证:
yarn eslint -c .eslintrc.react-compiler.json <touched-files>
- 再次搜索,确保零残留。
输出约定
当使用本技能时,agent 应在回复中明确:
- 当前 focus token
- 影响的模块范围(main/renderer)
- 已注入的临时标记点
- 清理是否完成(附搜索结果结论)
More by solidSpoon
View all skills by solidSpoon →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversRtfmbro is an MCP server for config management tools—get real-time, version-specific docs from GitHub for Python, Node.j
Reduce errors when generating code with up-to-date Bitrix24 REST API methods — streamline development, improve reliabili
Enhance software testing with Playwright MCP: Fast, reliable browser automation, an innovative alternative to Selenium s
Extend your developer tools with GitHub MCP Server for advanced automation, supporting GitHub Student and student packag
Connect Blender to Claude AI for seamless 3D modeling. Use AI 3D model generator tools for faster, intuitive, interactiv
Desktop Commander MCP unifies code management with advanced source control, git, and svn support—streamlining developmen
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.