verify-directory-structure-parallel-audit
Qué hace
Esta skill comprueba que las carpetas y los archivos existen y se pueden leer, y después lee grupos de archivos a la vez. Es para personas que auditan una base de código grande y quieren que el trabajo vaya más rápido.
Cuándo usarla
- ✓Cuando falla una operación con archivos y necesitas revisar primero la carpeta.
- ✓Cuando necesitas auditar muchos archivos de código en una sola pasada.
- ✓Cuando quieres revisar los patrones de importación de TypeScript en todo un proyecto.
Link de la skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/verify-directory-structure-parallel-audit/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“¿Puedes revisar las carpetas de mi proyecto y después las importaciones de todos los archivos de código fuente?”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente lista las carpetas, construye una lista de archivos que revisar, los lee por lotes y después revisa los patrones de importación de TypeScript.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Verify Directory Structure — Parallel Audit
This skill provides a systematic approach to diagnosing file access issues and auditing source trees efficiently. It extends basic directory verification with parallel batch file reading (dramatically reducing iteration count when many files must be inspected) and a dedicated TypeScript import validation phase that catches a common class of structural bugs.
Steps
Phase 1 — Directory Verification
Identify Target Paths: Collect every file or directory path involved in the operation. Prefer absolute paths to eliminate ambiguity.
Enumerate with
list_dir: Calllist_diron each relevant directory. Record all file names, sizes, and modification dates. This is your ground truth before touching any file.Verify Existence & Permissions: Confirm the directory exists and that the current user has read (and, if needed, write/execute) permissions. If a directory is missing, create it before proceeding. If permissions are insufficient, adjust them before retrying.
Build a File Manifest: From the
list_diroutput, compile the complete list of files to be audited. Group them logically (e.g., by subdirectory or file type) so they can be read in parallel batches.
Phase 2 — Parallel Batch File Reading
Why this matters: Reading files sequentially costs one iteration per file. Reading them in parallel batches collapses N files into ⌈N/batch_size⌉ iterations — a significant speedup when auditing dozens of files.
Determine Batch Size: Default to reading 5–10 files per batch. Reduce the batch size if individual files are very large; increase it for small config/index files.
Issue Parallel
read_fileCalls: Within each batch, invokeread_filefor all files simultaneously (a single iteration). Do not wait for one file before requesting the next within the same batch.Batch 1 (parallel): read_file(src/components/A.tsx) read_file(src/components/B.tsx) read_file(src/components/C.tsx) read_file(src/components/D.tsx) read_file(src/components/E.tsx) Batch 2 (parallel): read_file(src/components/F.tsx) ...Collect & Triage Results: After each batch completes, scan results for errors (file-not-found, permission denied) and flag them immediately. Do not abort the remaining batches; continue and aggregate all findings.
Re-verify Missing Files: For any file reported as missing, re-run
list_diron its parent directory to confirm whether the file truly does not exist or whether the path was wrong. Correct the path and retry the single file if necessary.
Phase 3 — TypeScript Import Validation
This phase targets a common class of structural bugs found when auditing TypeScript source trees.
Identify Import Statements: For every
.ts/.tsxfile read in Phase 2, extract allimportlines.Classify Import Kind — Value vs. Type:
Pattern Correct usage import Foo from '...'Runtime value (class, function, object) import { Foo } from '...'Runtime value export import type Foo from '...'Type-only import (erased at compile time) import type { Foo } from '...'Type-only named import import { type Foo } from '...'Inline type modifier (TS 4.5+) Flag Value Imports Used Only as Types: If an identifier imported without
typeis used only in type positions (: Foo,as Foo,implements Foo, generic parameters), it should be converted toimport type. This prevents accidental runtime dependencies and satisfiesverbatimModuleSyntax/isolatedModulescompiler flags.// ❌ Before — value import used only as a type import { UserProfile } from './types'; const handler = (u: UserProfile) => { ... }; // ✅ After — type-only import import type { UserProfile } from './types'; const handler = (u: UserProfile) => { ... };Flag Duplicate Imports: Detect cases where the same module is imported more than once in a file (often from copy-paste). Merge them into a single import statement.
// ❌ Duplicate import { A } from './utils'; import { B } from './utils'; // ✅ Merged import { A, B } from './utils';Verify Barrel / Index Exports: When
Preguntas frecuentes
¿Por qué leer los archivos por lotes?
Leer varios archivos a la vez necesita menos pasos que leerlos uno a uno.
¿Qué comprueba en las carpetas?
Comprueba que cada carpeta existe y que el usuario puede leerla, y crea las carpetas que falten cuando hace falta.
¿Cambia los archivos?
El paso de auditoría lee los archivos primero. Cualquier edición es un paso aparte y explícito.
Detalles
Descripción original del autor
Diagnose and resolve file access issues by verifying directory structure, then reading multiple files in parallel batches for efficient auditing, with built-in guidance for validating TypeScript import patterns.
repo: HKUDS/AgentPilot
Popularidad
- Estrellas en GitHub
- 7,8 mil
- Posición en el ranking
- #13089
- Licencia
- MIT
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
agentpilot
7,8 milAyuda a tu agente a mejorar un proyecto paso a paso, preparando una tarea y ejecutando el bucle de AgentPilot que propone, prueba y puntúa cambios.
openspace
7,8 milAyuda a tu agente a configurar OpenSpace, una herramienta que guarda y recupera skills de agentes, y a conectarla a tu app de IA mediante MCP.
rsi-arena
7,8 milAyuda a tu agente a configurar y ejecutar pruebas de referencia de IA conocidas, como AIME y Terminal-Bench, para comparar distintos métodos de mejora.
experiment-guide
7,8 milAyuda a tu agente a planificar experimentos pequeños, leer sus resultados y anotar conclusiones mientras investiga cómo mejorar un programa.
Skills parecidas
diffs
394 milPermite que tu agente genere un diff real y compartible de los cambios, como enlace de visualización o archivo de imagen, en lugar de un resumen escrito a mano.
coding-agent
394 milAyuda a tu agente a pasar un trabajo de programación grande a Codex, Claude Code u OpenCode como trabajador en segundo plano, y después revisar su progreso.
gh-issues
394 milAyuda a tu agente a encontrar incidencias de GitHub, elegir cuáles trabajar y abrir pull requests con correcciones, incluido el seguimiento de los comentarios de revisión.