cleanup

Validate changed code files for readability and consistency before commits.

1.8k|375|Updated Jan 15, 2025
One-click install
npx skills add https://github.com/trycompai/comp --skill cleanup-trycompai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cleanup
Source: https://github.com/trycompai/comp/tree/main/.claude/skills/cleanup
Command: npx skills add https://github.com/trycompai/comp --skill cleanup-trycompai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

After writing or modifying code, teams must review all changed files to ensure readability and consistency before considering work complete.

Core Features & Use Cases

  • No Verbose Defensive Checks: Extract repeated patterns into typed helpers.
  • Consistent Idioms Across Files: Use the same check pattern everywhere.
  • No Redundant Type Casts: Move casts into shared helpers.
  • Error Handling on Boundaries: Guard JSON.parse and external calls.
  • Shared Patterns Belong in Shared Packages: Promote common logic to shared libs.
  • No Dead Code: Remove unused imports and params.
  • Readable at a Glance: Favor clear names and simple expressions.

Quick Start

Run a post-implementation cleanup pass on all changed files to ensure readability and consistency before marking work complete.

Frequently Asked Questions about cleanup

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

FAQPage Schema
How do I automate code cleanup and readability checks before a commit?▼

Automate post-implementation code cleanup by running a validation pass on all changed files to enforce readability and consistency standards before commits and reviews. It checks for verbose defensive patterns, inconsistent idioms, and dead code.

When do I need to run a post-implementation cleanup pass on changed files?▼

Run a post-implementation cleanup pass after features, bug fixes, or refactors to ensure code remains readable. It validates that modified files adhere to consistent idioms and proper error handling before work is marked complete.

What's the best way to remove dead code and redundant type casts across changed files?▼

The best way to remove dead code and redundant casts is to extract repeated patterns into typed helpers and shared packages. This cleanup process ensures unused imports and parameters are removed while promoting common logic.

Does this code cleanup process enforce error handling on external calls and JSON parsing?▼

Yes, the code cleanup process enforces error handling on boundaries by guarding JSON.parse and external calls. It ensures shared patterns are promoted to shared libraries and validates readable expressions across modified files.

Can I use this cleanup pass to enforce consistent code idioms across different files?▼

Yes, you can use this cleanup pass to enforce consistent idioms across all changed files. It ensures the same check patterns are used everywhere, favoring clear names and simple expressions to keep code readable at a glance.