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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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
- Identify the Target Path: Determine the file or directory path that is causing the access issue.
- Check Directory Existence: Use the
list_dirtool to verify if the directory exists and inspect its contents. - Verify Permissions: Ensure that the user has the necessary permissions to access the directory and its contents.
- Resolve Path Issues: If the directory does not exist, create it using appropriate commands or scripts. If permissions are insufficient, adjust them accordingly.
- 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
Comments
- …
More skills from this repository
agentpilot
7.8kHelps your agent improve a project step by step by preparing a task and running the AgentPilot loop that proposes, tests and scores changes.
openspace
7.8kHelps your agent set up OpenSpace, a tool that stores and fetches agent skills, and connect it to your AI app through MCP.
rsi-arena
7.8kHelps your agent set up and run standard AI benchmark tests, such as AIME and Terminal-Bench, to compare different improvement methods.
experiment-guide
7.8kHelps your agent plan small experiments, read their results and record findings while it investigates how to improve a program.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.