In this story
The AI coding setup that stops broken projects: a coding agent, a CLAUDE.md/AGENTS.md rules file, skills, MCPs and a free local model with Ollama.
If AI keeps breaking your project, the problem usually isn't the model. It's that you're using it like a search box: paste code, copy the answer, hope it fits. Here's the setup that actually works.
1. Use a coding agent, not a chat window
Tools like Claude Code or Codex run inside your project. They read your files, edit them directly and run commands, so their answers fit the code you actually have.
2. Give it a rules file
Create a CLAUDE.md (Claude Code) or AGENTS.md (Codex and others) in your project root. Write what the project is, how it's built and deployed, and what it must never touch. The agent reads it every session, so it stops guessing.
Example lines: "This is a Next.js app; deploys happen by git push only. Never edit .env files. Keep changes surgical. Run the tests before saying done."
3. Add skills for the jobs you repeat
A skill is a small instruction pack the agent loads only when it needs it, for example one for UI design rules and one for testing. Because it isn't loaded all the time, it saves the agent's context window for your actual code.
4. Connect MCPs
MCP servers let the agent see real data: GitHub (issues and PRs), Figma (designs), your database (schema and rows). It then works from facts instead of making things up.
5. Run a local model for free
With Ollama you can run open models on your own computer: no cost per message, no rate limits, and your code never leaves your machine. Good for quick or private tasks.
Sources: Claude Code and Codex documentation; Model Context Protocol docs; Ollama.
Email edition
Liked this? Get the next one by email.
One concise edition a week: the reviews, trailers and watch guides worth your time.
Written by
Swotboysandy
Contributor credited on this story. See our contributor policy and editorial standards for sourcing and corrections.
Comments
Loading comments…



