AI Weekly Malaysia

Back to items Summaries

My agent.md to improve LLM-assisted code quality

ID
17395
Status
summarized
Published
24 Aug 2026, 1:59 AM
Fetched
26 Aug 2026, 2:57 AM
Provider
Hacker News
Category
dev-community
Original URL
https://fabiensanglard.net/agent.md/index.html
Source URL
https://hnrss.org/best

Summary

Score
7.5
Created
26 Aug 2026, 2:57 AM
Tags
Audience
developersvibe_codersai_agent_users

What happened

Fabien Sanglard shares his agent.md file—a set of coding style rules injected into LLM coding sessions via agentic IDEs like Antigravity and VS Code's Claude Code plugin. After finding AI-generated code unusable (spaghetti, no comments, no structure), he iterated by repeatedly giving the same feedback, then codified those rules into agent.md: no magic numbers, function names under 30 characters, enums over booleans for parameters, early returns to reduce indentation, minimal but pointed comments, and no superlatives or praise from the LLM.

Why it matters

If you use agentic IDEs (Claude Code, Antigravity, Gemini), dropping an agent.md at your project root with explicit style rules eliminates the repetitive 'reviewing a junior dev' loop. Sanglard's specific rules—especially 'use enums not booleans for parameters' and 'no superlatives, give me the cold hard truth'—are concrete starting points you can copy and adapt today. The symlink trick (gemini.md/claude.md → agent.md) lets one file work across multiple tools.

Discussion angle

Compare agent.md rules against your own team's real pain points with AI-generated code—which rules from Sanglard's list would you add, remove, or change for your stack?

Top