Communitygithub.com

에이전트 자기성찰 디버깅

에이전트 실행 실패 시 캡처, 진단, 제한적 복구 및 자기성찰 보고서를 사용하는 구조화된 셀프 디버깅 워크플로입니다. 재시도 대신 재현 가능한 진단이 필요할 때 사용하세요.

에이전트 자기성찰 디버깅란 무엇인가요?

이 스킬은 AI 에이전트가 반복적인 실패, 무한 루프, 컨텍스트 오버플로우 또는 환경 불일치에 직면했을 때 체계적으로 자가 진단하고 복구할 수 있도록 설계된 워크플로입니다. 단순한 재시도와 달리, 실패 상태를 정밀하게 캡처하고 알려진 패턴과 매칭하여 근본 원인을 찾은 후 최소한의 조치로 복구합니다. 마지막으로 구조화된 보고서를 생성하여 다음 에이전트나 인간이 상황을 이해하고 후속 조치를 취할 수 있도록 합니다. Claude Code, Cursor, Codex 등 다양한 AI 에이전트 플랫폼에서 사용할 수 있으며, 특히 토큰 낭비가 심하거나 반복 오류가 발생하는 시나리오에서 유용합니다. 이 스킬은 에이전트가 '그냥 다시 시도'하는 대신 '왜 실패했는지'를 이해하고 문서화하도록 가르쳐, 장기적인 안정성과 디버깅 효율성을 크게 향상시킵니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/agent-introspection-debugging

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

에이전트 자기성찰 디버깅은(는) 무엇을 하나요?

에이전트 실행이 반복적으로 실패하거나, 진전 없이 토큰을 소모하거나, 동일한 도구에서 루프에 갇히거나, 원래 작업에서 벗어날 때 이 스킬을 사용하세요.

이 스킬은 워크플로 스킬이지 숨겨진 런타임이 아닙니다. 에이전트가 인간에게 에스컬레이션하기 전에 체계적으로 스스로를 디버깅하도록 가르칩니다.

활성화 시점

  • 최대 도구 호출 / 루프 제한 실패
  • 진전 없이 반복적인 재시도
  • 출력 품질을 저하시키기 시작하는 컨텍스트 증가 또는 프롬프트 드리프트
  • 기대와 현실 간의 파일 시스템 또는 환경 상태 불일치
  • 진단과 소규모 시정 조치로 복구 가능할 것으로 보이는 도구 실패

범위 경계

이 스킬을 다음에 활성화하세요:

  • 재시도 전에 실패 상태 캡처
  • 일반적인 에이전트별 실패 패턴 진단
  • 제한된 복구 조치 적용
  • 구조화된 사람이 읽을 수 있는 디버그 보고서 생성

이 스킬을 다음의 주요 소스로 사용하지 마세요:

  • 코드 변경 후 기능 검증: verification-loop 사용
  • 더 좁은 ECC 스킬이 이미 존재하는 프레임워크별 디버깅
  • 현재 환경이 자동으로 강제할 수 없는 런타임 약속

4단계 루프

1단계: 실패 캡처

복구를 시도하기 전에 실패를 정확하게 기록하세요.

캡처할 내용:

  • 오류 유형, 메시지 및 가능한 경우 스택 추적
  • 마지막 의미 있는 도구 호출 시퀀스
  • 에이전트가 수행하려던 작업
  • 현재 컨텍스트 압력: 반복되는 프롬프트, 지나치게 큰 붙여넣은 로그, 중복된 계획, 통제 불능의 메모
  • 현재 환경 가정: cwd, 브랜치, 관련 서비스 상태, 예상 파일

최소 캡처 템플릿:

## 실패 캡처
- 세션 / 작업:
- 진행 중인 목표:
- 오류:
- 마지막 성공 단계:
- 마지막 실패 도구 / 명령어:
- 관찰된 반복 패턴:
- 확인할 환경 가정:

2단계: 근본 원인 진단

무엇이든 변경하기 전에 실패를 알려진 패턴과 일치시키세요.

패턴가능한 원인확인 방법
최대 도구 호출 / 동일 명령어 반복루프 또는 종료되지 않는 관찰자 경로마지막 N개 도구 호출에서 반복 여부 검사
컨텍스트 오버플로 / 저하된 추론제한 없는 메모, 반복된 계획, 지나치게 큰 로그최근 컨텍스트에서 중복 및 신호가 낮은 대량 데이터 검사
ECONNREFUSED / 시간 초과서비스 사용 불가 또는 잘못된 포트서비스 상태, URL 및 포트 가정 확인
429 / 할당량 소진재시도 폭주 또는 백오프 누락반복 호출 횟수 계산 및 재시도 간격 검사
쓰기 후 파일 누락 / 오래된 diff경쟁 조건, 잘못된 cwd 또는 브랜치 드리프트경로, cwd, git 상태 및 실제 파일 존재 여부 재확인

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

api-connector-builder

Build a new API connector or provider by matching the target repo

관련 스킬