← ClaudeAtlas

page-flow-cleanup-auditlisted

Audit and clean a page, feature flow, component, or file by tracing state sources, business invariants, queries, mutations, permissions, errors, duplicated calculations, and defensive code. Use for agent-assisted frontend cleanup, page cleanup, feature-flow cleanup, source-of-truth audits, query/mutation cleanup, permission/error-state review, defensive UI removal, and continued deep cleanup.
danhuaxiansheng/code-cleanup-skills · ★ 0 · Code & Development · score 75
Install: claude install-skill danhuaxiansheng/code-cleanup-skills
# Page Flow Cleanup Audit ## Principle Start from first principles: identify the page purpose, the facts it depends on, and the business invariants that must stay true. Do not start by mechanically deduplicating files or deleting optional checks. Good cleanup removes extra sources of truth and meaningless branches while preserving real loading, empty, error, permission, and lifecycle states. This skill is useful when cleanup might change user-visible behavior. It separates meaningless defensive code from real lifecycle, permission, error, and empty states. This skill is part of a three-skill cleanup system: - Use `page-flow-cleanup-audit` for user-visible flows, state ownership, and business invariants. - Use `necessary-code-audit` for wrapper, compatibility, fallback, default, and defensive-code necessity decisions. - Use `unused-code-audit` to prove whether removed helpers, exports, and files still have consumers. ## Workflow ### 1. Define the Flow Boundary - Name the page/file/feature and its user-visible purpose. - Identify entrypoints: user-facing entry, main component or handler, hooks, query helpers, mutation helpers, stores, dialogs, and external consumers. - Separate primary flow from adjacent reusable business surfaces. Do not merge UI just because it looks similar. - If the request includes "no backward compatibility" or "delete defensive code", apply that only to compatibility or impossible-state guards, not to real nullable business states. ### 2. Find