Prompt Engineering as a Developer Discipline
Developers should treat prompts as modular, testable software components rather than guesswork, applying the same rigor they bring to code. Five prompting patterns are shown with before-and-after LLM outputs for coding tasks. Few-shot examples make the model mirror your docstring and type-hint style. Chain-of-thought instructions yield clearer logic and comments, and self-consistency prompts generate several approaches with complexity analysis before recommending one. Skeleton prompts constrain code structure, and explicit output schemas such as JSON make generated code easier to integrate with other systems.
Related posts
- Treat AI Like a Senior Dev, Not a Junior One
Neon mediumAdept
Getting better results from AI coding assistants means treating the LLM like a senior engineer rather than a junior one: give it full context and room to reason instead of curt one-line instructions. Concrete prompting practices include writing a PRD-style task spec with context, constraints, inputs, outputs and error handling; inviting clarifying questions before coding; iterating through architecture, design, implementation and refactoring phases; asking the model to explain tradeoffs before implementing; and having it flag uncertainty and assumptions. Each practice comes with a full example prompt, such as a currency conversion API spec and a product catalog caching design, plus sample model output.
- Beyond the Hype: How to Use AI to Actually Increase Your Productivity as a Dev
Docker mediumAdeptEffective AI-assisted coding comes from applying classic engineering discipline in a four-phase loop: prompting, planning, producing and refining. Strict context management matters most. That means clearing the agent's context between tasks, decomposing work into small prompts, chaining prompts through a separate LLM, and saving good prompts as reusable slash commands. Review the agent's plan before it writes code and treat its output like a teammate's code. Over time, keep refining steering files such as CLAUDE.md as compact indexes that link to more detailed docs.
- You can’t vibe code a prompt
incident.io mediumAdeptLetting an LLM iteratively rewrite a prompt until evals pass produces overfitted, brittle prompts. In incident.io's Slack-message relevance classifier, Claude fixed one failing case but broke others. Given the whole eval suite, Claude Code hit 100% only by bloating the prompt 7× and hardcoding every test case, which reverted to the original failures once that section was removed. The recommended approach is to write prompts by hand with structurally similar but non-overlapping examples, and use LLMs for generating evals and examples, judging outputs, linting prompts for contradictions, and grading production interactions.
- Reusable Prompts: The Future of Starter Templates
Neon mediumAdept
Starter templates can be complemented by reusable, atomic setup "recipes": Markdown prompts that AI coding agents apply to existing codebases, modeled on shadcn/ui's copy-the-code philosophy. Recipes declare prerequisites, which lets them compose, and cookbooks bundle them into ordered sequences. They also encode stack-specific decisions agents would otherwise get wrong, such as using node-postgres instead of Neon's serverless driver on Vercel Fluid Compute with connection pooling. Recipes are served as MCP resources with slash-command prompts. Long-lived skills ship as small per-cookbook Claude Code plugins whose skill files are one-line pointers, which keeps them from bloating the agent's context.
- Tactical Coding Assistants
Booking.com Engineering mediumAdeptCurrent coding assistants such as Gemini 2.5 Pro and Claude 3.7 act as strong tactical programmers in Ousterhout's sense: they implement what is asked quickly but take the path of least resistance and let complexity and duplication grow. A Python report-generator example shows this. A plain request to add a refund record type just adds another elif branch, while a prompt that specifies a Strategy/Command-style Record interface and a ReportContext produces an extensible design. The recommendation is to keep the AI on a short leash with tightly scoped prompts, give it more freedom only for boilerplate, and keep the human as the strategic designer who reviews every line.