verify-directory-structure-parallel-audit
Что он делает
Этот скилл проверяет, что папки и файлы существуют и доступны для чтения, а затем читает файлы группами. Он нужен тем, кто проводит аудит большой кодовой базы и хочет ускорить работу.
Когда использовать
- ✓Когда операция с файлами падает, и нужно сначала проверить папку.
- ✓Когда нужно проаудировать много файлов исходников за один проход.
- ✓Когда нужно проверить шаблоны импортов TypeScript во всем проекте.
Ссылка на скилл
https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/verify-directory-structure-parallel-audit/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Можешь проверить папки моего проекта, а потом просмотреть импорты во всех файлах исходников?”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Агент выводит список папок, составляет перечень файлов для проверки, читает их пакетами, а затем проверяет шаблоны импортов TypeScript.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с 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
Частые вопросы
Зачем читать файлы пакетами?
Чтение нескольких файлов сразу занимает меньше шагов, чем чтение по одному.
Что проверяется в папках?
Проверяется, что каждая папка существует и доступна для чтения, а при необходимости создаются недостающие папки.
Меняет ли он файлы?
Шаг аудита сначала читает файлы. Любые правки — отдельный и явный шаг.
Подробности
Оригинальное описание автора
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
Популярность
- Звёзды на GitHub
- 7.8k
- Место в рейтинге
- #13089
- Лицензия
- MIT
- Обновлён
- 01.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
agentpilot
7.8kПомогает агенту улучшать проект шаг за шагом: готовит задачу и запускает цикл AgentPilot, который предлагает, проверяет и оценивает изменения.
openspace
7.8kПомогает агенту настроить OpenSpace, инструмент для хранения и получения скиллов агента, и подключить его к вашему ИИ-приложению через MCP.
rsi-arena
7.8kПомогает агенту настроить и запустить стандартные тесты ИИ, например AIME и Terminal-Bench, чтобы сравнивать разные методы улучшения.
experiment-guide
7.8kПомогает агенту планировать небольшие эксперименты, читать их результаты и записывать выводы, пока он исследует, как улучшить программу.
Похожие скиллы
diffs
394kПозволяет агенту создать настоящее сравнение правок в виде ссылки или файла изображения, которым можно поделиться, вместо ручной сводки.
coding-agent
394kПомогает агенту передать большую задачу по коду в Codex, Claude Code или OpenCode как фоновому исполнителю, а затем проверять ее ход.
gh-issues
394kПомогает агенту находить задачи GitHub, выбирать, над какими работать, и открывать запросы на слияние с исправлениями, включая ответы на комментарии рецензентов.