Skip to content
Skillpedia
General coding7.8k · #13090

verify-directory-structure

What it does

This skill gives a simple method for fixing file access problems. It starts by checking the folder, then retries the task. It is for anyone whose agent cannot open or save files in a place it expects.

When to use it

  • ✓When a script or file operation fails because a folder seems to be missing.
  • ✓When you suspect a permissions problem is stopping a file from being read or saved.
  • ✓When you want to check the folder layout before running a task.

Skill link

https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/verify-directory-structure/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/HKUDS/AgentPilot/blob/main/openspace/legacy/v1/showcase/skills/verify-directory-structure/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you check whether the folder I pointed you to exists, and fix it if it does not?”

5 new skills a week. 1 minute to read.

How it works

The agent lists the folder and its contents, creates it if it is missing or fixes permissions, then retries the original step.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Verify Directory Structure

This skill provides a systematic approach to diagnosing and resolving file access issues by first verifying the directory structure. It is particularly useful when dealing with file operations, script executions, or any task that involves accessing files.

Steps

  1. Identify the Target Path: Determine the file or directory path that is causing the access issue.
  2. Check Directory Existence: Use the list_dir tool to verify if the directory exists and inspect its contents.
  3. Verify Permissions: Ensure that the user has the necessary permissions to access the directory and its contents.
  4. Resolve Path Issues: If the directory does not exist, create it using appropriate commands or scripts. If permissions are insufficient, adjust them accordingly.
  5. Retry the Operation: After resolving the directory structure issues, retry the original operation.

Example

# Example of using the list_dir tool to verify directory structure
list_dir --path "/path/to/directory"

Best Practices

  • Always verify the directory structure before performing file operations.
  • Use absolute paths to avoid ambiguity.
  • Log the directory structure for debugging purposes if issues persist.
FAQ

What if the folder is missing?

The skill says to create it, then retry the operation.

Should I use full file paths?

Yes. The skill recommends absolute paths to avoid confusion.

What should I do if the problem continues?

The skill suggests logging the folder contents so the cause is easier to find.

Details

Original description by the author

Diagnose and resolve file access issues by first verifying the directory structure.

repo: HKUDS/AgentPilot

Popularity

GitHub stars
7.8k
Ranking position
#13090
License
MIT
Updated
11/1/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills