Communitygithub.com

repo-scan

고정된 리뷰 가능한 커밋에서 외부 repo-scan 스킬을 설치하는 부트스트랩 포인터입니다. 크로스 스택 소스 코드 자산 감사를 실행하기 전에 repo-scan을 설치해야 할 때 사용합니다. 이 ECC 포인터는 감사 자체를 수행하지 않습니다.

repo-scan란 무엇인가요?

이 스킬은 `repo-scan`이라는 외부 AI 에이전트 스킬을 설치하기 위한 부트스트랩 포인터입니다. 사용자는 고정된 커밋(`2742664ebcad1450c208eda0ae45d3c17fad5dd8`)에서 소스 코드를 리뷰한 후 설치를 승인해야 하므로 보안과 투명성을 보장합니다. 설치가 완료되면 에이전트는 C/C++, Java/Android, iOS(Objective-C/Swift), 웹(TypeScript/JavaScript/Vue) 등 여러 기술 스택의 소스 코드를 한 번에 스캔하여 프로젝트 코드, 서드파티 코드, 빌드 아티팩트를 분류합니다. 또한 50개 이상의 알려진 라이브러리(예: FFmpeg, Boost, OpenSSL)를 탐지하고 버전을 추출하며, 각 모듈에 대해 '핵심 자산', '추출 및 병합', '재빌드', '폐기' 등 네 가지 평가를 제공합니다. 결과는 대화형 HTML 보고서로 제공되어 비동기적으로 리뷰할 수 있으며, 모노레포 구조를 지원하여 계층적 스캔과 요약 보고서를 생성합니다. 이 포인터는 설치만 담당하며, 실제 스캔을 실행하려면 에이전트를 다시 로드한 후 `repo-scan` 명령을 별도로 호출해야 합니다.

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

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

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

문서

repo-scan은(는) 무엇을 하나요?

모든 생태계에는 자체 의존성 관리자가 있지만, C++, Android, iOS, 웹을 모두 살펴보며 "얼마나 많은 코드가 실제로 당신의 코드인지, 무엇이 서드파티인지, 무엇이 데드 코드인지"를 알려주는 도구는 없었습니다.

사용 시점

  • 대규모 레거시 코드베이스를 인수받아 구조적 개요가 필요할 때
  • 주요 리팩터링 전 – 핵심 코드, 중복 코드, 데드 코드 식별
  • 패키지 관리자에 선언되지 않고 소스에 직접 포함된 서드파티 의존성 감사
  • 모노레포 재구성을 위한 아키텍처 결정 기록(ADR) 준비

설치

# 고정된 커밋을 설치 전에 리뷰할 수 있도록 먼저 클론
set -euo pipefail

REPO_SCAN_COMMIT=2742664ebcad1450c208eda0ae45d3c17fad5dd8
REPO_SCAN_INSTALL_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/skills/repo-scan"
REPO_SCAN_INSTALL_PARENT="$(dirname "$REPO_SCAN_INSTALL_DIR")"
mkdir -p "$REPO_SCAN_INSTALL_PARENT"
REPO_SCAN_TMP="$(mktemp -d "$REPO_SCAN_INSTALL_PARENT/.repo-scan-install.XXXXXX")"
REPO_SCAN_TOKEN="${REPO_SCAN_TMP##*.}"
REPO_SCAN_STAGE="$REPO_SCAN_TMP/stage-$REPO_SCAN_TOKEN"
REPO_SCAN_BACKUP="$REPO_SCAN_TMP/backup-$REPO_SCAN_TOKEN"
REPO_SCAN_LOCK="$REPO_SCAN_INSTALL_PARENT/.repo-scan-install.lock"
REPO_SCAN_KEEP_TMP=0
REPO_SCAN_LOCK_HELD=0
REPO_SCAN_MV_HAS_NO_TARGET=0
cleanup_repo_scan_install() {
  if [ "$REPO_SCAN_KEEP_TMP" -eq 0 ]; then
    rm -rf -- "$REPO_SCAN_TMP"
  fi
  if [ "$REPO_SCAN_LOCK_HELD" -eq 1 ] && ! rmdir -- "$REPO_SCAN_LOCK"; then
    printf 'Could not release installation lock at %s\n' "$REPO_SCAN_LOCK" >&2
  fi
}
trap cleanup_repo_scan_install EXIT
mkdir "$REPO_SCAN_TMP/mv-probe-source"
if mv -T -- "$REPO_SCAN_TMP/mv-probe-source" \
  "$REPO_SCAN_TMP/mv-probe-destination" 2>/dev/null; then
  REPO_SCAN_MV_HAS_NO_TARGET=1
  rmdir "$REPO_SCAN_TMP/mv-probe-destination"
else
  rmdir "$REPO_SCAN_TMP/mv-probe-source"
fi
move_repo_scan_dir() {
  REPO_SCAN_MOVE_SOURCE=$1
  REPO_SCAN_MOVE_DESTINATION=$2
  REPO_SCAN_MOVE_NAME=${REPO_SCAN_MOVE_SOURCE##*/}
  if [ -e "$REPO_SCAN_MOVE_DESTINATION" ] || [ -L "$REPO_SCAN_MOVE_DESTINATION" ]; then
    return 1
  fi
  if [ "$REPO_SCAN_MV_HAS_NO_TARGET" -eq 1 ]; then
    mv -T -- "$REPO_SCAN_MOVE_SOURCE" "$REPO_SCAN_MOVE_DESTINATION"
    return
  fi
  if ! mv -- "$REPO_SCAN_MOVE_SOURCE" "$REPO_SCAN_MOVE_DESTINATION"; then
    return 1
  fi
  if [ -e "$REPO_SCAN_MOVE_DESTINATION/$REPO_SCAN_MOVE_NAME" ] || \
    [ -L "$REPO_SCAN_MOVE_DESTINATION/$REPO_SCAN_MOVE_NAME" ]; then
    if ! mv -- "$REPO_SCAN_MOVE_DESTINATION/$REPO_SCAN_MOVE_NAME" \
      "$REPO_SCAN_MOVE_SOURCE"; then
      REPO_SCAN_KEEP_TMP=1
      printf 'Move conflict recovery failed; staged data remains at %s\n' \
        "$REPO_SCAN_MOVE_DESTINATION/$REPO_SCAN_MOVE_NAME" >&2
    fi
    return 1
  fi
}

git clone --filter=blob:none --no-checkout \
  https://github.com/haibindev/repo-scan.git "$REPO_SCAN_TMP/source"
git -C "$REPO_SCAN_TMP/source" checkout --detach "$REPO_SCAN_COMMIT"
mkdir -p "$REPO_SCAN_STAGE"
git -C "$REPO_SCAN_TMP/source" archive "$REPO_SCAN_COMMIT" | \
  tar -xf - -C "$REPO_SCAN_STAGE"

# "$REPO_SCAN_TMP/source"를 리뷰한 후 설치 승인.
printf '고정된 소스를 리뷰한 후 설치하려면 install을 입력하세요 (대상: %s): ' \
  "$REPO_SCAN_INSTALL_DIR" >&2
read -r REPO_SCAN_CONFIRM
if [ "$REPO_SCAN_CONFIRM" != install ]; then
  printf '설치가 취소되었습니다.\n' >&2
  exit 1
fi
if ! mkdir -- "$REPO_SCAN_LOCK" 2>/dev/null; then
  printf '다른 repo-scan 설치 프로세스가 잠금을 보유하고 있습니다: %s\n' \
    "$REPO_SCAN_LOCK" >&2
  exit 1
fi
REPO_SCAN_LOCK_HELD=1

if [ -e "$REPO_SCAN_INSTALL_DIR" ] || [ -L "$REPO_SCAN_INSTALL_DIR" ]; then
  move_repo_scan_dir "$REPO_SCAN_INSTALL_DIR" "$REPO_SCAN_BACKUP"
fi
if ! move_repo_scan_dir "$REPO_SCAN_STAGE" "$REPO_SCAN_INSTALL_DIR"; then
  if [ -e "$REPO_SCAN_BACKUP" ] || [ -L "$REPO_SCAN_BACKUP" ]; then
    if [ -e "$REPO_SCAN_INSTALL_DIR" ] || [ -L "$REPO_SCAN_INSTALL_DIR" ]; then
      REPO_SCAN_KEEP_TMP=1
      printf '교체 실패 및 대상이 다시 생성됨; 이전 설치는 %s에 보존됨\n' \
        "$REPO_SCAN_BACKUP" >&2
    elif ! move_repo_scan_dir "$REPO_SCAN_BACKUP" "$REPO_SCAN_INSTALL_DIR"; then
      REPO_SCAN_KEEP_TMP=1
      printf '교체 및 롤백 실패; 이전 설치는 %s에 보존됨\n' \
        "$REPO_SCAN_BACKUP" >&2
    fi
  fi
  exit 1
fi

에이전트 스킬을 설치하기 전에 항상 소스를 리뷰하세요.

설치는 부트스트랩만 완료합니다. 에이전트 하니스를 다시 로드한 후 repo-scan을 다시 호출하세요. 이 ECC 포인터는 외부 스킬을 설치하지만 자체적으로 스캔을 실행하지는 않습니다.

핵심 기능

기능설명
크로스 스택 스캔C/C++, Java/Android, iOS (OC/Swift), 웹 (TS/JS/Vue)를 한 번에 처리
파일 분류모든 파일을 프로젝트 코드, 서드파티 코드, 빌드 아티팩트로 태그 지정
라이브러리 탐지50개 이상의 알려진 라이브러리(FFmpeg, Boost, OpenSSL…)와 버전 추출
4단계 평가핵심 자산 / 추출 및 병합 / 재빌드 / 폐기
HTML 보고서드릴다운 탐색이 가능한 대화형 다크 테마 페이지
모노레포 지원요약 + 하위 프로젝트 보고서가 포함된 계층적 스캔

분석 심도 수준

수준읽는 파일 수사용 사례
fast모듈당 1-2개대규모 디렉토리의 빠른 인벤토리
standard모듈당 2-5개전체 의존성 + 아키텍처 검사가 포함된 기본 감사
deep모듈당 5-10개스레드 안전성, 메모리 관리, API 일관성 추가 검사
full모든 파일병합 전 포괄적 리뷰

작동 방식

  1. 저장소 표면 분류: 파일을 열거한 후 각각을 프로젝트 코드, 포함된 서드파티 코드, 또는 빌드 아티팩트로 태그 지정합니다.
  2. 포함된 라이브러리 탐지: 디렉토리 이름, 헤더, 라이선스 파일, 버전 마커를 검사하여 번들된 의존성과 예상 버전을 식별합니다.
  3. 각 모듈 점수화: 파일을 모듈 또는 하위 시스템별로 그룹화한 후, 소유권, 중복, 유지보수 비용에 따라 네 가지 평가 중 하나를 할당합니다.
  4. 구조적 위험 강조: 데드 웨이트 아티팩트, 중복 래퍼, 오래된 벤더 코드, 추출/재빌드/폐기해야 할 모듈을 지적합니다.
  5. 보고서 생성: 간결한 요약과 함께 모듈별 드릴다운이 가능한 대화형 HTML 출력을 제공하여 감사를 비동기적으로 리뷰할 수 있습니다.

예시

50,000개 파일의 C++ 모노레포에서:

  • FFmpeg 2.x (2015년 버전)가 여전히 프로덕션에 사용 중인 것을 발견
  • 동일한 SDK 래퍼가 3번 중복된 것을 발견
  • 636 MB의 Debug/ipch/obj 빌드 아티팩트가 커밋된 것을 식별
  • 분류 결과: 3 MB 프로젝트 코드 대 596 MB 서드파티 코드

모범 사례

  • 첫 번째 감사는 standard 심도로 시작하세요.
  • 100개 이상의 모듈이 있는 모노레포는 fast를 사용하여 빠른 인벤토리를 만드세요.
  • 리팩터링 대상으로 플래그된 모듈에 대해 deep을 점진적으로 실행하세요.
  • 하위 프로젝트 간 중복 탐지를 위해 교차 모듈 분석을 리뷰하세요.

링크

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-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

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.

관련 스킬