Communitygithub.com

repo-scan

Ponteiro de inicialização que instala a skill externa repo-scan a partir de um commit fixo e revisável. Use quando o repo-scan precisar ser instalado antes de executar sua auditoria de ativos de código-fonte em múltiplas pilhas; este ponteiro ECC não realiza a auditoria em si.

O que é repo-scan?

O repo-scan é uma skill para agentes de IA (como Claude Code, Cursor ou Codex) que realiza uma auditoria abrangente de ativos de código-fonte em múltiplas pilhas tecnológicas. Ela analisa projetos C/C++, Android, iOS e Web em uma única execução, classificando cada arquivo como código próprio, de terceiros ou artefato de build. A skill detecta mais de 50 bibliotecas conhecidas (como FFmpeg, Boost, OpenSSL) com extração de versão, e atribui vereditos de quatro níveis: Ativo Principal, Extrair e Mesclar, Reconstruir ou Depreciar. O resultado é um relatório HTML interativo com tema escuro, permitindo navegação detalhada por módulo. Ideal para revisão de grandes bases legadas, pré-refatorações, auditorias de dependências terceirizadas embutidas diretamente no código (não declaradas em gerenciadores de pacotes) e preparação de registros de decisão de arquitetura para reorganização de monorepos. Suporta níveis de profundidade de análise (rápido, padrão, profundo, completo) e oferece escaneamento hierárquico para monorepos.

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

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

O que repo-scan faz?

Cada ecossistema tem seu próprio gerenciador de dependências, mas nenhuma ferramenta analisa C++, Android, iOS e Web para te dizer: quanto código é realmente seu, o que é de terceiros e o que é peso morto.

Quando Usar

  • Ao assumir uma grande base de código legada e precisar de uma visão estrutural
  • Antes de uma grande refatoração — identificar o que é central, o que está duplicado, o que está morto
  • Auditando dependências de terceiros embutidas diretamente no código (não declaradas em gerenciadores de pacotes)
  • Preparando registros de decisão de arquitetura para reorganização de monorepo

Instalação

# Clone primeiro para que o commit fixo possa ser revisado antes da instalação
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"

# Revise "$REPO_SCAN_TMP/source" antes de aprovar a instalação.
printf 'Type install to replace %s after reviewing the pinned source: ' \
  "$REPO_SCAN_INSTALL_DIR" >&2
read -r REPO_SCAN_CONFIRM
if [ "$REPO_SCAN_CONFIRM" != install ]; then
  printf 'Installation cancelled.\n' >&2
  exit 1
fi
if ! mkdir -- "$REPO_SCAN_LOCK" 2>/dev/null; then
  printf 'Another repo-scan installation holds the lock at %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 'Replacement failed and target was recreated; previous installation preserved at %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 'Replacement and rollback failed; previous installation preserved at %s\n' \
        "$REPO_SCAN_BACKUP" >&2
    fi
  fi
  exit 1
fi

Revise o código-fonte antes de instalar qualquer skill de agente.

A instalação conclui apenas a inicialização. Recarregue seu harness de agente e invoque repo-scan novamente. Este ponteiro ECC instala a skill externa, mas não executa uma varredura em si.

Capacidades Principais

CapacidadeDescrição
Varredura multiplataformaC/C++, Java/Android, iOS (OC/Swift), Web (TS/JS/Vue) em uma única passada
Classificação de arquivosCada arquivo marcado como código do projeto, de terceiros ou artefato de build
Detecção de bibliotecasMais de 50 bibliotecas conhecidas (FFmpeg, Boost, OpenSSL…) com extração de versão
Vereditos em quatro níveisAtivo Principal / Extrair e Mesclar / Reconstruir / Depreciar
Relatórios HTMLPáginas interativas com tema escuro e navegação detalhada
Suporte a monorepoVarredura hierárquica com relatórios resumidos e por subprojeto

Níveis de Profundidade de Análise

NívelArquivos LidosCaso de Uso
fast1-2 por móduloInventário rápido de diretórios enormes
standard2-5 por móduloAuditoria padrão com verificações completas de dependências + arquitetura
deep5-10 por móduloAdiciona segurança de thread, gerenciamento de memória, consistência de API
fullTodos os arquivosRevisão abrangente pré-merge

Como Funciona

  1. Classifique a superfície do repositório: enumere arquivos, depois marque cada um como código do projeto, código de terceiros embutido ou artefato de build.
  2. Detecte bibliotecas embutidas: inspecione nomes de diretórios, cabeçalhos, arquivos de licença e marcadores de versão para identificar dependências empacotadas e versões prováveis.
  3. Pontue cada módulo: agrupe arquivos por módulo ou subsistema e atribua um dos quatro vereditos com base em propriedade, duplicação e custo de manutenção.
  4. Destaque riscos estruturais: aponte artefatos de peso morto, wrappers duplicados, código vendado desatualizado e módulos que devem ser extraídos, reconstruídos ou depreciados.
  5. Produza o relatório: retorne um resumo conciso mais a saída HTML interativa com detalhamento por módulo para que a auditoria possa ser revisada de forma assíncrona.

Exemplos

Em um monorepo C++ com 50.000 arquivos:

  • Encontrou FFmpeg 2.x (vintage 2015) ainda em produção
  • Descobriu o mesmo wrapper de SDK duplicado 3 vezes
  • Identificou 636 MB de artefatos de build Debug/ipch/obj commitados
  • Classificou: 3 MB de código do projeto contra 596 MB de terceiros

Melhores Práticas

  • Comece com profundidade standard para auditorias iniciais
  • Use fast para monorepos com 100+ módulos para obter um inventário rápido
  • Execute deep incrementalmente em módulos sinalizados para refatoração
  • Revise a análise entre módulos para detecção de duplicatas entre subprojetos

Links

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.

Habilidades Relacionadas