/vector-skills:project-structure-refactoringfrom Vector Skills
Designs clean folder/module layouts and safely restructures codebases across languages. Covers package-by-feature vs by-layer, monorepo workspaces, barrel files, path aliases, and staged migrations with git mv history preservation.
Ships in Vector Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Standards for two jobs: designing a clean folder/module layout for a project (new or existing, in any language), and restructuring an existing codebase to reach that layout without breaking anything. Think like a senior engineer who has lived through bad migrations: structure is a product for readers, moves are riskier than they look, and a plan someone approved beats a clever surprise.
references/00-structure-principles.md, then the stack file (10–13) for the ecosystem.references/01-restructure-workflow.md
end to end — inventory → target → mapping table → approval gate → staged execution.
Keep references/02-safe-moves-mechanics.md open while executing.00
and the stack file.This skill owns structure: folders, module boundaries, file placement, and the mechanics of moving code safely. It deliberately does not own everything nearby:
code-implementation workflow (and
codebase-audit to find what deserves it). During a restructure, such changes are
explicitly forbidden inside move commits — see Non-Negotiable 4.codebase-audit. Its report is excellent input
for a restructure plan; this skill takes over at "what should the layout be and how do we
get there".nestjs-dev-guidelines (01-folder-structure,
03-module-design) defines the target layout for NestJS repos. This skill still supplies
the migration workflow and move mechanics.app/,
expo-router, Django apps, pytest discovery) are constraints, not suggestions. Verify the
convention against the docs for the version in the repo before designing around it.Each rule has a Why so you can reason about edge cases instead of applying it blindly.
01.01.git log --follow, blame) and makes the diff unreviewable. Behavior changes
hide perfectly inside 300-file move diffs. See 02.00.utils.ts, helpers/, or misc/ dumping grounds. Name
modules by their content (dates.ts, money.py, retry.go). Note: structured framework
cross-cutting directories organized by role (such as NestJS src/common/{guards,pipes,decorators,filters}
in nestjs-dev-guidelines) are not junk drawers — generic catch-all files are.
Why: a folder named by what it isn't grows monotonically and is unsearchable; naming by
content forces the "what is this really?" decision that keeps structure honest. See 00.paths: filters), CODEOWNERS, bundler/test configs, scripts, docs, and string-based
dotted paths get grepped for old paths at every stage.
Why: the type checker catches broken imports; nothing catches a CI path filter that
silently stops running your tests, or a Dockerfile COPY of a folder that no longer
exists. These fail in prod, not in review. See 02.import-linter, Go internal/, workspace dependency constraints — so
the structure survives contact with the next hundred PRs.
Why: structure enforced only by convention decays at the speed of deadlines.Should we restructure at all?
Feature folders or layer folders?
api/, service/, model/) live inside a feature if needed.Where does this file go? (generic; stack files refine it)
lib/ (or the stack's equivalent), named by content.app/ / cmd/ / the framework's designated spot.misc/.03.Monorepo?
apps/ + packages/, see 13.| # | File | Rule in one line |
|---|---|---|
| 00 | 00-structure-principles.md | Language-agnostic principles: screaming architecture, feature-first, colocation, dependency direction, junk-drawer ban, when NOT to restructure |
| 01 | 01-restructure-workflow.md | The migration workflow: preconditions → inventory → target → mapping table → approval gate → staged green execution → boundary guards |
| 02 | 02-safe-moves-mechanics.md | Mechanics: git mv and history, per-ecosystem import fixing, shims, and the silent-breaker census (Docker, CI path filters, CODEOWNERS, dotted-path strings) |
| 03 | 03-splitting-large-files.md | Split a giant file into the standard layout, never into fragments: symbol-level mapping, shared-base-first extraction, shrinking facade, verbatim extraction commits, registration snapshots |
| 10 | 10-javascript-typescript.md | Node services, React/Next.js/Expo feature folders, router-owned dirs, barrels only at module boundaries, path aliases |
| 11 | 11-python.md | src layout, packaging, FastAPI feature packages, Django app conventions, dotted-path string census, absolute imports |
| 12 | 12-go.md | cmd/ + internal/ layout, package-by-feature, package names as API, pkg/ skepticism, flat-until-it-hurts |
| 13 | 13-monorepo.md | apps/ + packages/ split, boundary rules (apps→packages, no cycles), workspace tooling, migrating from copy-paste repos with history |
| You are doing... | Open... |
|---|---|
| Any restructure of an existing project | 01, 02, 00, + stack file |
| Laying out a brand-new project | 00, + stack file |
| Answering "where does this file/module go?" | 00, + stack file |
| Executing approved moves / fixing imports | 02, 01 |
| Splitting a giant single file (god file/module) | 03, 00, 01, + stack file |
| Node/React/Next/Expo layout | 10, 00 |
| Python layout or src-layout migration | 11, 02 |
| Go service or library layout | 12, 00 |
| Consolidating repos / splitting apps and packages | 13, 01, 02 |
| Post-move breakage (CI, Docker, prod) | 02 |
| NestJS repo | nestjs-dev-guidelines 01/03 for the target; here: 01, 02 for the migration |
evals/evals.json (opens in a new tab)evals/scripts/grade.py (opens in a new tab)references/00-structure-principles.md (opens in a new tab)references/01-restructure-workflow.md (opens in a new tab)references/02-safe-moves-mechanics.md (opens in a new tab)references/03-splitting-large-files.md (opens in a new tab)references/10-javascript-typescript.md (opens in a new tab)references/11-python.md (opens in a new tab)references/12-go.md (opens in a new tab)references/13-monorepo.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub myatminlu/vector-skills --plugin vector-skills8 skills in this plugin
/app-store-play-store-submissionGet an Expo / React Native app approved on the Apple App Store and Google Play, and fix App Store or Google Play rejections. Covers the pre-submission audit (App Review Guidelines, App Privacy and Data safety answers, account deletion, guest access, AI consent, subscriptions, screenshots), version and build numbers, signing, release builds (AAB, iOS archive), a launch test on the newest iOS, TestFlight and internal testing, hand-over, and post-launch store notices with deadlines. ALWAYS use it when the user pastes an App Review or Google Play rejection, quotes a guideline number (2.1, 2.3.10, 2.5.4, 3.1.1, 4.8, 5.1.1, 5.1.2…) or a Play Console policy warning, even if they only ask "what is this?" — the answer needs the rejection protocol, not just an explanation. Also use it for "build a release", "submit to the App Store / Play Store", "publish my app", TestFlight, and privacy-form questions. Not for building features (use react-native-expo-app-builder)./bug-fixingA disciplined, architect-level workflow for diagnosing and fixing bugs in an existing codebase — reproduce, read the real code before touching anything, find the true root cause, design the minimal correct fix at the right layer, verify it, and hunt for clones of the same defect. Use this skill for ANY defect work — crashes, exceptions, wrong output, failing or flaky tests, regressions, race conditions, memory leaks, performance degradation, data corruption, integration failures, works-locally-but-not-in-prod problems, or any request phrased as fix, debug, broken, not working, error, or why does X happen. Use it even when the bug looks trivial or the user has already proposed a fix — especially then, because the proposed fix is usually a symptom-level patch. Do NOT use for greenfield feature work with no defect involved./codebase-auditForensic whole-codebase audit and staged refactor. Use this skill whenever the user wants a codebase reviewed, audited, cleaned up, refactored, or "made systematic" — and also whenever they mention duplicated code, duplicated features or services, copy-pasted modules, band-aid or quick-fix or hacky code, technical debt, legacy vs new implementations living side by side, dead code, code smells, or wants to verify that features, functions and services are actually wired together and working end to end. Trigger it for requests like "review my codebase", "find duplicate logic", "why is this code such a mess", "check if everything is connected properly", or "plan a refactor", even when the user does not say the word "audit". Do NOT use it for a single-file review, a single bug fix, or writing new features./code-implementationDisciplined, architect-grade workflow for implementing features, enhancements, code-level refactors, consolidations, integrations, migrations, and performance work in an existing codebase. Forces reading the real code first, tracing the underlying cause, reusing or unifying existing code instead of duplicating, and verifying end to end with a mandatory pattern sweep. For pure defect/bug diagnosis and fixes (crashes, wrong output, regressions, flaky tests), prefer `bug-fixing`; for folder/file layout moves only, use `project-structure-refactoring`./code-quality-checkRigorous, evidence-backed, read-only code quality review that produces severity-ranked findings, a scorecard, and a merge/ship verdict. Use this skill whenever the user asks for a code review, quality check, PR or diff review, "is this code good", "check my code", "review this file", a health check, a pre-merge gate, a second opinion on code that an AI agent or teammate wrote, or wants best-practice / standards compliance checked — including when they simply paste code and ask what is wrong with it. Also trigger on mentions of code smells, maintainability, readability, dead code, duplicated logic, band-aid fixes, error handling, security review, performance review, test quality, or "make this production ready". Use it even for a single file or a small diff. Do NOT use it to write the fix — produce the findings, then hand off to the implementation or bug-fixing workflow./nestjs-dev-guidelinesProduction-grade NestJS backend standards for writing, reviewing, and evolving NestJS/Nest-style TypeScript services. Use when a repo has modules, controllers, services, DTOs, guards, or pipes, or when designing NestJS APIs, migrations, auth/RBAC, multi-tenancy, DDD layered/hexagonal architecture (ports/adapters, use cases), repository/N+1 queries, validation, pagination, caching, exception filters, BullMQ jobs, webhooks, uploads, decorators, scopes, dynamic modules, circular deps, health/shutdown, OpenTelemetry logging/tracing, testing, code review, version modernization, or AI backends (LLM gateways, SSE streaming, metering/quotas). Verify volatile versions/APIs against official docs and the repo. Plain Express/Fastify/Hono/Koa: cross-cutting guidance only. Not for non-Node backends or pure frontend work.Other plugins' skills for the same job