- Home
- Skills
- Code Quality & Review
- LLM Coding Rules
LLM Coding Rules
Enforce surgical edits and prevent LLM over-engineering with a strict behavioral coding contract.
$5
Works with the AI tools you already use
LLM Coding Rules
Example session with this skill installed
Follow the LLM Coding Rules: Add a 'status' field to the User struct in models.go, default to 'pending'.
- Read your context and instructions
- Compiled the llm coding rules
I will add a 'status' field to the User struct.
Assumptions:
- The 'status' field should be a string to allow for future states (active, suspended).
- Existing JSON tags should be followed for consistency.
Success Criteria:
models.gocompiles successfully.- The
Userstruct containsStatus stringjson:"status"``. - New User instances default to "pending" in the constructor/factory function if one exists.
Code Update
// internal/models/user.go
package models
type User struct {
ID int64 `json:"id"`
Email string `json:"email"`
Password string `json:"-"`
+ Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
}
func NewUser(email, password string) *User {
return &User{
Email: email,
Password: password,
+ Status: "pending",
}
}
Changes:
- Modified
internal/models/user.go: AddedStatusfield toUserstruct and initialized it inNewUser.
Trade-off:
Using a string instead of an iota/enum increases memory slightly but avoids manual string mapping for JSON responses.
Next steps:
- Run
go build ./internal/models/...to verify compilation. - Update the database schema migration to include the new column.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
The problem
LLMs often over-engineer simple fixes, rewriting entire files and introducing breaking changes or unnecessary boilerplate just to update a single line of logic.
What it does
- Enforces surgical edits to minimize code churn and accidental side effects.
- Forces the model to state assumptions and trade-offs before modifying files.
- Requires the definition of verifiable success criteria (tests or diffs) prior to execution.
- Prevents speculative generality by blocking unrequested abstractions and helpers.
Why this beats prompting it yourself
Standard prompts fail to prevent the "helpful" LLM from refactoring working code or adding unasked-for features. These rules act as a strict behavioral contract that keeps the model focused on the specific task, reducing review time and preventing architectural drift.
Use cases
- Quick bug fixes where you need to preserve existing file formatting.
- Feature additions in large, sensitive codebases where side effects are costly.
- Collaborative coding sessions where you need predictable, verifiable model outputs.
- Refactoring tasks that require explicit trade-off analysis before implementation.
Known limitations
Requires an agent with file-reading capabilities. Not suitable for tasks where a complete architectural overhaul is the primary goal.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 24 days ago
- Passed all security checks, Safe to install