본문으로 건너뛰기
cccskills
무료GitHub에 공개

verify-directory-structure-parallel-audit

Investigate file access problems by checking folders and permissions, then reviewing files in parallel groups. Audit TypeScript imports, including type-only imports and duplicate statements, and check index exports before summarizing fixes and unresolved issues.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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.

설치 방법 보기

이럴 때 유용합니다

  • Investigating missing files and access errors
  • Reviewing many source files in parallel groups
  • Correcting type-only and duplicate TypeScript imports
  • Checking public exports in index.ts files

포함된 파일(2)

  • SKILL.md7.2 KB
  • .skill_id49 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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

  1. Identify Target Paths: Collect every file or directory path involved in the operation. Prefer absolute paths to eliminate ambiguity.

  2. 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.

  3. 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.

  4. 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.


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.

  1. 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.

  2. 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.

    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)
                         ...
    
  3. 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.

  4. 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.


Phase 3 — TypeScript Import Validation

This phase targets a common class of structural bugs found when auditing TypeScript source trees.

  1. Identify Import Statements: For every .ts / .tsx file read in Phase 2, extract all import lines.

  2. Classify Import Kind — Value vs. Type:

    PatternCorrect 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+)
  3. 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 / isolatedModules compiler 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) => { ... };
    
  4. 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';
    
  5. Verify Barrel / 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.

  6. 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.


Phase 4 — Final Validation & Report

  1. Retry the Original Operation: With the directory structure confirmed and import issues resolved, retry the operation that originally failed.

  2. Log an Audit Report: Produce a concise summary covering:

    • Total files enumerated and read
    • Number of batches used (highlight the iteration savings vs. sequential)
    • Import issues found and fixed (value→type conversions, duplicate merges, missing barrel exports)
    • Any remaining unresolved issues with recommended next steps

Quick Reference: Batch Reading Pattern

# Sequential (slow) — N iterations for N files
read_file(file1) → wait → read_file(file2) → wait → ...

# Parallel batch (fast) — ⌈N/B⌉ iterations for N files, batch size B
[read_file(file1), read_file(file2), ..., read_file(fileB)]  ← 1 iteration
[read_file(fileB+1), ...]                                     ← 1 iteration

Best Practices

  • Always enumerate before reading: list_dir first, then batch-read. Never guess file names.
  • Use absolute paths throughout to avoid working-directory ambiguity.
  • Batch by locality: Group files from the same directory in the same batch to keep context coherent.
  • 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.
  • 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.
  • Log intermediate findings: If issues persist after Phase 3, dump the full audit log for offline debugging.

Common Fix Categories (Checklist)

  • Directory missing → create with mkdir -p
  • Permissions insufficient → chmod/chown or escalate
  • Path typo → re-enumerate with list_dir, correct path
  • Value import used as type → add import type
  • Duplicate imports → merge into single statement
  • Missing barrel export → add re-export to index.ts
  • Circular import → restructure module boundaries

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Prepare audio stems, the separate parts of a track, for mixing by matching their durations with silence, loops, or crossfades. Verify each generated and processed file before moving to the next production step.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Match audio parts with different durations
  • Extend drums and melodic parts using suitable methods
  • Check audio specifications before mixing
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Produce audio in separate stems, meaning individual instrument tracks, and verify each output as you go. Align track lengths with silence, loops, or crossfades, then apply effects, mix a master, and package the files.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Align instrument tracks to a reference audio file
  • Choose how to extend tracks that are too short
  • Verify audio properties after generation and effects
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Build serverless endpoints that relay external API requests for a dashboard while keeping API keys on the server. Includes Vercel examples for input checks, caching, cross-origin access, and consistent JSON responses.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Connect a dashboard to external APIs without exposing API keys
  • Create endpoints for stock quotes and news
  • Standardize API responses and error handling
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Produce a master track and separate audio parts through a structured Python workflow. Apply filters and reverb, export WAV files with consistent settings, package them in a ZIP archive, and check that the deliverables meet the requested specifications.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Export a master track with separate audio parts
  • Apply filters and reverb to audio
  • Check duration and format across deliverables
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Keep document creation moving when web searches and page retrieval repeatedly fail. The skill preserves the original task, uses the model’s existing knowledge, and clearly identifies information that could not be checked against external sources.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Continue drafting after repeated web retrieval failures
  • Preserve task requirements during network errors
  • Mark information that could not be externally verified
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

When Python execution repeatedly fails in execute_code_sandbox, use a file-based alternative: save the script, run it through the shell, and capture results or errors. The guidance covers paths, imports, timeouts, structured output, and optional cleanup.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Retry Python work through the shell after repeated sandbox failures
  • Run longer tasks with an adjusted timeout
  • Execute Python work that needs multiple files or system utilities
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

HKUDS의 스킬 모두 보기

이 스킬의 문제 신고