Token导航 LogoToken导航

Agent Skill · 研究检索

debugging(调试)

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

debugging 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 47,223。

总安装 744周安装 31GitHub Stars 公开资料未说明下载 248核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

AgentSkills.tonpx skills
npx skills add duc01226/easyplatform --skill "debugging"

这个 Skill 是做什么的

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

duc01226-easyplatform-debugging 用于查找、检索和筛选相关信息。适用于 Codex、Claude、Cursor、Gemini CLI 中的调试支持场景。通过 npx skills add duc01226/easyplatform --skill "debugging" 安装。

注意检查是否会触发日志写入或进程中断类操作。建议核实来源仓库中的调试流程和权限要求。

来源仓库内路径:skills/debugging

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add duc01226/easyplatform --skill "debugging";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

debugging 怎么安装?

在终端执行 npx skills add duc01226/easyplatform --skill "debugging"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

debugging 支持哪些 AI 工具?

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

debugging 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

debugging 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

debugging 用的人多吗?

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

debugging 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 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调用外部服务未明确有提醒
debugging

调试 · 本页

744—只读MIT未收录

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

SKILL.md 原文

Debugging

Comprehensive debugging framework combining systematic investigation, root cause tracing, defense-in-depth validation, and verification protocols.

Core Principle

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

Random fixes waste time and create new bugs. Find the root cause, fix at source, validate at every layer, verify before claiming success.

When to Use

Always use for: Test failures, bugs, unexpected behavior, performance issues, build failures, integration problems, before claiming work complete

Especially when: Under time pressure, "quick fix" seems obvious, tried multiple fixes, don't fully understand issue, about to claim success

Mode Selection

ModeFlagUse WhenWorkflow
Interactive(default)User available for feedback, exploratory debuggingReal-time collaboration, iterative investigation
Autonomous--autonomousBatch debugging, CI/CD, comprehensive analysis needed5-phase structured workflow with approval gates

Interactive Mode (Default)

Standard debugging with user engagement. Use the techniques below with real-time feedback.

Autonomous Mode (--autonomous)

Structured headless debugging workflow with approval gates. Creates artifacts in .ai/workspace/analysis/.

Invocation: /debugging --autonomous or /debug --autonomous

Workflow:

  1. Phase 1: Bug Report Analysis → Document in .ai/workspace/analysis/[bug-name].md
  2. Phase 2: Evidence Gathering → Multi-pattern search, dependency tracing
  3. Phase 3: Root Cause Analysis → Ranked causes with confidence levels
  4. Phase 4: Solution Proposal → Code changes, risk assessment, testing strategy
  5. Phase 5: Approval Gate → Present analysis for user approval before implementing

Key Features:

  • Anti-hallucination protocols (assumption validation, evidence chains)
  • Confidence level tracking (High ≥90%, Medium 70-89%, Low <70%)
  • Structured evidence documentation
  • Explicit approval required before implementation

Autonomous Workflow Details

Core Anti-Hallucination Protocols

ASSUMPTION_VALIDATION_CHECKPOINT

Before every major operation:

  1. "What assumptions am I making about [X]?"
  2. "Have I verified this with actual code evidence?"
  3. "Could I be wrong about [specific pattern/relationship]?"
EVIDENCE_CHAIN_VALIDATION

Before claiming any relationship:

  • "I believe X calls Y because..." → show actual code
  • "This follows pattern Z because..." → cite specific examples
  • "Service A owns B because..." → grep for actual boundaries
CONTEXT_ANCHOR_SYSTEM

Every 10 operations:

  1. Re-read the original task
  2. Verify current operation aligns with goals
  3. Check if solving the right problem

Quick Verification Checklist

Before removing/changing ANY code:

  • Searched static imports?
  • Searched string literals in code?
  • Checked dynamic invocations (attributes, reflection)?
  • Read actual implementations?
  • Traced who depends on this?
  • Assessed what breaks if removed?
  • Documented evidence clearly?
  • Declared confidence level?

If ANY unchecked → DO MORE INVESTIGATION If confidence < 90% → REQUEST USER CONFIRMATION

Autonomous Phase 1: Bug Report Analysis

Create analysis document in .ai/workspace/analysis/[bug-name].md:

## Bug Report Analysis

### Reported Behavior

[What is happening]

### Expected Behavior

[What should happen]

### Reproduction Steps

[How to reproduce]

### Error Message

[If available]

### Stack Trace

[If available]

### Environment

[Dev/Staging/Prod, browser, etc.]

### Affected Services

[List affected services/modules]

Autonomous Phase 2: Evidence Gathering

Multi-Pattern Search Strategy
# 1. Exact class/method name
grep -r "ExactClassName" --include="*.cs" --include="*.ts"

# 2. Partial variations (camelCase, PascalCase, snake_case)
grep -r "ClassName\|className\|class_name" --include="*.cs"

# 3. String literals (runtime/config references)
grep -r '"ClassName"' --include="*.cs" --include="*.json" --include="*.config"

# 4. Reflection/dynamic usage
grep -r "typeof(.*ClassName)\|nameof(.*ClassName)" --include="*.cs"

# 5. Configuration files
grep -r "ClassName" --include="*.json" --include="appsettings*.json"

# 6. Attribute-based usage
grep -r "\[.*ClassName.*\]" --include="*.cs"
Dependency Tracing
# Direct usages (imports)
grep -r "using.*{Namespace}" --include="*.cs"

# Interface implementations
grep -r ": I{ClassName}\|: I{ClassName}," --include="*.cs"

# Base class inheritance
grep -r ": {BaseClassName}" --include="*.cs"

# DI registrations
grep -r "AddScoped.*{ClassName}\|AddTransient.*{ClassName}\|AddSingleton.*{ClassName}" --include="*.cs"

# Test references
grep -r "{ClassName}" --include="*Test*.cs" --include="*Spec*.cs"
Error-Specific Searches
# Find exception handling
grep -r "catch.*{ExceptionType}" --include="*.cs"

# Find validation logic
grep -r "Validate.*{EntityName}\|{EntityName}.*Validate" --include="*.cs"

# Find error messages
grep -r "error message text from report" --include="*.cs" --include="*.ts"
EasyPlatform-Specific Searches
# EventHandlers for entity
grep -r ".*EventHandler.*{EntityName}|{EntityName}.*EventHandler" --include="*.cs"

# Background jobs
grep -r ".*BackgroundJob.*{EntityName}|{EntityName}.*BackgroundJob" --include="*.cs"

# Message bus consumers
grep -r ".*Consumer.*{EntityName}|{EntityName}.*Consumer" --include="*.cs"

# Platform validation
grep -r "PlatformValidationResult\|EnsureValid\|EnsureFound" --include="*.cs"

Autonomous Phase 3: Root Cause Analysis

Analysis Dimensions
## Root Cause Analysis

### 1. Technical Dimension

- Code defects identified: [List]
- Architectural issues: [List]
- Race conditions possible: [Yes/No, evidence]

### 2. Business Logic Dimension

- Rule violations: [List]
- Validation failures: [List]
- Edge cases missed: [List]

### 3. Data Dimension

- Data integrity issues: [List]
- State corruption possible: [Yes/No]
- Migration issues: [Yes/No]

### 4. Integration Dimension

- Cross-service failures: [List]
- API contract violations: [List]
- Message bus issues: [List]
- LastMessageSyncDate race conditions: [Yes/No]

### 5. Environment Dimension

- Configuration issues: [List]
- Environment-specific: [Dev/Staging/Prod differences]
Ranked Causes
## Potential Root Causes (Ranked by Probability)

1. **[Cause 1]** - Confidence: XX%
    - Evidence: [What supports this]
    - Location: [file:line]

2. **[Cause 2]** - Confidence: XX%
    - Evidence: [What supports this]
    - Location: [file:line]

Autonomous Phase 4: Solution Proposal

## Proposed Fix

### Solution Description

[Describe the fix approach]

### Code Changes

- File: `path/to/file.cs`
- Lines: XX-YY
- Change: [Description]

### Risk Assessment

- **Impact Level**: Low | Medium | High
- **Regression Risk**: [What could break]
- **Affected Components**: [List]

### Testing Strategy

- [ ] Unit test for the fix
- [ ] Regression tests for affected area
- [ ] Integration test if cross-service
- [ ] Manual testing checklist

### Rollback Plan

[How to revert if fix causes issues]

Autonomous Phase 5: Approval Gate

CRITICAL: Present analysis and proposed fix for approval before implementing.

Format:

## Bug Analysis Complete - Approval Required

### Root Cause Summary

[Primary root cause with evidence]

### Proposed Fix

[Fix description with specific files and changes]

### Risk Assessment

- **Risk Level**: [Low/Medium/High]
- **Regression Risk**: [assessment]

### Confidence Level: [X%]

### Files to Modify:

1. `path/to/file.cs:line` - [change description]

**Awaiting approval to proceed.**

DO NOT implement without user approval.

Confidence Levels

LevelRangeCriteriaAction
High90-100%Multiple evidence sources, clear code path, no contradictionsProceed with fix
Medium70-89%Some evidence, some uncertaintyPresent findings, request confirmation
Low< 70%Limited evidence, multiple interpretationsMUST request user confirmation

Evidence Documentation Template

## Investigation Evidence

### Searches Performed

1. Pattern: `{search1}` - Found: [X files]
2. Pattern: `{search2}` - Found: [Y files]

### Key Findings

- File: `path/to/file.cs:123` - [What was found]
- File: `path/to/another.cs:45` - [What was found]

### Not Found (Important Negatives)

- Expected `{pattern}` but not found in `{location}`
- No references to `{component}` in `{scope}`

### Confidence Level: [XX]%

### Remaining Uncertainties

1. [Uncertainty 1 - how to resolve]
2. [Uncertainty 2 - how to resolve]

### Recommendation

[Clear recommendation with reasoning]

Common Bug Categories (Autonomous)

Null Reference Exceptions
grep -r "\.{PropertyName}" --include="*.cs" -A 2 -B 2
# Check for null checks before access
Validation Failures
grep -r "Validate\|EnsureValid\|IsValid\|PlatformValidationResult" --include="*.cs"
# Trace validation chain
Cross-Service Issues
grep -r "Consumer.*{Entity}\|Producer.*{Entity}" --include="*.cs"
# Check message bus communication
grep -r "LastMessageSyncDate" --include="*.cs"
# Check for race condition handling
Authorization Issues
grep -r "PlatformAuthorize\|RequestContext.*Role\|HasRole" --include="*.cs"
# Check auth patterns
Frontend Issues
grep -r "observerLoadingErrorState\|tapResponse\|untilDestroyed" --include="*.ts"
# Check state management patterns

Autonomous Verification Before Closing

  • Root cause identified with evidence
  • Fix addresses root cause, not symptoms
  • No new issues introduced
  • Tests cover the fix
  • Confidence level declared
  • User confirmed if confidence < 90%

The Four Techniques

1. Systematic Debugging

Four-phase debugging framework that ensures root cause investigation before attempting fixes.

The Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

If haven't completed Phase 1, cannot propose fixes.

The Four Phases

Must complete each phase before proceeding to next.

Phase 1: Root Cause Investigation

BEFORE attempting ANY fix:

  1. Read Error Messages Carefully - Don't skip past errors/warnings, read stack traces completely
  2. Reproduce Consistently - Can trigger reliably? Exact steps? If not reproducible → gather more data
  3. Check Recent Changes - What changed? Git diff, recent commits, new dependencies, config changes
  4. Gather Evidence in Multi-Component Systems

- For EACH component boundary: log data entering/exiting, verify environment propagation - Run once to gather evidence showing WHERE it breaks - THEN analyze to identify failing component

  1. Trace Data Flow - Where does bad value originate? Trace up call stack until finding source
Phase 2: Pattern Analysis

Find pattern before fixing:

  1. Find Working Examples - Locate similar working code in same codebase
  2. Compare Against References - Read reference implementation COMPLETELY, understand fully before applying
  3. Identify Differences - List every difference however small, don't assume "that can't matter"
  4. Understand Dependencies - What other components, settings, config, environment needed?
Phase 3: Hypothesis and Testing

Scientific method:

  1. Form Single Hypothesis - "I think X is root cause because Y", be specific not vague
  2. Test Minimally - SMALLEST possible change to test hypothesis, one variable at a time
  3. Verify Before Continuing - Worked? → Phase 4. Didn't work? → NEW hypothesis. DON'T add more fixes
  4. When Don't Know - Say "I don't understand X", don't pretend, ask for help
Phase 4: Implementation

Fix root cause, not symptom:

  1. Create Failing Test Case - Simplest reproduction, automated if possible, MUST have before fixing
  2. Implement Single Fix - Address root cause identified, ONE change, no "while I'm here" improvements
  3. Verify Fix - Test passes? No other tests broken? Issue actually resolved?
  4. If Fix Doesn't Work

- STOP. Count: How many fixes tried? - If < 3: Return to Phase 1, re-analyze with new information - If ≥ 3: STOP and question architecture

  1. If 3+ Fixes Failed: Question Architecture

- Pattern: Each fix reveals new shared state/coupling problem elsewhere - STOP and question fundamentals: Is pattern sound? Wrong architecture? - Discuss with human partner before more fixes

Red Flags - STOP and Follow Process

If catch yourself thinking:

  • "Quick fix for now, investigate later"
  • "Just try changing X and see if it works"
  • "Add multiple changes, run tests"
  • "Skip the test, I'll manually verify"
  • "It's probably X, let me fix that"
  • "I don't fully understand but this might work"
  • "One more fix attempt" (when already tried 2+)

ALL mean: STOP. Return to Phase 1.

Human Partner Signals You're Doing It Wrong
  • "Is that not happening?" - Assumed without verifying
  • "Will it show us...?" - Should have added evidence gathering
  • "Stop guessing" - Proposing fixes without understanding
  • "Ultrathink this" - Question fundamentals, not just symptoms
  • "We're stuck?" (frustrated) - Approach isn't working

When see these: STOP. Return to Phase 1.

Common Rationalizations
ExcuseReality
"Issue is simple, don't need process"Simple issues have root causes too
"Emergency, no time for process"Systematic is FASTER than guess-and-check
"Just try this first, then investigate"First fix sets pattern. Do right from start
"One more fix attempt" (after 2+ failures)3+ failures = architectural problem
Real-World Impact

From debugging sessions:

  • Systematic approach: 15-30 minutes to fix
  • Random fixes approach: 2-3 hours of thrashing
  • First-time fix rate: 95% vs 40%
  • New bugs introduced: Near zero vs common

2. Root Cause Tracing

Systematically trace bugs backward through call stack to find original trigger.

Core Principle

Trace backward through call chain until finding original trigger, then fix at source.

Bugs often manifest deep in call stack (git init in wrong directory, file created in wrong location). Instinct is to fix where error appears, but that's treating symptom.

When to Use
  • Error happens deep in execution (not at entry point)
  • Stack trace shows long call chain
  • Unclear where invalid data originated
  • Need to find which test/code triggers problem
The Tracing Process
1. Observe the Symptom
Error: git init failed in /Users/jesse/project/packages/core
2. Find Immediate Cause

What code directly causes this?

await execFileAsync('git', ['init'], { cwd: projectDir });
3. Ask: What Called This?
WorktreeManager.createSessionWorktree(projectDir, sessionId)
  → called by Session.initializeWorkspace()
  → called by Session.create()
  → called by test at Project.create()
4. Keep Tracing Up

What value was passed?

  • projectDir = '' (empty string!)
  • Empty string as cwd resolves to process.cwd()
  • That's the source code directory!
5. Find Original Trigger

Where did empty string come from?

const context = setupCoreTest(); // Returns { tempDir: '' }
Project.create('name', context.tempDir); // Accessed before beforeEach!
Adding Stack Traces

When can't trace manually, add instrumentation:

async function gitInit(directory: string) {
  const stack = new Error().stack;
  console.error('DEBUG git init:', {
    directory,
    cwd: process.cwd(),
    stack,
  });

  await execFileAsync('git', ['init'], { cwd: directory });
}

Critical: Use console.error() in tests (not logger - may not show)

Run and capture:

npm test 2>&1 | grep 'DEBUG git init'

Analyze stack traces:

  • Look for test file names
  • Find line number triggering call
  • Identify pattern (same test? same parameter?)
Finding Which Test Causes Pollution

If something appears during tests but don't know which test:

Use bisection script: scripts/find-polluter.sh

./scripts/find-polluter.sh '.git' 'src/**/*.test.ts'

Runs tests one-by-one, stops at first polluter.

Key Principle

NEVER fix just where error appears. Trace back to find original trigger.

When found immediate cause:

  • Can trace one level up? → Trace backwards
  • Is this the source? → Fix at source
  • Then add validation at each layer (see Defense-in-Depth section)
Real Example

Symptom: .git created in packages/core/ (source code)

Trace chain:

  1. git init runs in process.cwd() ← empty cwd parameter
  2. WorktreeManager called with empty projectDir
  3. Session.create() passed empty string
  4. Test accessed context.tempDir before beforeEach
  5. setupCoreTest() returns {tempDir: ''} initially

Root cause: Top-level variable initialization accessing empty value

Fix: Made tempDir a getter that throws if accessed before beforeEach

Also added defense-in-depth:

  • Layer 1: Project.create() validates directory
  • Layer 2: WorkspaceManager validates not empty
  • Layer 3: NODE_ENV guard refuses git init outside tmpdir
  • Layer 4: Stack trace logging before git init

3. Defense-in-Depth Validation

Validate at every layer data passes through to make bugs impossible.

Core Principle

Validate at EVERY layer data passes through. Make bug structurally impossible.

When fix bug caused by invalid data, adding validation at one place feels sufficient. But single check can be bypassed by different code paths, refactoring, or mocks.

Why Multiple Layers

Single validation: "We fixed bug" Multiple layers: "We made bug impossible"

Different layers catch different cases:

  • Entry validation catches most bugs
  • Business logic catches edge cases
  • Environment guards prevent context-specific dangers
  • Debug logging helps when other layers fail
The Four Layers
Layer 1: Entry Point Validation

Purpose: Reject obviously invalid input at API boundary

function createProject(name: string, workingDirectory: string) {
  if (!workingDirectory || workingDirectory.trim() === '') {
    throw new Error('workingDirectory cannot be empty');
  }
  if (!existsSync(workingDirectory)) {
    throw new Error(`workingDirectory does not exist: ${workingDirectory}`);
  }
  if (!statSync(workingDirectory).isDirectory()) {
    throw new Error(`workingDirectory is not a directory: ${workingDirectory}`);
  }
  // proceed
}
Layer 2: Business Logic Validation

Purpose: Ensure data makes sense for this operation

function initializeWorkspace(projectDir: string, sessionId: string) {
  if (!projectDir) {
    throw new Error('projectDir required for workspace initialization');
  }
  // proceed
}
Layer 3: Environment Guards

Purpose: Prevent dangerous operations in specific contexts

async function gitInit(directory: string) {
  // In tests, refuse git init outside temp directories
  if (process.env.NODE_ENV === 'test') {
    const normalized = normalize(resolve(directory));
    const tmpDir = normalize(resolve(tmpdir()));

    if (!normalized.startsWith(tmpDir)) {
      throw new Error(
        `Refusing git init outside temp dir during tests: ${directory}`
      );
    }
  }
  // proceed
}
Layer 4: Debug Instrumentation

Purpose: Capture context for forensics

async function gitInit(directory: string) {
  const stack = new Error().stack;
  logger.debug('About to git init', {
    directory,
    cwd: process.cwd(),
    stack,
  });
  // proceed
}
Applying the Pattern

When find bug:

  1. Trace data flow - Where does bad value originate? Where used?
  2. Map all checkpoints - List every point data passes through
  3. Add validation at each layer - Entry, business, environment, debug
  4. Test each layer - Try to bypass layer 1, verify layer 2 catches it
Example from Real Session

Bug: Empty projectDir caused git init in source code

Data flow:

  1. Test setup → empty string
  2. Project.create(name, '')
  3. WorkspaceManager.createWorkspace('')
  4. git init runs in process.cwd()

Four layers added:

  • Layer 1: Project.create() validates not empty/exists/writable
  • Layer 2: WorkspaceManager validates projectDir not empty
  • Layer 3: WorktreeManager refuses git init outside tmpdir in tests
  • Layer 4: Stack trace logging before git init

Result: All 1847 tests passed, bug impossible to reproduce

Key Insight

All four layers were necessary. During testing, each layer caught bugs others missed:

  • Different code paths bypassed entry validation
  • Mocks bypassed business logic checks
  • Edge cases on different platforms needed environment guards
  • Debug logging identified structural misuse

Don't stop at one validation point. Add checks at every layer.


4. Verification Before Completion

Run verification commands and confirm output before claiming success.

Core Principle

Evidence before claims, always.

Claiming work complete without verification is dishonesty, not efficiency.

The Iron Law
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE

If haven't run verification command in this message, cannot claim it passes.

The Gate Function
BEFORE claiming any status or expressing satisfaction:

1. IDENTIFY: What command proves this claim?
2. RUN: Execute FULL command (fresh, complete)
3. READ: Full output, check exit code, count failures
4. VERIFY: Does output confirm claim?
   - If NO: State actual status with evidence
   - If YES: State claim WITH evidence
5. ONLY THEN: Make claim

Skip any step = lying, not verifying
Common Failures
ClaimRequiresNot Sufficient
Tests passTest command output: 0 failuresPrevious run, "should pass"
Linter cleanLinter output: 0 errorsPartial check, extrapolation
Build succeedsBuild command: exit 0Linter passing, logs look good
Bug fixedTest original symptom: passesCode changed, assumed fixed
Regression test worksRed-green cycle verifiedTest passes once
Agent completedVCS diff shows changesAgent reports "success"
Requirements metLine-by-line checklistTests passing
Red Flags - STOP
  • Using "should", "probably", "seems to"
  • Expressing satisfaction before verification ("Great!", "Perfect!", "Done!")
  • About to commit/push/PR without verification
  • Trusting agent success reports
  • Relying on partial verification
  • Thinking "just this once"
  • Tired and wanting work over
  • ANY wording implying success without having run verification
Rationalization Prevention
ExcuseReality
"Should work now"RUN verification
"I'm confident"Confidence ≠ evidence
"Just this once"No exceptions
"Linter passed"Linter ≠ compiler
"Agent said success"Verify independently
"Partial check is enough"Partial proves nothing
Key Patterns

Tests:

✅ [Run test command] [See: 34/34 pass] "All tests pass"
❌ "Should pass now" / "Looks correct"

Regression tests (TDD Red-Green):

✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
❌ "I've written regression test" (without red-green verification)

Build:

✅ [Run build] [See: exit 0] "Build passes"
❌ "Linter passed" (linter doesn't check compilation)

Requirements:

✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
❌ "Tests pass, phase complete"

Agent delegation:

✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
❌ Trust agent report
When To Apply

ALWAYS before:

  • ANY variation of success/completion claims
  • ANY expression of satisfaction
  • ANY positive statement about work state
  • Committing, PR creation, task completion
  • Moving to next task
  • Delegating to agents

Rule applies to:

  • Exact phrases
  • Paraphrases and synonyms
  • Implications of success
  • ANY communication suggesting completion/correctness
The Bottom Line

No shortcuts for verification.

Run command. Read output. THEN claim result.

Non-negotiable.


5. EasyPlatform-Specific Debugging

Platform-specific debugging patterns for the Easy.Platform.NET 9 + Angular 19 monorepo.

Platform Error Patterns
Backend (.NET/C#)
Error TypeSourceInvestigation
PlatformValidationResult.Invalid()Validation layerCheck .And() chain, find failing condition
PlatformExceptionBusiness logicRead exception message, trace to handler
EnsureFound() failuresRepository callsVerify entity exists, check query predicates
EnsureValidAsync() failuresEntity validationCheck entity's ValidateAsync() method
Frontend (Angular)
Error TypeSourceInvestigation
observerLoadingErrorStateAPI callsCheck network tab, verify endpoint
Signal update errorsStore stateVerify store initialization order
Form validationReactive formsCheck initialFormConfig validators
Missing untilDestroyed()SubscriptionsMemory leak - add cleanup operator
Common Bug Categories
Backend
  1. Validation Failures

- Missing .And() in validation chain - Async validation not awaited - Wrong entity expression filter

  1. Repository Issues

- Using wrong repository type - Missing loadRelatedEntities parameter - N+1 query patterns

  1. Event Handler Problems

- Handler not registered - HandleWhen returning false - Missing await in async handler

  1. Message Bus

- Consumer not receiving messages - Serialization issues with message payload - Missing TryWaitUntilAsync for dependencies

Frontend
  1. Component Lifecycle

- Missing super.ngOnInit() call - Store not provided in component - Missing untilDestroyed() cleanup

  1. State Management

- Stale VM state after navigation - Race conditions in effectSimple - Missing observerLoadingErrorState key

  1. Form Issues

- initialFormConfig not returning controls - Async validators not checking isViewMode - Missing dependentValidations

Investigation Workflow
Step 1: Identify Layer
Error location?
├── Controller → Check authorization, request binding
├── Command Handler → Check validation, business logic
├── Repository → Check query, entity state
├── Entity Event → Check HandleWhen, async operations
├── Message Consumer → Check message format, dependencies
├── Angular Component → Check store, subscriptions
├── Angular Service → Check API URL, request format
└── Angular Store → Check state updates, effects
Step 2: Platform-Specific Checks

Backend checklist:

  • Is the correct repository type used? (IPlatformQueryableRootRepository)
  • Is validation using PlatformValidationResult fluent API?
  • Are side effects in entity event handlers (not command handlers)?
  • Is message bus used for cross-service communication?

Frontend checklist:

  • Does component extend correct base class?
  • Is store provided in component decorator?
  • Are subscriptions cleaned up with untilDestroyed()?
  • Is observerLoadingErrorState used for API calls?
Step 3: Find Working Example

Search codebase for similar working patterns:

# Find similar command handlers
grep -r "PlatformCqrsCommandApplicationHandler" src/Backend/

# Find similar entity events
grep -r "PlatformCqrsEntityEventApplicationHandler" src/Backend/

# Find similar Angular components
grep -r "AppBaseVmStoreComponent" src/Frontend/
Step 4: Compare Differences

Common differences causing bugs:

  • Missing await keyword
  • Wrong parameter order
  • Missing base class method call
  • Different constructor injection
  • Missing decorator or attribute
Verification Commands
# Backend build
dotnet build EasyPlatform.sln

# Backend tests
dotnet test src/Backend/PlatformExampleApp.TextSnippet.UnitTests/

# Frontend build
cd src/Frontend && nx build playground-text-snippet

# Frontend tests
cd src/Frontend && nx test platform-core

Quick Reference

Bug → Systematic Debugging (Phase 1-4)
  Error deep in stack? → Root Cause Tracing (trace backward)
  Found root cause? → Defense-in-Depth (add layers)
  EasyPlatform issue? → EasyPlatform-Specific (platform patterns)
  About to claim success? → Verification (verify first)

Red Flags

Stop and follow process if thinking:

  • "Quick fix for now, investigate later"
  • "Just try changing X and see if it works"
  • "It's probably X, let me fix that"
  • "Should work now" / "Seems fixed"
  • "Tests pass, we're done"

All mean: Return to systematic process.

Related

  • Follow-up: code-simplifier - Simplify code after debugging
  • Review: code-review - Review fixes before committing
  • Testing: test-specs-docs - Generate tests for the fix
  • Upstream: feature-investigation - General codebase investigation
  • Protocol: .github/AI-DEBUGGING-PROTOCOL.md - Comprehensive debugging protocol

Version History

VersionDateChanges
4.0.02026-01-20Merged tasks-bug-diagnosis, added autonomous mode with --autonomous flag
3.0.02025-12-01Added EasyPlatform-specific debugging, verification protocols
2.0.02025-10-15Added defense-in-depth, root cause tracing
1.0.02025-08-01Initial release with systematic debugging

IMPORTANT Task Planning Notes

  • Always plan and break many small todo tasks
  • Always add a final review todo task to review the works done at the end to find any fix or enhancement needed

平台分布

OpenCode

28.33%
按下载量换算70

Claude Code

22.53%
按下载量换算56

Antigravity

15.45%
按下载量换算38

windsurf

12.81%
按下载量换算32

Codex

7.8%
按下载量换算19

Gemini CLI

3.22%
按下载量换算8

安全审计

暂无安全审计结果可展示。

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

继续浏览同类 Skills