Replacing 12K LoC with a 200 LoC Skill — David Gomes, Cursor
By ai.engineer
Categories: AI, Tools
Summary
Cursor replaced 15,000 lines of complex feature code with a 200-line markdown skill by leveraging two existing primitives: agent skills and sub-agents. This shift demonstrates how AI-native architectures can eliminate traditional engineering complexity while maintaining—or improving—functionality.
Key Takeaways
- Replaced 15,000 lines of production code (word trees, isolation logic, setup scripts, cleanup mechanisms) with a single 200-line markdown skill, reducing maintenance surface area dramatically while preserving feature parity.
- Git worktrees enable parallel agent execution—multiple models can compete on the same task simultaneously in isolated checkouts, then present diffs for comparison (called 'best event'). This primitives-based approach eliminated custom agent orchestration code.
- Two composable primitives (agent skills + sub-agents) proved sufficient to reimplement both worktree management and model comparison features. This suggests AI-native products should default to composition over custom infrastructure.
- Markdown-based skill definitions allow users to invoke complex workflows (/worktree, /bestevent) without backend changes. Instructions tell models how to create worktrees, run setup scripts, and stay isolated—pure prompt-level logic.
- The new implementation gained benefits over the old one despite code reduction, suggesting feature creep and complexity debt masked simpler solutions. Shipped in October 2.0 with cleanup/isolation mechanisms that proved unnecessary.
Topics
- Agent Skills and Sub-agents
- Git Worktrees for Parallel Execution
- Prompt-Based Feature Development
- Model Competition Workflows
- Code Complexity Reduction
Transcript Excerpt
Hi everyone. How you all doing? Thank you for uh coming today. Um I'm going to be talking about how markdown is basically the new code. Uh as TJA has already sort of previewed um we recently replaced a lot of code in the cursor application with just markdown just a skill and in today's talk I'm going to share a bit of the journey of going from a fullblown feature with a lot of code a lot of dependencies a lot of complexity and tests into a much more lightweight streamdown version of the same fea...