xiaohongshu
xiaohongshu
make-it-pretty
Improve code readability through formatting and structure enhancements
Full skill instructions
I'll improve code readability while preserving exact functionality.
Target Reduction: 65% (3,000-4,500 → 1,050-1,575 tokens)
1. Focused Scope (Save 60-70%)
# ❌ AVOID: Reading entire codebase
Glob "**/*.{js,ts,jsx,tsx,py}" && Read all files
# ✅ PREFER: Focused file analysis
# User-specified file
Read "/path/to/specific-file.ts"
# OR recently changed code
git diff --name-only HEAD~3 | head -5
Read changed-files-only
2. Template-Based Formatting (Save 50-60%)
# ❌ AVOID: Manual formatting analysis
Read file → analyze patterns → apply improvements
# ✅ PREFER: Template-based patterns
# Use cached style patterns from .claude/cache/make-it-pretty/
1. Load project style guide (if cached)
2. Apply consistent naming conventions
3. Use formatter configs (prettier, black, gofmt)
3. Git Diff for Changed Code (Save 70-80%)
# ❌ AVOID: Analyzing all project files
Glob "**/*" → Read all → identify ugly code
# ✅ PREFER: Focus on recent changes
git diff HEAD~3 --name-only --diff-filter=AM | head -5
Read only-changed-files
4. Bash-Based Formatter Execution (Save 80-90%)
# ❌ AVOID: Manual formatting via Edit tool
Read → Edit line-by-line → Write
# ✅ PREFER: Use existing formatters
# JavaScript/TypeScript
npx prettier --write "src/**/*.{js,ts}"
# Python
black . --line-length 88
# Go
gofmt -w .
# Rust
cargo fmt
5. Progressive Improvements (Save 50-60%)
# ❌ AVOID: All improvements at once
Fix naming + structure + types + complexity in one pass
# ✅ PREFER: One aspect at a time
Pass 1: Naming (variables, functions)
Pass 2: Structure (extraction, grouping)
Pass 3: Types (annotations, specificity)
Pass 4: Cleanup (unused code, redundancy)
6. Early Exit When Clean (Save 90%)
# ❌ AVOID: Analyzing already-clean code
Read all files → check each → report "already clean"
# ✅ PREFER: Quick validation check
1. Check formatter config exists
2. Run formatter in check mode
3. Exit if no changes needed
# Example
npx prettier --check "src/**/*.ts" && exit 0
Before Starting:
git diff --name-only HEAD~3During Execution:
git stash push -m "pre-prettify".claude/cache/make-it-pretty/After Completion:
Cache Location: .claude/cache/make-it-pretty/
Cached Data:
style-guide.json - Project naming conventions
type-patterns.json - Type annotation standards
formatter-config.json - Detected formatters
Cache Invalidation:
--no-cache flagStandard Usage:
# Improve specific file
/make-it-pretty src/components/UserProfile.tsx
# Improve recently changed files
/make-it-pretty --recent
# Focus on specific aspect
/make-it-pretty --naming src/utils/helpers.ts
/make-it-pretty --structure src/api/client.ts
/make-it-pretty --types src/models/user.ts
# Dry run (preview changes)
/make-it-pretty --dry src/components/*.tsx
Focus Area Flags:
--naming - Only improve variable/function names--structure - Only reorganize code structure--types - Only improve type annotations--dry - Preview changes without applying--no-cache - Force refresh of style patternsOptimized Pattern:
Comparison (Previous Unoptimized):
Token Savings: 1,950-2,925 tokens (65% reduction)
Code Analysis
Safety Considerations
Improvement Strategy
Validation Approach
Based on this analysis, I'll proceed safely:
Safety First:
I'll identify files to beautify based on:
Improvements I'll Make:
My Approach:
Quality Assurance:
Important: I will NEVER:
This helps transform working code into maintainable code without risk.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience