Why We Built Agentic Skills for Rust (opens in new tab)

uday.bearblog.dev·11w·Open original (opens in new tab)
  • 23 Jan, 2026 *

TL;DR: AI models love to guess; the Rust compiler demands perfection. This mismatch causes AI to get stuck in "Lint Spirals" where it keeps guessing wrong fixes. We solved this by treating the AI not as a chatterbox, but as an engineer that must run cargo check to verify its own work before showing it to you.


1. The Problem: AI Guesses, Rust Checks

The biggest problem with AI coding is verification. In languages like Python or JavaScript, "close enough" code often runs fine. But Rust is different. Its compiler is a strict mentor that refuses to accept code unless it perfectly follows memory safety rules.

When an AI hits a Rust error, it often panics. It tries to "guess" a fix that looks right (like adding .clone() randomly) just to make the error go away. But because it’s just guessing unrelated to the actual logic, the compiler rejects it again. This leads to the "Lint Spiral": a frustrating loop where the AI fixes one error only to create another, never actually solving the problem.

2. The Solution: Skills, Not Just Prompts

We stopped trying to fix this with "better prompts" (pasting huge rulebooks into the chat). Instead, we built a Guild Architecture based on Agentic Skills.

What is a Skill?

A Skill is like a specialized employee. It has:

  1. Instructions: How to do the job.
  2. Tools: Scripts it can run (like cargo check).
  3. Docs: Reference manuals it can read.

Instead of one "General Rust AI" that tries to know everything, we split the work:

  • The Lint Hunter: Focuses solely on fixing errors. It doesn’t guess; it traces the code and proves the fix works.
  • The Grammar Specialist: specialized in writing parsers, loading the specific rules only when needed.

This prevents Context Pollution. By only loading the rules needed for the current task, the AI stays focused and doesn’t get confused by irrelevant information.

3. The "Beast Mode" Loop

We force the AI to think and check its work, just like a human engineer:

Ingest → Plan → Execute → Verify

The most important step is Verify. The AI isn’t allowed to just "think" it’s right. It must:

  1. Write the code.
  2. Run cargo check.
  3. Read the compiler error.
  4. Fix it immediately.

Only when the code passes the compiler does the AI show it to you. This uses the Rust compiler as a guardrail, ensuring you only get code that actually compiles.

To build better AI for Rust, we stopped treating models like text generators and started treating them like tool users. The Rust compiler is the ultimate judge of truth; our system simply gives the AI the hands to listen to it.

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help