remove-feature

Delete feature-owned code with reference mapping and leaf-first ordering.

121|2|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/AgentSystemLabs/core --skill remove-feature-agentsystemlabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: remove-feature
Source: https://github.com/AgentSystemLabs/core/tree/main/plugins/agentsystem-core/skills/remove-feature
Command: npx skills add https://github.com/AgentSystemLabs/core --skill remove-feature-agentsystemlabs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents broken builds and silent regressions by guiding you through safely removing a feature boundary and every piece of dead code it leaves behind, including string-based, dynamic, and persisted-data references.

Core Features & Use Cases

  • Feature-boundary deletion with guardrails: defines what is being removed and what must explicitly stay, including external/public-contract considerations.
  • Reference mapping beyond grep: finds call sites and also string-based, dynamic registry/config/codegen, i18n, flags, analytics, persisted-state rows, and operational/docs surfaces.
  • Leaf-first deletion plus persisted-data decisioning: deletes leaf modules before aggregators and entry points, and forces an explicit choice for schema vs existing rows (backfill, preserve as historical, or purge).
  • Multi-pass orphan re-sweep: repeats sweep/confirm/delete until no new orphans remain.
  • Verification with adjacent-feature smoke checks: runs checks and a targeted runtime smoke verification to catch integration breakage.

Quick Start

Use remove-feature to remove a feature end-to-end: set mode to balanced and ask the agent to delete the specified endpoint/component/page while sweeping all dead code and re-sweeping until stable.

Frequently Asked Questions about remove-feature

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

FAQPage Schema
How do I safely delete a feature and remove all dead code without breaking the build?

To safely delete a feature, exhaustively map all static, dynamic, string, config, and persisted-data references before removal, then apply leaf-first deletion ordering and run multi-pass orphan re-sweeps until stable. This prevents broken builds and silent regressions.

What is the best way to handle database migrations when removing a feature boundary?

When removing a feature boundary, you must make an explicit persisted-data safety decision for existing rows: backfill, preserve as historical, or purge via a new database migration. This ensures schema changes do not silently orphan or corrupt data.

Why does my feature deletion leave orphaned references after a standard grep sweep?

A standard grep misses orphaned references because feature deletion involves dynamic, string-based, i18n, analytics, and persisted-state mappings. You need reference classification beyond grep, including config and codegen registries, to catch all dead code.

Can I remove routes and exported modules alongside UI components in one pass?

Yes, you can remove routes, UI pages, exported functions, modules, endpoints, and jobs in one process. The deletion applies phase-gated boundary confirmation and leaf-first ordering to ensure aggregators and entry points are deleted only after leaf modules.

How do I verify a feature deletion hasn't broken adjacent functionality?

To verify feature deletion hasn't broken adjacent functionality, run final verification checks and targeted runtime smoke tests on adjacent features. This catches integration breakage that static reference mapping might miss during the dead code sweep.