[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XCC3HAJNFB6WZAHV6YW5AV":3,"skill-same:01M6XCC3HAJNFB6WZAHV6YW5AV":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":13,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M6XCC3HAJNFB6WZAHV6YW5AV","verify-directory-structure-parallel-audit",null,"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.","UF-gzj\u002Fopenspace-claude-evolution","UF-gzj","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272393507?v=4","01M6XBCZB755P01VVYGQWPYZY3","01M6XBCZFJA5AREA17WGETA3FW",0,"MIT","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure-parallel-audit\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"verify directory structure","verify directory structure parallel audit","audit","verify","parallel","directory","structure","files","for","batches","reading","with","import","guidance","access","file","issues","diagnose","typescript","file access","2026-11-10 10:12:30",false,"---\nname: verify-directory-structure-parallel-audit\ndescription: 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.\n---\n\n# Verify Directory Structure — Parallel Audit\n\nThis 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.\n\n---\n\n## Steps\n\n### Phase 1 — Directory Verification\n\n1. **Identify Target Paths**: Collect every file or directory path involved in the operation. Prefer absolute paths to eliminate ambiguity.\n\n2. **Enumerate with `list_dir`**: Call `list_dir` on each relevant directory. Record all file names, sizes, and modification dates. This is your ground truth before touching any file.\n\n3. **Verify Existence & Permissions**: Confirm the directory exists and that the current user has read (and, if needed, write\u002Fexecute) permissions. If a directory is missing, create it before proceeding. If permissions are insufficient, adjust them before retrying.\n\n4. **Build a File Manifest**: From the `list_dir` output, 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.\n\n---\n\n### Phase 2 — Parallel Batch File Reading\n\n> **Why this matters**: Reading files sequentially costs one iteration per file. Reading them in parallel batches collapses N files into ⌈N\u002Fbatch_size⌉ iterations — a significant speedup when auditing dozens of files.\n\n5. **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\u002Findex files.\n\n6. **Issue Parallel `read_file` Calls**: Within each batch, invoke `read_file` for all files simultaneously (a single iteration). Do not wait for one file before requesting the next within the same batch.\n\n   ```\n   Batch 1 (parallel): read_file(src\u002Fcomponents\u002FA.tsx)\n                        read_file(src\u002Fcomponents\u002FB.tsx)\n                        read_file(src\u002Fcomponents\u002FC.tsx)\n                        read_file(src\u002Fcomponents\u002FD.tsx)\n                        read_file(src\u002Fcomponents\u002FE.tsx)\n\n   Batch 2 (parallel): read_file(src\u002Fcomponents\u002FF.tsx)\n                        ...\n   ```\n\n7. **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.\n\n8. **Re-verify Missing Files**: For any file reported as missing, re-run `list_dir` on 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.\n\n---\n\n### Phase 3 — TypeScript Import Validation\n\n> This phase targets a common class of structural bugs found when auditing TypeScript source trees.\n\n9. **Identify Import Statements**: For every `.ts` \u002F `.tsx` file read in Phase 2, extract all `import` lines.\n\n10. **Classify Import Kind — Value vs. Type**:\n\n    | Pattern | Correct usage |\n    |---|---|\n    | `import Foo from '...'` | Runtime value (class, function, object) |\n    | `import { Foo } from '...'` | Runtime value export |\n    | `import type Foo from '...'` | Type-only import (erased at compile time) |\n    | `import type { Foo } from '...'` | Type-only named import |\n    | `import { type Foo } from '...'` | Inline type modifier (TS 4.5+) |\n\n11. **Flag Value Imports Used Only as Types**: If an identifier imported without `type` is used **only** in type positions (`: Foo`, `as Foo`, `implements Foo`, generic parameters), it should be converted to `import type`. This prevents accidental runtime dependencies and satisfies `verbatimModuleSyntax` \u002F `isolatedModules` compiler flags.\n\n    ```typescript\n    \u002F\u002F ❌ Before — value import used only as a type\n    import { UserProfile } from '.\u002Ftypes';\n    const handler = (u: UserProfile) => { ... };\n\n    \u002F\u002F ✅ After — type-only import\n    import type { UserProfile } from '.\u002Ftypes';\n    const handler = (u: UserProfile) => { ... };\n    ```\n\n12. **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.\n\n    ```typescript\n    \u002F\u002F ❌ Duplicate\n    import { A } from '.\u002Futils';\n    import { B } from '.\u002Futils';\n\n    \u002F\u002F ✅ Merged\n    import { A, B } from '.\u002Futils';\n    ```\n\n13. **Verify Barrel \u002F Index Exports**: When a directory contains an `index.ts` (barrel file), confirm that every component or module expected to be publicly accessible is re-exported. Cross-reference against the file manifest from Phase 1.\n\n14. **Apply Fixes & Re-audit**: Apply all import corrections as a single write pass per file. After writing, re-read the affected files (parallel batch) to confirm the fixes took effect.\n\n---\n\n### Phase 4 — Final Validation & Report\n\n15. **Retry the Original Operation**: With the directory structure confirmed and import issues resolved, retry the operation that originally failed.\n\n16. **Log an Audit Report**: Produce a concise summary covering:\n    - Total files enumerated and read\n    - Number of batches used (highlight the iteration savings vs. sequential)\n    - Import issues found and fixed (value→type conversions, duplicate merges, missing barrel exports)\n    - Any remaining unresolved issues with recommended next steps\n\n---\n\n## Quick Reference: Batch Reading Pattern\n\n```\n# Sequential (slow) — N iterations for N files\nread_file(file1) → wait → read_file(file2) → wait → ...\n\n# Parallel batch (fast) — ⌈N\u002FB⌉ iterations for N files, batch size B\n[read_file(file1), read_file(file2), ..., read_file(fileB)]  ← 1 iteration\n[read_file(fileB+1), ...]                                     ← 1 iteration\n```\n\n---\n\n## Best Practices\n\n- **Always enumerate before reading**: `list_dir` first, then batch-read. Never guess file names.\n- **Use absolute paths** throughout to avoid working-directory ambiguity.\n- **Batch by locality**: Group files from the same directory in the same batch to keep context coherent.\n- **Type imports are zero-cost at runtime**: Prefer `import type` for any symbol used exclusively as a TypeScript type. This is especially important in projects with `isolatedModules: true`.\n- **Barrel files are contracts**: Treat `index.ts` exports as the public API of a module. Missing exports are bugs even if the underlying file is correct.\n- **Log intermediate findings**: If issues persist after Phase 3, dump the full audit log for offline debugging.\n\n---\n\n## Common Fix Categories (Checklist)\n\n- [ ] Directory missing → create with `mkdir -p`\n- [ ] Permissions insufficient → `chmod`\u002F`chown` or escalate\n- [ ] Path typo → re-enumerate with `list_dir`, correct path\n- [ ] Value import used as type → add `import type`\n- [ ] Duplicate imports → merge into single statement\n- [ ] Missing barrel export → add re-export to `index.ts`\n- [ ] Circular import → restructure module boundaries\n","# Verify Directory Structure — Parallel Audit\n\nThis 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.\n\n---\n\n## Steps\n\n### Phase 1 — Directory Verification\n\n1. **Identify Target Paths**: Collect every file or directory path involved in the operation. Prefer absolute paths to eliminate ambiguity.\n\n2. **Enumerate with `list_dir`**: Call `list_dir` on each relevant directory. Record all file names, sizes, and modification dates. This is your ground truth before touching any file.\n\n3. **Verify Existence & Permissions**: Confirm the directory exists and that the current user has read (and, if needed, write\u002Fexecute) permissions. If a directory is missing, create it before proceeding. If permissions are insufficient, adjust them before retrying.\n\n4. **Build a File Manifest**: From the `list_dir` output, 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.\n\n---\n\n### Phase 2 — Parallel Batch File Reading\n\n> **Why this matters**: Reading files sequentially costs one iteration per file. Reading them in parallel batches collapses N files into ⌈N\u002Fbatch_size⌉ iterations — a significant speedup when auditing dozens of files.\n\n5. **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\u002Findex files.\n\n6. **Issue Parallel `read_file` Calls**: Within each batch, invoke `read_file` for all files simultaneously (a single iteration). Do not wait for one file before requesting the next within the same batch.\n\n   ```\n   Batch 1 (parallel): read_file(src\u002Fcomponents\u002FA.tsx)\n                        read_file(src\u002Fcomponents\u002FB.tsx)\n                        read_file(src\u002Fcomponents\u002FC.tsx)\n                        read_file(src\u002Fcomponents\u002FD.tsx)\n                        read_file(src\u002Fcomponents\u002FE.tsx)\n\n   Batch 2 (parallel): read_file(src\u002Fcomponents\u002FF.tsx)\n                        ...\n   ```\n\n7. **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.\n\n8. **Re-verify Missing Files**: For any file reported as missing, re-run `list_dir` on 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.\n\n---\n\n### Phase 3 — TypeScript Import Validation\n\n> This phase targets a common class of structural bugs found when auditing TypeScript source trees.\n\n9. **Identify Import Statements**: For every `.ts` \u002F `.tsx` file read in Phase 2, extract all `import` lines.\n\n10. **Classify Import Kind — Value vs. Type**:\n\n    | Pattern | Correct usage |\n    |---|---|\n    | `import Foo from '...'` | Runtime value (class, function, object) |\n    | `import { Foo } from '...'` | Runtime value export |\n    | `import type Foo from '...'` | Type-only import (erased at compile time) |\n    | `import type { Foo } from '...'` | Type-only named import |\n    | `import { type Foo } from '...'` | Inline type modifier (TS 4.5+) |\n\n11. **Flag Value Imports Used Only as Types**: If an identifier imported without `type` is used **only** in type positions (`: Foo`, `as Foo`, `implements Foo`, generic parameters), it should be converted to `import type`. This prevents accidental runtime dependencies and satisfies `verbatimModuleSyntax` \u002F `isolatedModules` compiler flags.\n\n    ```typescript\n    \u002F\u002F ❌ Before — value import used only as a type\n    import { UserProfile } from '.\u002Ftypes';\n    const handler = (u: UserProfile) => { ... };\n\n    \u002F\u002F ✅ After — type-only import\n    import type { UserProfile } from '.\u002Ftypes';\n    const handler = (u: UserProfile) => { ... };\n    ```\n\n12. **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.\n\n    ```typescript\n    \u002F\u002F ❌ Duplicate\n    import { A } from '.\u002Futils';\n    import { B } from '.\u002Futils';\n\n    \u002F\u002F ✅ Merged\n    import { A, B } from '.\u002Futils';\n    ```\n\n13. **Verify Barrel \u002F Index Exports**: When a directory contains an `index.ts` (barrel file), confirm that every component or module expected to be publicly accessible is re-exported. Cross-reference against the file manifest from Phase 1.\n\n14. **Apply Fixes & Re-audit**: Apply all import corrections as a single write pass per file. After writing, re-read the affected files (parallel batch) to confirm the fixes took effect.\n\n---\n\n### Phase 4 — Final Validation & Report\n\n15. **Retry the Original Operation**: With the directory structure confirmed and import issues resolved, retry the operation that originally failed.\n\n16. **Log an Audit Report**: Produce a concise summary covering:\n    - Total files enumerated and read\n    - Number of batches used (highlight the iteration savings vs. sequential)\n    - Import issues found and fixed (value→type conversions, duplicate merges, missing barrel exports)\n    - Any remaining unresolved issues with recommended next steps\n\n---\n\n## Quick Reference: Batch Reading Pattern\n\n```\n# Sequential (slow) — N iterations for N files\nread_file(file1) → wait → read_file(file2) → wait → ...\n\n# Parallel batch (fast) — ⌈N\u002FB⌉ iterations for N files, batch size B\n[read_file(file1), read_file(file2), ..., read_file(fileB)]  ← 1 iteration\n[read_file(fileB+1), ...]                                     ← 1 iteration\n```\n\n---\n\n## Best Practices\n\n- **Always enumerate before reading**: `list_dir` first, then batch-read. Never guess file names.\n- **Use absolute paths** throughout to avoid working-directory ambiguity.\n- **Batch by locality**: Group files from the same directory in the same batch to keep context coherent.\n- **Type imports are zero-cost at runtime**: Prefer `import type` for any symbol used exclusively as a TypeScript type. This is especially important in projects with `isolatedModules: true`.\n- **Barrel files are contracts**: Treat `index.ts` exports as the public API of a module. Missing exports are bugs even if the underlying file is correct.\n- **Log intermediate findings**: If issues persist after Phase 3, dump the full audit log for offline debugging.\n\n---\n\n## Common Fix Categories (Checklist)\n\n- [ ] Directory missing → create with `mkdir -p`\n- [ ] Permissions insufficient → `chmod`\u002F`chown` or escalate\n- [ ] Path typo → re-enumerate with `list_dir`, correct path\n- [ ] Value import used as type → add `import type`\n- [ ] Duplicate imports → merge into single statement\n- [ ] Missing barrel export → add re-export to `index.ts`\n- [ ] Circular import → restructure module boundaries\n",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","showcase\u002Fskills\u002Fverify-directory-structure-parallel-audit","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution","https:\u002F\u002Fgithub.com\u002FUF-gzj","2026-04-16 09:31:03",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill verify-directory-structure-parallel-audit",{"tool":55,"command":56},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill verify-directory-structure-parallel-audit",{"tool":58,"command":59},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill verify-directory-structure-parallel-audit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure-parallel-audit\u002FSKILL.md",true,[63],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},".skill_id","OTHER","其他",49,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure-parallel-audit\u002F.skill_id",[70,91,107,116,146,162],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":38},"01M6XCCXD3NCM2YKR3WNGBASPC","write-special-chars-ts-check","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, plus a reliable TypeScript type-checking step that filters output to only the newly-written files to avoid being misled by pre-existing errors.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[77,78,79,36,80,81,82,83,26,84,85,86,87,25,88,89,33,90],"check","write","write special chars ts check","filters","characters","Existing","type-checking","errors","script","output","type","only","template","python",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":38},"01M6XCCT7E3J922Q345PBGSHPN","write-special-chars-readback","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, with mandatory post-write verification via read_file and cleanup of \u002Ftmp helper scripts.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[98,99,78,33,100,90,101,102,103,104,105,89,106,29,81,26,85],"readback","write special chars readback","helper","post","via","scripts","cleanup","read","verification",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":38},"01M6XCCMQX1R8B6FECWB3P63T7","write-special-chars-heredoc","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) by using a Python heredoc script executed via shell.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[114,78,81,115,85,102,89,33,90,26],"write special chars heredoc","shell",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":127,"publishedAt":38},"01M6XCCG41M994JJEX6VN52PEP","worldmonitor-reference","Curated architecture index of the WorldMonitor open-source dashboard. Reference for extracting patterns — vanilla TypeScript, Panel class hierarchy, service layer, CSS grid, API edge functions, refresh scheduler, and 60+ data source integrations.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[122],{"categoryNo":123,"categoryName":124,"taxonomyType":125,"taxonomyTypeDesc":126},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[128,129,130,131,132,36,133,134,135,136,137,26,138,139,140,141,142,143,144,145],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":38},"01M6XCCCHWNKG2W4VH9E6A10HF","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[153,154,155,156,26,157,29,158,159,160,161],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":38},"01M6XCC7X8PKMR2DEW91XGHYSV","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[23,18,24,21,32,169,33,34,35,37],"first"]