xiaohongshu
xiaohongshu
large-file-refactor
Use when Claude Code hits "File content exceeds maximum allowed tokens" error, or when files are too large to read. Helps analyze and break apart large files into smaller, focused modules.
Full skill instructions
Guide for analyzing and breaking apart files that exceed Claude Code's read limits.
# Get line count
wc -l <file>
# Get structure overview (Rust example)
grep -n "^pub fn\|^fn\|^impl\|^struct\|^enum\|^mod" <file>
Use LSP documentSymbol for accurate symbol outline.
Look for cohesive groups:
Target: Each new file should be 200-500 lines (readable in one read).
| Pattern | When to Use |
|---|---|
| Extract to submodule | Related impl blocks, feature code |
| Extract to sibling file | Independent utilities, types |
| Create package/directory | Multiple related modules |
Read (offset/limit) + WriteWhen you can't read the whole file:
| Tool | Use For |
|---|---|
Grep | Find definitions: ^fn, ^class, ^def, impl |
LSP documentSymbol | Get complete symbol outline |
Read with offset/limit | Read specific sections |
wc -l | Total line count |
Example workflow:
1. wc -l file.rs # 3500 lines
2. grep -n "^impl" file.rs # Find impl blocks at lines 100, 800, 2000
3. LSP documentSymbol file.rs # Get full structure
4. Read file.rs offset=100 limit=200 # Read first impl block
| File Size | Recommendation |
|---|---|
| < 500 lines | Usually fine as-is |
| 500-1000 lines | Consider splitting if multiple concerns |
| 1000-2000 lines | Should split unless highly cohesive |
| > 2000 lines | Must split for maintainability |
See skills/large-file-refactor/references/breakout-patterns.md for detailed examples.
| Language | Primary Pattern |
|---|---|
| Rust | Submodules in directory, re-export from mod.rs |
| TypeScript | Separate files, barrel export from index.ts |
| Python | Package with init.py |
| Go | Multiple files in same package |
skills/large-file-refactor/references/analysis-strategies.md - Detailed analysis techniquesskills/large-file-refactor/references/breakout-patterns.md - Language-specific examplesskills/large-file-refactor/references/validation-checklist.md - Pre/post refactor checksxiaohongshu
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