mk:project-organization
Picks the path and name for a new file, or reorganizes existing files to the project's directory and naming rules.
| Source | .claude/skills/project-organization/SKILL.md |
| Owner | docs |
| Runtime | claude-code |
| Risk | medium |
What it does
Picks the path and name for a new file, or reorganizes existing files to match the project's directory and naming rules. Use it when a new report, plan or asset has no obvious home, after a messy session, or when another skill needs to know where to save output. It runs in Phase 6 (Reflect) or on request, and its output supports the documenter agent.
When not to use
To generate a project's documentation set use mk:docs-init. Skip it where lint rules and CI already enforce file placement.
Usage
/mk:project-organization [directories or files to organize]| Mode | Trigger | Behaviour |
|---|---|---|
| Advisory | Another skill asks where to save a file | Returns {path}/{name}.{ext} for the file type |
| Organize | You run the skill | Scan, propose a from-to table, ask for approval, then move or rename |
Example: "Organize my project files. Plans go in tasks/plans/, reviews in tasks/reviews/, docs in docs/. Show me the changes before moving anything."
Where files go
references/directory-rules.md holds the rules.
| Category | Path |
|---|---|
| Source code | src/ or the project root |
| Documentation | docs/ |
| Plans and reviews | tasks/plans/, tasks/reviews/ |
| Tests | tests/ or __tests__/, mirroring the source |
| Scripts | scripts/ or the owning skill's scripts/ |
| Assets | assets/{type}/ |
| Config | The root or .config/ |
| Toolkit | .claude/ |
Filenames use kebab-case. Plans, reviews and reports are timestamped (YYMMDD-{slug}), stable docs and configs are evergreen ({slug}), and multiple versions use a variant ({slug}-{variant}.{ext}). A slug is lowercase, hyphen-only, at most 50 characters, with no leading or trailing hyphen. A multi-file output gets its own subdirectory.
Steps
In Organize mode the skill lists the files, assigns each a category, checks names, shows the changes as a table, waits for your approval, then moves and renames files, creates missing directories and prints the final tree. An existing target prompts you to overwrite, rename or skip.
It never touches .git/, node_modules/ or .env files, respects .gitignore, and creates .gitkeep in empty directories.
Gotchas
| Trap | Detail |
|---|---|
| Package name and folder name | A workspace package's name can differ from its directory, which breaks Docker contexts and some bundlers. |
tsconfig path aliases | Vitest and Jest need their own alias config (alias, moduleNameMapper). |
| Circular aliases | They can leave an import undefined at runtime. |
| Mixed absolute and relative imports | Refactoring tools update only one form. Enforce one style. |
.gitignore on tracked files | Run git rm -r --cached dist/ to untrack a folder committed earlier. |