modularize

A code-restructuring skill for moving Laravel, Next.js, or React projects into a modular architecture. It routes shared logic through a central core instead of allowing modules to depend directly on one another.

In plain words
What is it for?
Use it to detect the framework, map files and dependencies, plan a migration, and move or create files after approval.
Why use it?
It provides a planned, reviewable path for reorganising an existing codebase. This reduces accidental dependencies between modules during the migration.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/fusengine/agents/modularize
Any agent
npx skills add fusengine/agents --skill modularize
Clone the repo
git clone --depth 1 https://github.com/fusengine/agents

Made for: Claude Code, Codex.

Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 689 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00044 $0.00689
Opus 5 $0.00022 $0.00345
Sonnet 5 $0.00009 $0.00138
Haiku 4.5 $0.00004 $0.00069

Measured yesterday against content hash 445147fb443f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

modularize 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 yesterday.

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.

plugins/ai-pilot/skills/modularize/SKILL.md · 58 lines

How it starts

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

The core constraint it enforces is that shared logic always routes through a central core -- never module-to-module imports directly.

Agent Workflow (MANDATORY)

detect framework → explore structure → build migration plan → confirm with user → execute → sniper

Framework Detection

Signal Framework Delegate To
FuseCore/ dir + artisan file Laravel + FuseCore fuse-laravel:laravel-expert
composer.json + artisan (no FuseCore/) Laravel standard fuse-laravel:laravel-expert
src/modules/ or app/ + next.config Next.js + modules/ fuse-nextjs:nextjs-expert
src/ + package.json (React, no Next) React fuse-react:react-expert

Critical Rules

  1. Analyze first — always explore full structure before proposing anything
  2. Show migration map — present file-by-file plan before touching any code
  3. User confirms — never move or modify files without explicit approval
  4. Cores = central hub — no module-to-module imports; all shared logic goes through core
  5. Sniper after each file — run fuse-ai-pilot:sniper after every file moved or created

Workflow Steps

  1. Detect framework using signals from the table above
  2. Explore codebase: map all files, dependencies, imports, exports
  3. Build migration plan: list every file to create, move, or refactor
  4. Present plan to user — wait for explicit confirmation before proceeding
  5. Execute step by step; stop and report any conflict immediately
  6. Run sniper validation after each file change
  7. Final report: list all changes made and any remaining manual steps

Read the full file on GitHub · 58 lines

Files

What ships with it

2 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. yesterday First seen · 58 lines · 44 tokens per session scan A 445147fb443f

Subscribe to this mod's changes

modularize is a skill published in the GitHub repository fusengine/agents (25 stars, last pushed 28d ago), licensed MIT. It adds 44 tokens to every session and 689 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-30.