> Markdown version of [/videos/100652-teaching-ai-coding-agents-to-build-it-right-the-first-time](https://www.wearedevelopers.com/videos/100652-teaching-ai-coding-agents-to-build-it-right-the-first-time). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Teaching AI Coding Agents to Build It Right the First Time Are you still babysitting your AI coding assistant? Stop letting agents ship expensive full database scans by teaching them reusable skills, bounded context, and strict production rules. - **Speakers:** [Sajeetharan Sinnathurai](https://www.wearedevelopers.com/@sajeetharan-sinnathurai) - **Event:** Conference India 2026 - **Published:** November 26, 2026 - **Duration:** 27:28 - **URL:** https://www.wearedevelopers.com/videos/100652-teaching-ai-coding-agents-to-build-it-right-the-first-time - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/9eeabf52a3fead281dfc462a984430bc/thumbnails/thumbnail.jpg?time=300000ms ## Summary AI coding assistants often generate code that works in demos but causes expensive errors in production, such as full database scans or poor access patterns. Microsoft's Sajeetharan Sinnathurai explains how developers can transition from "agent babysitters" to effective managers by equipping coding agents with reusable skills, Model Context Protocol (MCP) tools, and portable configurations across environments like GitHub Copilot, Claude Code, and Cursor. Using an Azure Cosmos DB conference app, Sinnathurai demonstrates how explicit rules guide agents to use optimized point reads and partition keys, drastically reducing Request Units (RUs) and cloud costs. Effective agentic development relies on three pillars: clear intent via structured Product Requirements Documents (PRDs), bounded context, and human-in-the-loop acceptance. Rather than defaulting to autopilot, developers should start in plan mode and retain ownership of unit tests and code reviews, ensuring agents do not simply write tests designed to pass. To keep token costs low and accuracy high, teams should keep skill files concise—ideally under 300 lines—and load them dynamically. As underlying models evolve, developers must use evaluation frameworks (evals) and regression testing to continuously trim obsolete instructions and validate performance. **Keywords:** ai coding agents, azure cosmos db optimization, model context protocol, MCP tools, reusable agent skills, github copilot, claude code, cursor, cosmos db point reads, request units optimization, agentic coding workflows, spec generation frameworks, PRD for coding agents, llm evaluation frameworks, cosmos db agent kit, hybrid vector search, human-in-the-loop code review ## Chapters 1. **Shifting from code writer to AI coding agent manager** (00:33) — Relying heavily on AI coding assistants often turns developers into full-time reviewers and babysitters unless agents are properly guided to build applications correctly the first time. 1. **Optimizing Azure Cosmos DB queries with skills and MCP** (01:52) — Unoptimized database queries generated by AI can incur high request unit costs, which can be prevented by instructing agents to use hybrid search and partition key point reads. 1. **Balancing intent, context, and acceptance in agent workflows** (05:40) — Blindly using autopilot mode leads to production issues, requiring developers to actively manage project intent, supply architectural rules and PRDs as context, and review agent outputs. 1. **Structuring portable agent skills across different coding environments** (08:37) — Because developers use diverse tools like VS Code, Cursor, and Claude Code, reusable skills and knowledge bases must be packaged within the repository for cross-agent compatibility. 1. **Keeping skill files concise and securing MCP tool permissions** (11:24) — Overloading skills with entire knowledge bases wastes tokens, so developers should limit skill files to 300 lines, load them conditionally, and enforce strict authorization policies on MCP tools. 1. **Validating agent outputs with plan mode, specs, and evals** (14:02) — Allowing coding agents to write their own unit tests often results in false positives, making it essential to start in plan mode, define strict PRD contracts, and run automated evaluations. 1. **Trimming redundant instructions and taking end-to-end feature ownership** (18:28) — As foundation models evolve, bloated instruction sets become counterproductive and costly, requiring teams to continuously trim skills based on regression evidence while owning final production outcomes. ## Related Moments - [Shifting developer workloads and realistic AI productivity gains](https://www.wearedevelopers.com/videos/1830-wearedevelopers-live-speculaitions) (from "WeAreDevelopers LIVE - SpeculAItions") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/2cdb4226b123a771ffa9261c5605d057/thumbnails/thumbnail.jpg?time=202197ms - [Balancing developer autonomy with the adoption of coding agents](https://www.wearedevelopers.com/videos/100198-the-last-mile-of-ai-from-prototype-to-production) (from "The Last Mile of AI: From Prototype to Production") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/ff9c09619a4fcd6d8f9ced4e821a0fe9/thumbnails/thumbnail.jpg?time=108950ms - [Rethinking team structures around AI agent capabilities](https://www.wearedevelopers.com/videos/1539-agentic-devops-how-ai-powered-automation-transforms-software-delivery-on-github-and-azure) (from "Agentic DevOps: How AI-Powered Automation Transforms Software Delivery on GitHub and Azure") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/e602c7a24aecabf9b398579d5c6bc582/thumbnails/thumbnail.jpg?time=243155ms - [Turning repetitive developer tasks into automated AI agent skills](https://www.wearedevelopers.com/videos/100236-code-is-cheap-software-isn-t) (from "Code Is Cheap. Software Isn’t.") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/a9dfc11ef672049d901f55b2ce8f3a3d/thumbnails/thumbnail.jpg?time=72320ms - [Shifting from chat interfaces to autonomous agentic co-piloting](https://www.wearedevelopers.com/videos/2097-ai-code-then-vs-now-from-complex-rubbish-to-co-piloting-in-12-months) (from "AI Code then vs now: From Complex rubbish to co-piloting in 12 months") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/a37ca9cf6ceaa98bf988967a693db8b5/thumbnails/thumbnail.jpg?time=134920ms - [Shifting from writing code to orchestrating AI agents](https://www.wearedevelopers.com/videos/100686-how-is-swe-em-roles-are-changing-in-the-age-of-ai) (from "How is SWE & EM roles are changing in the age of AI") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/28efb6db3567bfea6d93bf807080d68d/thumbnails/thumbnail.jpg?time=30000ms ## Related Articles - [What is Agentic Programming and Why Should Developers Care?](https://www.wearedevelopers.com/magazine/625-what-is-agentic-programming-and-why-should-developers-care) - [Never delegate the understanding](https://www.wearedevelopers.com/magazine/749-never-delegate-the-understanding) - [The Overflow: AI and Agentic Coding](https://www.wearedevelopers.com/magazine/721-the-overflow-ai-and-agentic-coding) - [9 Claude Code Skills to Speed Up Your Workflow](https://www.wearedevelopers.com/magazine/740-9-claude-code-skills-to-speed-up-your-workflow) ## Related Jobs - [Staff Software Engineer, Copilot Code Review](https://www.wearedevelopers.com/jobs/ext/4743636-staff-software-engineer-copilot-code-review) at **GitHub** - [Principal Software Engineer, Copilot Code Review](https://www.wearedevelopers.com/jobs/ext/4667602-principal-software-engineer-copilot-code-review) at **GitHub** - [Staff Software Engineer, GitHub Intelligence (Copilot Agents)](https://www.wearedevelopers.com/jobs/ext/4850314-staff-software-engineer-github-intelligence-copilot-agents) at **GitHub** - [Microsoft D365 CRM + Copilot/Ai Functional Lead, Manager](https://www.wearedevelopers.com/jobs/ext/4647023-microsoft-d365-crm-copilot-ai-functional-lead-manager) at **PwC** - [Applied AI Health Data System Engineer-Senior Manager](https://www.wearedevelopers.com/jobs/ext/4892444-applied-ai-health-data-system-engineer-senior-manager) at **PwC** - [Applied AI Health Data System Engineer-Senior Manager](https://www.wearedevelopers.com/jobs/ext/4915554-applied-ai-health-data-system-engineer-senior-manager) at **PwC**