# Nklisch Claude Code Modes Claude Code Modes

> Structural Refactor

- Skill: `tomevault-io/nklisch-claude-code-modes-claude-code-modes` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/nklisch-claude-code-modes-claude-code-modes`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/nklisch-claude-code-modes-claude-code-modes/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/nklisch-claude-code-modes-claude-code-modes

---


# Structural Refactor

Scan the codebase for organizational issues based on these structural rules.
Each rule has a reference file with rationale, examples, and exceptions.

## Rules

| Rule | Summary (one line) | Reference |
|------|-------------------|-----------|
| Flat by Default | Keep src/ flat; group into subdirectories only when 3+ files share a concern | [details](references/flat-by-default.md) |
| Soft 300-Line Limit | Implementation files should stay under 300 lines; split when single-domain logic exceeds it | [details](references/file-size-limit.md) |
| Test Co-location | Unit tests next to source (file.test.ts); integration/e2e tests also in src/ | [details](references/test-colocation.md) |
| Centralized Types | All domain types/interfaces/enums in types.ts; no local type definitions | [details](references/centralized-types.md) |
| No Barrel Exports | No index.ts re-export files; always import directly from the source module | [details](references/no-barrel-exports.md) |
| Prompt Domain Organization | Prompts organized by domain concept (axis/modifier), not by implementation | [details](references/prompt-domain-org.md) |
| kebab-case Files | All source files use kebab-case; test files use {source}.test.ts suffix | [details](references/kebab-case-files.md) |

## Output

Write the refactoring plan to `docs/structural-refactor-plan.md`.

The document should be a **prioritized refactoring plan** with these sections:

### High Value
Implement-ready entries with file paths, current layout, target layout, and acceptance criteria.

### Worth Considering
Valid reorganizations with moderate impact. Brief entries with paths and rationale.

### Not Worth It
Code that technically violates a rule but should NOT be reorganized, with explanation why.

---
> Source: [nklisch/claude-code-modes](https://github.com/nklisch/claude-code-modes) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-07-07 -->

