# Branch Cleanup Review

Reviews, refactors, documents and validates changes on the current branch.

- Repository: https://github.com/pipecat-ai/pipecat (16982 stars)
- Category: Git and review
- License: BSD-2-Clause
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add pipecat-ai/pipecat --skill cleanup -g -a claude-code -y`
Codex: `npx skills add pipecat-ai/pipecat --skill cleanup -g -a codex -y`
Cursor: `npx skills add pipecat-ai/pipecat --skill cleanup -g -a cursor -y`
Gemini CLI: `npx skills add pipecat-ai/pipecat --skill cleanup -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add pipecat-ai/pipecat`

## Description

Review, refactor, document, and validate code changes in the current branch

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

1. **Analyze Branch Changes**
   - Review uncommitted changes and outgoing commits
2. **Refactor for Readability**
   - Improve clarity, naming, structure, and modern Python usage
3. **Enhance Performance**
   - Identify safe, conservative optimization opportunities
4. **Add Documentation**
   - Apply Pipecat-style, Google-format docstrings
5. **Ensure Pattern Consistency**
   - Match existing Pipecat services, pipelines, and examples
6. **Validate Examples**
   - Ensure examples follow foundational patterns (e.g. `07-interruptible.py`)

---

## 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

The rest: https://github.com/pipecat-ai/pipecat/blob/HEAD/.claude/skills/cleanup/SKILL.md
