om-trim-unused-modules

Analyzes and disables unused built-in modules in Open Mercato apps without breaking dependencies.

1.7k|382|Updated Sep 10, 2025
One-click install
npx skills add https://github.com/open-mercato/open-mercato --skill om-trim-unused-modules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: om-trim-unused-modules
Source: https://github.com/open-mercato/open-mercato/tree/main/packages/create-app/agentic/shared/ai/skills/om-trim-unused-modules
Command: npx skills add https://github.com/open-mercato/open-mercato --skill om-trim-unused-modules

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Standalone Open Mercato apps ship with many built-in modules, and removing unused ones by hand risks breaking module dependencies, backend navigation, bootstrap, CLI workers, and code generation. This Skill performs a dependency-aware audit and disables modules safely through supported configuration.

Core Features & Use Cases

  • Dependency-aware classification: Labels each module as required, optional-used, optional-unused, or uncertain by inspecting declared dependencies, app imports, DI resolves, events, setup, CLI, and workers.
  • Confirmation-first workflow: Proposes the disabled set and its effects, then edits src/modules.ts only after user approval.
  • Landing route repair: When dashboards is disabled, redirects the backend landing route to the first accessible enabled page with profile as fallback.
  • Use Case: You generated a standalone app but only need CRM and Sales. Use this Skill to identify safe-to-disable modules, update src/modules.ts, then run yarn generate, typecheck, and login/navigation verification.

Quick Start

Ask the assistant to trim unused built-in modules from this app and propose a safe disabled set before editing src/modules.ts.

Frequently Asked Questions about om-trim-unused-modules

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

FAQPage Schema
How do I remove unused modules from an Open Mercato app?

Run a dependency-aware audit that classifies each module as required, optional-used, optional-unused, or uncertain, then disable the confirmed set through src/modules.ts. Never delete package files, migrations, or generated registries directly.

How to disable built-in modules without breaking dependencies?

Inspect declared and soft dependencies, app imports, DI resolves, events, setup, CLI, and workers before disabling anything. Never disable a module required by an enabled module, extension host, override, bootstrap, or provider, and treat uncertain modules as keep.

What happens to the backend landing page when dashboards is disabled?

The backend landing route must be updated to redirect to the first accessible enabled page, using /backend/profile only as a last fallback when no accessible business page exists. The redirect should be role and ACL aware.

Does disabling a module change the framework public contract?

No. Disabling a registry entry does not modify a framework public contract, so BACKWARD_COMPATIBILITY.md is not loaded unless the work also changes a stable ID, route, type, signature, or other contract surface.

What should I verify after disabling modules?

Run yarn generate, purge structural caches if available, then typecheck and build. Also verify login, backend navigation, setup, CLI, worker bootstrap, and affected module tests, confirming no generated import targets a disabled module.