source-command-cleanup

Remove dead code from React and HTML prototypes before Figma handoff.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/codesour-design/gravity --skill source-command-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: source-command-cleanup
Source: https://github.com/codesour-design/gravity/tree/main/.agents/skills/source-command-cleanup
Command: npx skills add https://github.com/codesour-design/gravity --skill source-command-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes dead code, orphaned states, obsolete references, and unused logic from HTML prototypes before design handoff, reducing noise and preventing outdated features from being recreated.

Core Features & Use Cases

  • Dead Code Audit: Identifies unused React states, functions, components, props, conditions, mock data fields, comments, and constants.
  • Controlled Cleanup Workflow: Guides confirmation-based removal while preserving visible browser output and validating changes before completion.
  • Figma Handoff Briefing: Generates a structured prototype summary covering views, flows, components, data, and removed features for design transfer.

Quick Start

Ask the skill to run the cleanup command on a specified prototype file and prepare it for Figma handoff.

Frequently Asked Questions about source-command-cleanup

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

FAQPage Schema
How do I remove dead code from React prototypes before Figma handoff?

To remove dead code from React prototypes before Figma handoff, you can use a cleanup workflow that audits unused states, components, and props. This process requires confirmation-based removal steps and browser verification to preserve visible output.

What is a prototype cleanup workflow for design handoff?

A prototype cleanup workflow for design handoff is a controlled process that removes obsolete logic and orphaned states from source files. It generates a structured Figma handoff brief covering views, flows, and removed features to prevent outdated recreation.

How do I audit unused mock data and components in HTML prototypes?

You audit unused mock data and components in HTML prototypes by running a dead code audit. This identifies unused functions, conditions, constants, and removed feature references, guiding you through confirmation-based cleanup steps while validating browser output.

Does the cleanup process require browser verification before completing?

Yes, the cleanup process requires browser verification before completing. It validates changes during the controlled removal workflow to ensure that visible browser output is preserved and that no active UI elements are broken.

Can I use this cleanup workflow for both React and HTML prototype source files?

Yes, you can use this cleanup workflow for both React and HTML prototype source files. It applies to cleanup workflows where unused states, components, props, conditions, and mock data fields must be audited before design transfer.