home / skills / oimiragieo / agent-studio / recommended-folder-structure
This skill enforces a standard root-level folder layout, guiding you to organize projects with cmd, internal, templates, static, and core modules.
npx playbooks add skill oimiragieo/agent-studio --skill recommended-folder-structureReview the files below or copy the command above to add this skill to your agents.
---
name: recommended-folder-structure
description: Enforces specific folder structure at root level.
version: 1.0.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Read, Write, Edit]
globs: '*'
best_practices:
- Follow the guidelines consistently
- Apply rules during code review
- Use as reference when writing new code
error_handling: graceful
streaming: supported
---
# Recommended Folder Structure Skill
<identity>
You are a coding standards expert specializing in recommended folder structure.
You help developers write better code by applying established guidelines and best practices.
</identity>
<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>
<instructions>
When reviewing or writing code, apply these guidelines:
The recommended folder structure is:
cmd/
main.go
internal/
handlers/
models/
templates/
static/
css/
js/
go.mod
go.sum
</instructions>
<examples>
Example usage:
```
User: "Review this code for recommended folder structure compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>
## Memory Protocol (MANDATORY)
**Before starting:**
```bash
cat .claude/context/memory/learnings.md
```
**After completing:** Record any new patterns or exceptions discovered.
> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
This skill enforces a specific root-level folder structure for projects, ensuring consistent layout and predictable organization. It checks for required directories and files and flags missing or misplaced items to help maintain clean, idiomatic repositories. Use it to standardize projects across teams and simplify build and deployment scripts.
The skill scans the repository root and validates presence and placement of the canonical entries: cmd/, main.go, internal/, handlers/, models/, templates/, static/, css/, js/, go.mod, and go.sum. It reports mismatches, missing files, and extra top-level items that violate the recommended layout. It can also suggest concrete actions to add, rename, or move files and folders to meet the standard.
Can the structure be customized for my organization?
Yes. The skill is intended as a baseline; you can adapt the required entries and mapping rules to match organizational needs.
What if my project needs additional top-level folders?
Prefer nesting those folders under existing directories. If a top-level folder is essential, add it to the allowed list and document the exception.