framework-monorepo-streamline

Reviews and repairs package boundaries in React framework monorepos.

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/swcstudiospace/aimeecodes --skill framework-monorepo-streamline-swcstudiospace
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: framework-monorepo-streamline
Source: https://github.com/swcstudiospace/aimeecodes/tree/main/.aimee/skills/framework-monorepo-streamline
Command: npx skills add https://github.com/swcstudiospace/aimeecodes --skill framework-monorepo-streamline-swcstudiospace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? In-house React framework monorepos often break when packages are extracted without rewiring imports, leaving missing relative paths, circular dependencies, and barrels that eagerly re-export broken modules. This Skill provides a structured workflow to map package ownership, detect extract-without-rewire failures, and restore a healthy package graph. ## Core Features & Use Cases - Package ownership mapping: Build a package-to-role-to-health table across packages/* before editing anything. - Boundary repair patterns: Quarantine broken modules under src/legacy/, slim root barrels, and fix circular dependencies between core and hooks packages. - React hooks API rules: Enforce named use* exports, 2-tuple useState compatibility, SSR guards, and cleanup-preserving debounced effects. - Use Case: After splitting hooks out of a core package, imports like ../components silently break and the whole package fails to load. Use this Skill to diagnose the failure, quarantine broken modules, and rewire dependencies on @scope/core public exports. ## Quick Start Review the packages directory of my React framework monorepo, find broken imports and circular dependencies, and propose a repair plan.

Frequently Asked Questions about framework-monorepo-streamline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix broken imports after splitting a monorepo package?▼

List every relative import like `../components` under the new package's src and resolve each path on disk to count missing files. Then either move the code back next to its providers or depend on the core package and import only its public exports.

How to fix circular dependencies between core and hooks packages?▼

Circular dependencies occur when core requires hooks while hooks also require core. Make the leaf package depend on nothing or only optional native modules, and let core depend on hooks in one direction only.

Why does my package fail to load after extracting modules?▼

The root barrel likely re-exports modules whose relative imports no longer resolve inside the new package. Slim the root entry to modules that actually resolve and quarantine broken modules under src/legacy/ without exporting them.

Can a custom useState hook stay compatible with React?▼

Yes, an enhanced useState must remain a 2-tuple so it works as a drop-in React replacement. Extra features like history or undo should live in a separate opt-in hook rather than overloading the return value.

How do I handle optional native NAPI modules in a React package?▼

Load native modules through dynamic import with a catch that falls back to a Worker and then to the main thread. The runtime must never throw when the optional binary is missing, and providers should expose a thin hook over the runtime.