dir-verify-parallel-shell-audit
यह क्या करती है
यह स्किल AI एजेंट को पता लगाने में मदद करती है कि फ़ाइलें क्यों नहीं मिल रहीं, और स्रोत ट्री का कुशल ऑडिट कैसे करें। यह उन डेवलपर्स के लिए है जो अनजान प्रोजेक्ट फ़ोल्डरों के साथ काम करते हैं।
कब इस्तेमाल करें
- ✓जब फ़ाइल कार्रवाई फेल हो और जाँचना हो कि फ़ोल्डर संरचना सही है।
- ✓जब स्रोत ट्री का ऑडिट करना हो और बहुत सारी फ़ाइलें जल्दी पढ़नी हों।
- ✓जब अतिरिक्त चरण लिए बिना पंक्तियों की संख्या या शुरुआती सामग्री जैसी फ़ाइल जानकारी चाहिए।
Skill का लिंक
https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/dir-verify-parallel-shell-audit/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस प्रोजेक्ट में मेरी फ़ाइलें नहीं मिल रहीं। फ़ोल्डर का ढांचा और कॉन्फ़िग फ़ाइलों की शुरुआती पंक्तियां एक ही बार में जाँचिए।”
हर हफ़्ते 5 नई skills, 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 पैटर्न की पुष्टि शामिल है।
क्या absolute पाथ इस्तेमाल करने चाहिए?
स्किल फ़ाइलें कहां हैं इस भ्रम से बचने के लिए absolute पाथ को प्राथमिकता देती है।
जानकारी
लेखक का मूल विवरण
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
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
agentpilot
7.8kआपके एजेंट को AgentPilot से प्रोजेक्ट को चरण-दर-चरण सुधारने में मदद करती है, जिसमें बदलाव सुझाए, परखे और स्कोर किए जाते हैं।
openspace
7.8kआपके एजेंट को OpenSpace सेट करने में मदद करती है, जो एजेंट स्किल्स सहेजता और वापस लाता है, और MCP के ज़रिए आपके AI ऐप से जुड़ता है।
rsi-arena
7.8kआपके एजेंट को AIME और Terminal-Bench जैसे मानक AI बेंचमार्क टेस्ट सेट करने और चलाने में मदद करती है, ताकि सुधार के तरीकों की तुलना हो सके।
experiment-guide
7.8kआपके एजेंट को छोटे प्रयोग बनाने, उनके नतीजे पढ़ने और जाँच के दौरान उपयोगी निष्कर्ष लिखने में मदद करती है।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।