
Branch Cleanup Review
Reviews, refactors, documents and validates changes on the current branch.
Install
npx skills add pipecat-ai/pipecat --skill cleanup -g -a claude-code -y- Repository
- pipecat-ai/pipecat17k
- Category
- Git and review
- Updated
- 3d ago
- License
- BSD-2-Clause
- Context cost
- Mediumabout 1,950 tokens
- Runs scripts
- No, instructions only
What it does
Review, refactor, document, and validate code changes in the current branch
Code Cleanup Skill
The Code Cleanup Skill reviews, refactors, and documents code changes in your current branch, ensuring alignment with Pipecat's architecture, coding standards, and example patterns. It focuses on readability, correctness, performance, and consistency, while avoiding breaking changes.
Skill Overview
This skill analyzes all changes introduced in your branch and performs the following actions:
- Analyze Branch Changes
- Review uncommitted changes and outgoing commits
- Refactor for Readability
- Improve clarity, naming, structure, and modern Python usage
- Enhance Performance
- Identify safe, conservative optimization opportunities
- Add Documentation
- Apply Pipecat-style, Google-format docstrings
- Ensure Pattern Consistency
- Match existing Pipecat services, pipelines, and examples
- Validate Examples
- Ensure examples follow foundational patterns (e.g.
07-interruptible.py)
- Ensure examples follow foundational patterns (e.g.
Usage
Invoke the skill using any of the following commands:
- "Clean up my branch code"
- "Refactor the changes in my branch"
- "Review and improve my branch code"
/cleanup
What This Skill Does
1. Analyze Branch Changes
The skill retrieves all uncommitted changes and outgoing commits to understand:
- New files added
- Modified files
- Code additions and deletions
- Overall scope and intent of changes
2. Code Refactoring
Readability Improvements
- Replace tuples with named classes or dataclasses
- Improve variable, method, and class naming
- Extract complex logic into well-named helper methods
- Add missing type hints
- Simplify nested or complex conditionals
- Replace deprecated methods and features
- Normalize formatting to match Pipecat style
Performance Enhancements
- Identify inefficient loops or repeated work
- Suggest appropriate data structures
- Optimize async workflows and I/O
- Remove redundant operations

