xiaohongshu
xiaohongshu
fix-imports
Repair broken imports automatically across the project
Full skill instructions
I'll systematically fix import statements broken by file moves or renames, with full continuity across sessions.
Arguments: $ARGUMENTS - specific paths or import patterns to fix
Target: 70% reduction (2,500-3,500 → 750-1,050 tokens)
Core Principles:
Optimization Patterns:
Phase 1: Smart Detection (200-300 tokens)
# 1. Early exit check - Use language server diagnostics if available
mcp__ide__getDiagnostics # Get import errors from IDE
# 2. Git diff scoping - Only check changed files
git diff --name-only HEAD~5 # Recent changes only
# 3. Grep for import statements with errors
Grep "^import.*from ['\"].*['\"]" --glob "*.{js,ts,jsx,tsx}"
Grep "^from .* import" --glob "*.py"
Phase 2: Cached Resolution (100-200 tokens)
.claude/cache/fix-imports/patterns.json for:
components/ → @/components/)Phase 3: Targeted Fixes (300-400 tokens)
# Use Bash for simple path corrections
sed -i 's|from "../components/|from "@/components/|g' file.ts
# Use Edit only for complex updates
Edit file.ts "old_import" "new_import"
Phase 4: Build Verification (150-250 tokens)
# Quick syntax check instead of full build
npx tsc --noEmit --skipLibCheck # TypeScript
eslint --fix file.ts # JavaScript
python -m py_compile file.py # Python
Token Budget Breakdown:
Caching Strategy:
Progressive Disclosure:
Session Resume Optimization:
fix-imports/state.json → Skip completed fixesOptimization Status: ✅ Fully Optimized (Phase 2 Batch 3D-F, 2026-01-26)
Caching Behavior:
fix-imports/ (plan.md, state.json).claude/cache/fix-imports//scaffold, /refactor skillsI'll maintain import fixing progress:
Session Files (in current project directory):
fix-imports/plan.md - All broken imports and fixesfix-imports/state.json - Resolution progressIMPORTANT: Session files are stored in a fix-imports folder in your current project root
Auto-Detection:
resume, status, newMANDATORY FIRST STEPS:
fix-imports directory exists in current working directoryfix-imports/state.jsonfix-imports/plan.mdNote: Always look for session files in the current project's fix-imports/ folder, not ../../../fix-imports/
I'll detect broken imports:
Import Patterns:
Smart Detection:
Based on analysis, I'll create resolution plan:
Resolution Strategy:
I'll write this plan to fix-imports/plan.md with:
I'll fix imports matching your patterns:
Resolution Patterns:
Ambiguity Handling:
I'll fix imports systematically:
Execution Process:
Progress Tracking:
After fixing imports:
Session Resume:
When you return and run /fix-imports or /fix-imports resume:
Progress Example:
RESUMING IMPORT FIXES
├── Total Broken: 34
├── Fixed: 21 (62%)
├── Current: src/utils/helpers.js
└── Next: src/components/Header.tsx
Continuing fixes...
Start Fixing:
/fix-imports # Fix all broken imports
/fix-imports src/ # Focus on directory
/fix-imports "components" # Fix component imports
Session Control:
/fix-imports resume # Continue fixing
/fix-imports status # Check progress
/fix-imports new # Fresh scan
Protection Measures:
Important: I will NEVER:
I'll maintain complete continuity between sessions, always resuming exactly where we left off with consistent resolution patterns.
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