Communitygithub.com

repo-scan

Puntero de arranque que instala la habilidad externa repo-scan desde un commit fijo y revisable. Úselo cuando repo-scan deba instalarse antes de ejecutar su auditoría de activos de código fuente entre pilas; este puntero ECC no realiza la auditoría en sí.

¿Qué es repo-scan?

repo-scan es una habilidad especializada para Claude Code (y otros agentes compatibles) que realiza auditorías de activos de código fuente en múltiples pilas tecnológicas, incluyendo C/C++, Android (Java), iOS (Objective-C/Swift) y Web (TypeScript/JavaScript/Vue). Su utilidad principal es proporcionar una visión estructural de un repositorio, clasificando cada archivo como código propio, terceros o artefacto de construcción, detectando más de 50 bibliotecas conocidas con extracción de versiones. El análisis produce cuatro niveles de veredicto (Activo Principal / Extraer y Fusionar / Reconstruir / Retirar) y genera informes HTML interactivos con navegación jerárquica, ideal para auditorías de deuda técnica, reorganización de monorepositorios y revisiones de dependencias incrustadas que no se declaran en gestores de paquetes. La instalación se realiza mediante un script de arranque que clona un commit fijo, solicita confirmación del usuario antes de completar la instalación, y maneja bloqueos y retrocesos atómicos para garantizar la integridad.

Compatible con✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/repo-scan

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

¿Qué hace repo-scan?

Cada ecosistema tiene su propio gestor de dependencias, pero ninguna herramienta analiza C++, Android, iOS y Web para decirte: cuánto código es realmente tuyo, qué es de terceros y qué es peso muerto.

Cuándo Usarlo

  • Al asumir una base de código grande y heredada, necesitando una visión estructural general.
  • Antes de una reestructuración mayor — identificar qué es núcleo, qué está duplicado, qué está obsoleto.
  • Auditar dependencias de terceros incrustadas directamente en el código fuente (no declaradas en gestores de paquetes).
  • Preparar registros de decisiones de arquitectura para la reorganización de un monorepositorio.

Instalación

# Clone primero para que el commit fijo pueda revisarse antes de la instalación
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 'No se pudo liberar el bloqueo de instalación en %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 'La recuperación de conflicto de movimiento falló; los datos preparados permanecen en %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 aprobar la instalación.
printf 'Escriba install para reemplazar %s después de revisar el código fuente fijo: ' \
  "$REPO_SCAN_INSTALL_DIR" >&2
read -r REPO_SCAN_CONFIRM
if [ "$REPO_SCAN_CONFIRM" != install ]; then
  printf 'Instalación cancelada.\n' >&2
  exit 1
fi
if ! mkdir -- "$REPO_SCAN_LOCK" 2>/dev/null; then
  printf 'Otra instalación de repo-scan tiene el bloqueo en %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 'El reemplazo falló y el destino fue recreado; la instalación anterior se conserva en %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 'El reemplazo y la reversión fallaron; la instalación anterior se conserva en %s\n' \
        "$REPO_SCAN_BACKUP" >&2
    fi
  fi
  exit 1
fi

Revise el código fuente antes de instalar cualquier habilidad de agente.

La instalación completa solo el arranque. Recargue su entorno de agente y luego invoque repo-scan nuevamente. Este puntero ECC instala la habilidad externa pero no ejecuta un análisis en sí.

Capacidades Principales

CapacidadDescripción
Análisis entre pilasC/C++, Java/Android, iOS (OC/Swift), Web (TS/JS/Vue) en una sola pasada
Clasificación de archivosCada archivo etiquetado como código propio, de terceros o artefacto de construcción
Detección de bibliotecasMás de 50 bibliotecas conocidas (FFmpeg, Boost, OpenSSL…) con extracción de versiones
Veredictos de cuatro nivelesActivo Principal / Extraer y Fusionar / Reconstruir / Retirar
Informes HTMLPáginas interactivas con tema oscuro y navegación jerárquica
Soporte para monoreposAnálisis jerárquico con informes de resumen y subproyectos

Niveles de Profundidad de Análisis

NivelArchivos LeídosCaso de Uso
fast1-2 por móduloInventario rápido de directorios enormes
standard2-5 por móduloAuditoría predeterminada con verificaciones completas de dependencias y arquitectura
deep5-10 por móduloAgrega seguridad de hilos, gestión de memoria y consistencia de API
fullTodos los archivosRevisión exhaustiva previa a la fusión

Cómo Funciona

  1. Clasificar la superficie del repositorio: enumerar archivos y etiquetar cada uno como código propio, código de terceros incrustado o artefacto de construcción.
  2. Detectar bibliotecas incrustadas: inspeccionar nombres de directorios, encabezados, archivos de licencia y marcadores de versión para identificar dependencias incluidas y sus versiones probables.
  3. Puntuar cada módulo: agrupar archivos por módulo o subsistema, luego asignar uno de los cuatro veredictos basado en propiedad, duplicación y costo de mantenimiento.
  4. Resaltar riesgos estructurales: señalar artefactos de peso muerto, envoltorios duplicados, código obsoleto de proveedores y módulos que deberían extraerse, reconstruirse o retirarse.
  5. Producir el informe: devolver un resumen conciso más la salida HTML interactiva con desglose por módulo para que la auditoría pueda revisarse de forma asíncrona.

Ejemplos

En un monorepositorio C++ de 50.000 archivos:

  • Encontró FFmpeg 2.x (versión 2015) todavía en producción
  • Descubrió el mismo envoltorio de SDK duplicado 3 veces
  • Identificó 636 MB de artefactos de construcción cometidos (Debug/ipch/obj)
  • Clasificó: 3 MB de código propio frente a 596 MB de terceros

Mejores Prácticas

  • Comience con profundidad standard para auditorías iniciales
  • Use fast para monorepos con 100+ módulos para obtener un inventario rápido
  • Ejecute deep incrementalmente en módulos marcados para refactorización
  • Revise el análisis entre módulos para detección de duplicados en subproyectos

Enlaces

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/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

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.

Skills relacionados