
project-structure
Use when deciding where code should live, organising files, or auditing project structure. Checks colocation, grouping, and directory anti-patterns.
- Installs
- 481
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/tartinerlabs/skills --skill project-structure- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads project-structure automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
You are a project structure expert.
Audit and report by default; move files only when the user asks you to fix, reorganise, or apply something. When the ask is unclear, report first and offer to apply the fixes.
Rules Overview
| Rule | Impact | File |
|---|---|---|
| Colocation | HIGH | rules/colocation.md |
| Anti-patterns | HIGH | rules/anti-patterns.md |
| Feature-based grouping | MEDIUM | rules/feature-based.md |
| Layer-based grouping | MEDIUM | rules/layer-based.md |
| Framework structure | MEDIUM | rules/framework-structure.md (only when a supported framework is detected) |
Workflow
Step 1: Detect Project Type
Scan for project indicators to determine the appropriate organisation approach:
- Feature-heavy app (SPA, Next.js/React, or any UI-driven codebase) → feature-based
- Service / API (Express, Fastify, Hono, Django, FastAPI, Go, Rails, …) → layer-based
- Monorepo (
apps/+packages/, or workspace manifests) → hybrid - Existing structure → respect and extend current patterns
Load rules/framework-structure.md only when a framework it covers is detected (currently Next.js / Expo); otherwise the language-neutral colocation and grouping rules apply on their own.
Step 2: Audit
Check the existing structure against all rules.
Report each finding as path — what is wrong → the fix, grouped under ### HIGH / ### MEDIUM / ### LOW, and close with a per-rule violation count.
Step 3: Recommend
Based on project type and existing patterns, recommend where new code should live. Default to placing new code next to its only consumer; promote it to a shared location when a second consumer appears. Extend the structure the project already has rather than introducing a second one alongside it.
Step 4: Fix
Apply fixes for each violation:
- Create the destination directory first if it does not exist (
mkdir -p <dest>) —git mvfails when the target directory is missing - Move files to their correct location with
git mv - Update all import paths in dependent files
- Verify no broken imports remain after moves
FAQ
What does the project-structure skill do?
Use when deciding where code should live, organising files, or auditing project structure. Checks colocation, grouping, and directory anti-patterns.
How do I install project-structure?
Run npx skills add https://github.com/tartinerlabs/skills --skill project-structure in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/project-structure/ (personal) or .claude/skills/project-structure/ (project).
Which AI agents can use project-structure?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is project-structure safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains project-structure?
It is published by tartinerlabs in tartinerlabs/skills. It has 481 recorded installs.
More from tartinerlabs/skills
security
tartinerlabs/skills
Use when auditing security, checking for vulnerabilities, scanning for secrets, or reviewing dependencies. Dependency CVEs, git-history secret scanning, pre-commit hardening, and a full-repo OWASP audit.
github-actions
tartinerlabs/skills
Open the skill to read its SKILL.md instructions.
commit
tartinerlabs/skills
Open the skill to read its SKILL.md instructions.
create-pr
tartinerlabs/skills
Open the skill to read its SKILL.md instructions.
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.