project-structure

project-structure is a skill for Claude Code from tartinerlabs/skills. It costs 32 tokens per session (590 once invoked), scanned A, original, MIT.

A guide to organising code and files within a software project. It considers feature-based, layer-based, and hybrid layouts, including monorepos—repositories that contain multiple related applications or packages.

In plain words
What is it for?
Use it to decide where new code belongs, review an existing project layout, and reorganise files when requested.
Why use it?
It helps prevent misplaced files, confusing directories, and inconsistent structure as a project grows.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Good fit Use it to decide where new code belongs, review an existing project layout, and reorganise files when requested.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tartinerlabs/skills/project-structure
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tartinerlabs/skills --skill project-structure
Clone the repo
git clone --depth 1 https://github.com/tartinerlabs/skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for project-structure

README.md
[![agentmods](https://agentmods.dev/badge/skills/tartinerlabs/skills/project-structure/github.svg)](https://agentmods.dev/skills/tartinerlabs/skills/project-structure)
Your own site
<a href="https://agentmods.dev/skills/tartinerlabs/skills/project-structure"><img src="https://agentmods.dev/badge/skills/tartinerlabs/skills/project-structure/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for project-structure

Your own site · 80×15
<a href="https://agentmods.dev/skills/tartinerlabs/skills/project-structure"><img src="https://agentmods.dev/badge/skills/tartinerlabs/skills/project-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 590 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 6 Apr 2026
  • Snyk pass 6 Apr 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.00590
Opus 5 $0.00016 $0.00295
Sonnet 5 $0.00006 $0.00118
Haiku 4.5 $0.00003 $0.00059

Measured 9d ago against content hash 0d372acedd43, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

project-structure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/project-structure/SKILL.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

  1. Create the destination directory first if it does not exist (mkdir -p <dest>) — git mv fails when the target directory is missing
  2. Move files to their correct location with git mv
  3. Update all import paths in dependent files
  4. Verify no broken imports remain after moves

Read the full file on GitHub · 57 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 57 lines · 32 tokens per session scan A 0d372acedd43

Subscribe to this mod's changes

project-structure is a skill published in the GitHub repository tartinerlabs/skills (8 stars, last pushed 17d ago), licensed MIT. It adds 32 tokens to every session and 590 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.