- 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 Agents 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.
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.
Requires an LLM with file-system access (e.g., Claude Code, Cursor). Not suitable for requests where a total system rewrite is intended.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 months ago
Permissions
No special permissions declared or detected