dir-verify-parallel-shell-audit
하는 일
이 스킬은 파일에 접근할 수 없는 이유를 찾고 소스 트리를 효율적으로 점검하도록 AI 에이전트를 안내합니다. 익숙하지 않은 프로젝트 폴더에서 일하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓파일 작업이 실패해서 폴더 구조가 맞는지 확인해야 할 때.
- ✓소스 트리를 점검하면서 많은 파일을 빠르게 읽어야 할 때.
- ✓줄 수나 맨 위 내용 같은 파일 세부 정보를 추가 단계 없이 알고 싶을 때.
스킬 링크
https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/dir-verify-parallel-shell-audit/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 프로젝트에서 파일이 찾아지지 않습니다. 폴더 구성과 설정 파일의 맨 위 줄을 한 번에 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 관련 디렉터리를 나열하고, 같은 단계에서 줄 수와 앞부분 내용을 확인하는 셸 점검을 실행합니다. 그다음 파일을 배치 단위로 읽고 import 패턴을 확인해 필요한 단계 수를 줄입니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Verify Directory Structure — Parallel Audit with Shell Property Checks
This skill provides a systematic approach to diagnosing file access issues and auditing source trees efficiently. It extends the parallel batch reading approach with an integrated shell property check phase that combines head -N and wc -l into a single run_shell call, co-scheduled with directory listing in Phase 1. This eliminates a common extra iteration that would otherwise be required to check file properties such as line counts and leading content (e.g., CSS/config file headers).
Steps
Phase 1 — Directory Verification + Shell Property Checks (Combined)
Key optimization: Fire
list_dircalls andrun_shellproperty checks in the same iteration. This avoids a dedicated iteration later just to learn "how many lines does this file have?" or "what is the first line of this CSS file?".
Identify Target Paths: Collect every file or directory path involved in the operation. Prefer absolute paths to eliminate ambiguity. At this stage, also note any files whose properties (line count, header content) you already know you will need — typically CSS, config, or data files.
Issue Parallel
list_dir+run_shellCalls Simultaneously:- Call
list_diron each relevant directory. - In the same iteration, issue one or more
run_shellcalls that bundleheadandwc -lfor known target files using a single compound shell command.
Iteration 1 (parallel): list_dir(src/components) list_dir(src/styles) run_shell("head -5 src/styles/main.css && echo '---' && wc -l src/styles/main.css") run_shell("head -3 vite.config.ts && echo '---' && wc -l src/main.ts")Compound shell pattern (combine head + wc + any other checks for a file):
# Single run_shell call — multiple files, multiple checks, zero extra iterations head -10 path/to/file.css && echo "LINE_COUNT:" && wc -l path/to/file.css && \ echo "---" && head -5 path/to/config.ts && echo "LINE_COUNT:" && wc -l path/to/config.ts- Call
Verify Existence & Permissions: Confirm directories exist and that the current user has read (and, if needed, write/execute) permissions. If a directory is missing, create it before proceeding (
mkdir -p). 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 in Phase 2.Record Shell Check Results: Parse and store the
head/wc -loutput alongside the manifest. This data is immediately available for the final audit report without any additional iterations.
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. Files whose content was partially previewed via
headin Phase 1 should still be fully read here if their complete content is needed.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 co
자주 묻는 질문
시간을 가장 많이 아끼는 부분은 무엇인가요?
디렉터리 목록과 파일 속성 확인을 같은 단계에서 실행해, 추가 왕복을 피한다고 스킬은 설명합니다.
TypeScript import도 확인하나요?
네, 스킬은 TypeScript import 패턴 검증을 포함합니다.
절대 경로를 써야 하나요?
네, 스킬은 파일이 어디에 있는지 혼동하지 않도록 절대 경로를 선호합니다.
상세 정보
작성자의 원본 설명
Diagnose and resolve file access issues by verifying directory structure, reading multiple files in parallel batches, running combined shell property checks (head/wc-l) in the same iteration as directory listing, and validating TypeScript import patterns — all with built-in guidance to minimize total iteration count.
repo: HKUDS/AgentPilot
인기도
- GitHub 스타
- 7.8k
- 순위
- #13051
- 라이선스
- MIT
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
agentpilot
7.8k작업을 준비하고 AgentPilot 루프를 실행해 변경을 제안, 테스트, 점수화하면서 프로젝트를 단계적으로 개선하도록 돕습니다.
openspace
7.8k에이전트 스킬을 저장하고 가져오는 도구인 OpenSpace를 설정하고, MCP를 통해 AI 앱에 연결하도록 돕습니다.
rsi-arena
7.8kAIME나 Terminal-Bench 같은 표준 AI 벤치마크 테스트를 설정하고 실행해 서로 다른 개선 방법을 비교하도록 돕습니다.
experiment-guide
7.8k프로그램을 개선하는 방법을 조사하면서 작은 실험을 계획하고, 결과를 읽고, 발견 사항을 기록하도록 돕습니다.