# "I Didn't Know These Claude Code Rules (Big Mistake)" <!-- ref: @content/youtube/sean-kochel/2025-12-10-i-didn-t-know-these-claude-code-rules-big-mistake triggers: [poor code output, ambiguous prompts, context window issues, ineffective AI responses] trigger_prompt: When developers struggle with vague outputs or notice a decline in performance as they approach Claude's context limits. version: 3 updated_at: 2026-10-31T18:32:27.855Z --> From Sean Kochel, 2025-12-10: To unlock the full potential of AI coding tools like Claude, developers must abandon vague "vibe coding" and adopt a rigorous methodology of providing highly structured, explicit, and context-rich prompts. Sean Kochel provides a masterclass of 15 "hidden rules" for maximizing the performance of the Claude AI coding assistant, focusing on structured prompting, explicit instructions, and strategic context management. ## Core Thesis To unlock the full potential of AI coding tools like Claude, developers must abandon vague "vibe coding" and adopt a rigorous methodology of providing highly structured, explicit, and context-rich prompts. This includes defining clear goals, offering concrete examples, setting negative constraints, and strategically managing the model's workflow and context window to prevent common failure modes like corner-cutting and hallucination. ## Key Insights - **Structured Data is King:** Large Language Models (LLMs) like Claude perform significantly better with structured data (e.g., XML-formatted prompts) than with unstructured "walls of text," which lead to ambiguity and poor outputs. - **Motivation Matters:** Claude excels when it understands the *purpose* of a feature and its intended impact on the user. Providing this "motivating context" leads to more effective and relevant code. - **Context Window Management is Crucial:** Claude's output quality degrades as it approaches its context window limit. It's often more effective to clear the context and start fresh with a reference file than to try and work within a compacted window. - **Separate Planning from Implementation:** Claude performs significantly better when the planning and research phase of a task is separated from the step-by-step implementation, ideally in different context windows. - **Models Have Default Tendencies:** AI models have inherent behaviors that require explicit direction to overcome. For example, Claude Opus can be overly conservative in exploring a codebase, and most models will take shortcuts unless instructed otherwise. - **Explicitness Unlocks Advanced Behavior:** Modern Claude models are engineered for precise instruction following. Being highly specific with positive and negative constraints gives the user immense control over the model's output and behavior. ## Actionable Takeaways 1. **Structure Prompts with XML:** Combat ambiguity by structuring complex prompts with XML tags. Clearly define --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*