본문으로 건너뛰기
cccskills
무료GitHub에 공개

gap-detection

Detect missing docs, undocumented files, project health issues, and coverage gaps on session start or on-demand. Scans for README gaps, TODO/FIXME counts, and test coverage holes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(10)

  • SKILL.md6.3 KB
  • commands/gap-detection.md1.5 KB
  • hooks/post-execute.cjs1.5 KB
  • hooks/pre-execute.cjs1.7 KB
  • references/research-requirements.md2.0 KB
  • rules/gap-detection.md1.0 KB
  • schemas/input.schema.json1.0 KB
  • schemas/output.schema.json1.6 KB
  • scripts/main.cjs2.6 KB
  • templates/implementation-template.md1009 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Gap Detection

Overview

This skill performs a structured health-check scan on session start (or on-demand) to surface:

  1. Files missing README / documentation headers
  2. Test coverage gaps (source files without corresponding test files)
  3. TODO / FIXME counts and locations
  4. Undocumented public APIs and exports

Use this skill before beginning any significant work in an unfamiliar codebase, or as a recurring quality gate.

When to Use

  • Session start in a new or unfamiliar repository
  • Before planning a feature to understand existing quality debt
  • During code review to identify undocumented additions
  • As part of a proactive-audit pipeline

The Iron Law

NO HEALTH REPORT WITHOUT EVIDENCE — EVERY FINDING MUST CITE FILE AND LINE

Never report a gap without a concrete file path and (when applicable) line number. Vague summaries are not actionable.

Workflow

Step 1: Scan for undocumented source files

Command:

# Find source files without a README at their directory level
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.cjs" -o -name "*.mjs" -o -name "*.py" \) \
  ! -path "*/node_modules/*" ! -path "*/.git/*" ! -path "*/dist/*" ! -path "*/build/*" \
  -print | while read f; do
    dir=$(dirname "$f")
    if [ ! -f "$dir/README.md" ] && [ ! -f "$dir/index.md" ]; then
      echo "NO_README: $f"
    fi
  done | sort -u

Expected output: Lines of form NO_README: ./src/utils/helper.ts

Verify: Exit code 0; non-empty output means gaps exist.

Step 2: Find test coverage gaps

Command:

# Find source files that have no matching test file
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.cjs" \) \
  ! -path "*/node_modules/*" ! -path "*/.git/*" ! -path "*/dist/*" \
  ! -path "*/tests/*" ! -path "*/__tests__/*" ! -path "*.test.*" ! -path "*.spec.*" \
  -print | while read src; do
    base=$(basename "$src" | sed 's/\.[^.]*$//')
    dir=$(dirname "$src")
    if ! find . -path "*/tests/*" -name "${base}.test.*" 2>/dev/null | grep -q .; then
      if ! find . -name "${base}.test.*" 2>/dev/null | grep -q .; then
        echo "NO_TEST: $src"
      fi
    fi
  done

Expected output: Lines of form NO_TEST: ./src/auth/jwt.ts

Verify: Exit code 0; any NO_TEST lines are coverage gaps.

Step 3: Count and locate TODO/FIXME markers

Command:

grep -rn --include="*.ts" --include="*.js" --include="*.cjs" --include="*.mjs" --include="*.py" \
  -E "(TODO|FIXME|HACK|XXX):" \
  --exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist \
  . 2>/dev/null | sort

Expected output: ./src/auth/jwt.ts:42: // TODO: add token rotation

Verify: Total count printed via | wc -l appended to output.

Step 4: Detect undocumented public exports

Command:

# Find exported functions/classes without JSDoc or inline comment above them
grep -rn --include="*.ts" --include="*.js" -E "^export (function|class|const|async function)" \
  --exclude-dir=node_modules --exclude-dir=dist --exclude-dir=.git \
  . 2>/dev/null | while IFS=: read file line content; do
    prevline=$((line - 1))
    comment=$(sed -n "${prevline}p" "$file" 2>/dev/null | grep -E "(/\*|\*/|//)" || true)
    if [ -z "$comment" ]; then
      echo "NO_DOC: $file:$line $content"
    fi
  done

Expected output: NO_DOC: ./src/api/router.ts:15 export function handleRequest

Verify: Exit code 0.

Step 5: Compile health report

After running Steps 1–4, produce a structured report with:

  • Summary table: counts per category (NO_README, NO_TEST, TODO/FIXME, NO_DOC)
  • Top 10 highest-priority gaps (ranked by: public API > module entrypoints > internals)
  • Recommended next actions (e.g., "Add README to src/auth/, add tests for jwt.ts")

Report format:

## Gap Detection Report — {{date}}

| Category   | Count |
| ---------- | ----- |
| NO_README  | {{n}} |
| NO_TEST    | {{n}} |
| TODO/FIXME | {{n}} |
| NO_DOC     | {{n}} |

### Priority Gaps

1. {{file:line}} — {{reason}}
   ...

### Recommended Actions

- [ ] {{action}}
      ...

Verify: Report written to .claude/context/tmp/gap-detection-report-{{date}}.md.

Enforcement Hooks

Input validated against schemas/input.schema.json before execution. Output contract defined in schemas/output.schema.json.

Memory Protocol

Before starting:

Read .claude/context/memory/learnings.md for prior gap scans and known chronic issues.

After completing:

  • Append gap summary to .claude/context/memory/learnings.md with date and repo path
  • If critical gaps found (0% test coverage on a module, zero README in public API dir), append to .claude/context/memory/issues.md

Anti-Patterns

  • Never report "no gaps found" without actually running the scan commands
  • Never produce a gap report without file paths — vague summaries are unusable
  • Never suppress TODO/FIXME output — they represent deferred debt
  • Never run on node_modules/, dist/, .git/ directories

Related Skills

  • proactive-audit — broader audit including hook syntax and agent consistency
  • tdd — use after gap-detection to address test coverage gaps
  • debugging — follow-up for runtime gaps identified during scan
  • context-compressor — compress large gap reports before handing off

Assigned Agents

  • developer (primary — runs on feature work)
  • qa (primary — runs before test strategy)
  • architect (supporting — runs before architecture reviews)
  • planner (supporting — runs before planning sessions)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oimiragieo/agent-studio422026년 7월 14일 업데이트

oimiragieo의 스킬 모두 보기

이 스킬의 문제 신고