debugging

GitHub

用于系统性地诊断和解决Genesis或其依赖中的Bug、测试失败及运行时错误。通过复现、隔离、假设验证等步骤定位根因,应用最小修复并验证回归,最终输出结构化文档以预防复发。

src/genesis/skills/debugging/SKILL.md WingedGuardian/GENesis-AGI

Trigger Scenarios

测试意外失败 出现运行时错误或非预期行为 感知或反思产生异常结果 障碍解决升级为技术问题

Install

npx skills add WingedGuardian/GENesis-AGI --skill debugging -g -y
More Options

Non-standard path

npx skills add https://github.com/WingedGuardian/GENesis-AGI/tree/main/src/genesis/skills/debugging -g -y

Use without installing

npx skills use WingedGuardian/GENesis-AGI@debugging

指定 Agent (Claude Code)

npx skills add WingedGuardian/GENesis-AGI --skill debugging -a claude-code -g -y

安装 repo 全部 skill

npx skills add WingedGuardian/GENesis-AGI --all -g -y

预览 repo 内 skill

npx skills add WingedGuardian/GENesis-AGI --list

SKILL.md

Frontmatter
{
    "name": "debugging",
    "phase": 6,
    "consumer": "cc_background_task",
    "skill_type": "workflow",
    "description": "Systematic debugging of issues — use when a test fails, runtime error occurs, unexpected behavior is reported, or an awareness tick produces anomalous results"
}

Debugging

Purpose

Systematically diagnose and resolve bugs, failures, or unexpected behavior in Genesis or its dependencies.

When to Use

  • A test fails unexpectedly.
  • Runtime error or unexpected behavior is reported.
  • An awareness tick or reflection produces anomalous results.
  • Obstacle resolution escalates a technical issue.

Workflow

  1. Reproduce — Confirm the issue. Get the exact error, stack trace, or unexpected output. Define "expected vs. actual."
  2. Isolate — Narrow the scope. Which module? Which function? Which input triggers it? Use binary search on the call chain.
  3. Hypothesize — Form 2-3 candidate explanations. Rank by likelihood.
  4. Test hypotheses — Write a minimal test or add logging to confirm/deny each hypothesis. Start with the most likely.
  5. Fix — Apply the minimal correct fix. Do not fix adjacent issues in the same change.
  6. Verify — Run the failing test. Run the full test suite. Confirm no regressions.
  7. Document — Record the root cause and fix as an observation. Update procedures if the bug class is recurring.

Output Format

issue: <one-line description>
date: <YYYY-MM-DD>
root_cause: <what actually went wrong>
fix: <what was changed>
files_modified:
  - <file path>
regression_risk: low | medium | high
lesson: <what to remember to prevent recurrence>

Examples

Example: Hook fails in non-login shell

Trigger: Post-commit hook throws KeyError: 'HOME' in CI-like environment.

Expected output:

issue: Post-commit hook crashes when HOME not set in non-login sessions
date: 2026-04-06
root_cause: Hook script reads os.environ["HOME"] but non-login shells
  (systemd, cron) strip HOME from environment
fix: Guard with os.environ.get("HOME", "/root") fallback + persist HOME
  in /etc/environment during install
files_modified:
  - .claude/hooks/genesis-hook
  - scripts/install_guardian.sh
regression_risk: low
lesson: Never assume HOME exists — non-login shells strip it. Always
  use get() with fallback for environment variables in hook scripts.

References

  • tests/ — Test suite for verification
  • src/genesis/learning/procedural/ — Procedure updates for recurring patterns

Version History

  • f9015bb Current 2026-07-05 18:17

Same Skill Collection

.claude/skills/code-intelligence/SKILL.md
.claude/skills/content-publish/SKILL.md
.claude/skills/genesis-development/SKILL.md
.claude/skills/genesis-voice/SKILL.md
.claude/skills/gitnexus/gitnexus-cli/SKILL.md
.claude/skills/gitnexus/gitnexus-debugging/SKILL.md
.claude/skills/gitnexus/gitnexus-exploring/SKILL.md
.claude/skills/gitnexus/gitnexus-guide/SKILL.md
.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md
.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md
.claude/skills/shelve/SKILL.md
.claude/skills/unshelve/SKILL.md
.claude/skills/youtube-fetch/SKILL.md
config/gstack-patches/codex-SKILL.md
src/genesis/skills/browser-automation/SKILL.md
src/genesis/skills/evaluate/SKILL.md
src/genesis/skills/forecasting/SKILL.md
src/genesis/skills/integrate-module/SKILL.md
src/genesis/skills/lead-generation/SKILL.md
src/genesis/skills/linkedin-comment-strategy/SKILL.md
src/genesis/skills/linkedin-content-calendar/SKILL.md
src/genesis/skills/linkedin-dm-outreach/SKILL.md
src/genesis/skills/linkedin-hook-writer/SKILL.md
src/genesis/skills/linkedin-post-writer/SKILL.md
src/genesis/skills/linkedin-profile-optimizer/SKILL.md
src/genesis/skills/obstacle-resolution/SKILL.md
src/genesis/skills/onboarding/SKILL.md
src/genesis/skills/osint/SKILL.md
src/genesis/skills/prospect-researcher/SKILL.md
src/genesis/skills/research/SKILL.md
src/genesis/skills/retrospective/SKILL.md
src/genesis/skills/stealth-browser/SKILL.md
src/genesis/skills/triage-calibration/SKILL.md
src/genesis/skills/user_evaluate/SKILL.md
src/genesis/skills/video-processing/SKILL.md
.claude/skills/deliverable-builder/SKILL.md
.claude/skills/voice-master/SKILL.md
src/genesis/skills/voice-master/SKILL.md

Metadata

Files
0
Version
f9015bb
Hash
7cb13a28
Indexed
2026-07-05 18:17

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-14 18:03
浙ICP备14020137号-1 $Map of visitor$