dir-verify-parallel-shell-audit
Fungsinya
Skill ini memandu agent AI untuk mencari tahu mengapa file tidak dapat diakses dan untuk mengaudit pohon sumber secara efisien. Skill ini ditujukan untuk pengembang yang bekerja dengan folder proyek yang belum dikenal.
Kapan dipakai
- βSaat operasi file gagal dan Anda perlu memeriksa apakah struktur folder sudah benar.
- βSaat Anda perlu mengaudit pohon sumber dan membaca banyak file dengan cepat.
- βSaat Anda memerlukan detail file seperti jumlah baris atau baris awal tanpa langkah tambahan.
Link skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/dir-verify-parallel-shell-audit/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βFile saya tidak ditemukan di proyek ini. Periksa tata letak folder dan baris pertama file konfigurasi dalam satu kali proses.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent mendaftar direktori yang relevan dan menjalankan pemeriksaan shell untuk jumlah baris dan konten awal dalam langkah yang sama. Setelah itu agent membaca file dalam kelompok dan memastikan pola impor, sehingga jumlah langkah yang diperlukan berkurang.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apa penghematan waktu utamanya?
Skill ini menjalankan daftar direktori dan pemeriksaan properti file dalam langkah yang sama, sehingga menghindari putaran tambahan.
Apakah ini memeriksa impor TypeScript?
Ya. Skill ini mencakup validasi pola impor TypeScript.
Apakah path absolut sebaiknya dipakai?
Skill ini memilih path absolut agar tidak ada kebingungan tentang lokasi file.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 7.8k
- Peringkat
- #13051
- Lisensi
- MIT
- Diperbarui
- 1/11/2026
Komentar
- β¦
Skill lain dari repositori ini
agentpilot
7.8kMembantu agent Anda meningkatkan proyek langkah demi langkah dengan menyiapkan tugas dan menjalankan loop AgentPilot yang mengusulkan, menguji, dan memberi skor pada perubahan.
openspace
7.8kMembantu agent Anda menyiapkan OpenSpace, alat yang menyimpan dan mengambil skill agent, lalu menghubungkannya ke aplikasi AI Anda melalui MCP.
rsi-arena
7.8kMembantu agent Anda menyiapkan dan menjalankan tes benchmark AI standar, seperti AIME dan Terminal-Bench, untuk membandingkan berbagai metode perbaikan.
experiment-guide
7.8kMembantu agent Anda merencanakan eksperimen kecil, membaca hasilnya, dan mencatat temuan saat menyelidiki cara memperbaiki sebuah program.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.