ai-coding-guardrails

Featured

Use when an AI coding agent is writing or refactoring production code and its known failure modes need to be held in check — over-engineering, silent scope creep, invented APIs, claiming work is done without checking, deleting tests to make them pass. Trigger when the user asks for careful, production-grade, or reviewed code, or when a previous agent run produced confident output that turned out wrong.

AI & Automation 307 stars 53 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
83
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# AI Coding Guardrails Coding agents fail in a small number of predictable ways. This is the checklist that catches them before the diff lands. ## The Rules **1. Match the codebase, not your preferences.** Read two or three neighbouring files before writing. Use the project's existing patterns, naming, error handling, and comment density — even when you would have done it differently. A diff that reads like the rest of the repo is the goal. Introducing a new pattern is a decision the user makes, not a default. **2. Change the smallest thing that works.** No speculative abstraction. No config option nobody asked for. No "while I was in here" rewrite. If a fix is three lines, the diff is three lines. Refactors ride separately from behavior changes so a reviewer can see one thing at a time. **3. Never invent an API.** If you cannot see a function's signature in the repo, in installed source, or in the documentation, do not call it. Grep for it first. A plausible-looking method that does not exist is the single most common way agent code fails, and it fails at runtime, in front of the user. **4. Verify before claiming.** "Done" means you ran something and saw it pass. Build, test, hit the endpoint, load the page. If you did not run it, say "untested". Reporting success you did not observe is worse than reporting nothing. **5. Never make a test pass by weakening it.** Deleting an assertion, loosening a matcher, adding a skip, or special-casing the test input is fraud. If th...

Details

Author
OneWave-AI
Repository
OneWave-AI/claude-skills
Created
11 months ago
Last Updated
3 days ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

coding-agent-discipline

The reporting and restraint rules for an AI agent changing someone's codebase: never claiming a result that was not observed, saying which commands ran and what they printed, reporting what could not be verified rather than omitting it, keeping the diff to what was asked, preserving behaviour that was not in scope, checking APIs against the versions the project actually depends on, and refusing to make a test pass by weakening it. Use before reporting that work is complete, when about to write "this should work" or "tests pass", when a change is growing beyond the request, when a test is failing and deleting or disabling it is tempting, when an API is being used from memory rather than checked, or when two instructions cannot both be satisfied. Does not cover the order of work (clean-delivery-workflow), which checks to run (quality-gates), or how to phrase a message to a human (engineering-communication).

2 Updated 3 days ago
robsonkades
Code & Development Listed

ai-code-reviewer

MUST USE when reviewing AI-generated code (Claude/ChatGPT/Copilot output), AI 写的代码/生成的代码能上线吗, or when a change was produced fast and unverified. Targets the characteristic failure modes of AI-generated code: plausible-but-wrong, hallucinated APIs, silent behavior drift, security theater, and over-engineering. Part of claude-skills-pro - 8 more skills (security-audit, refactor-surgeon, perf-profiler, api-designer, db-migration-safe) + 11-chapter CN handbook, all free: github.com/Hahaknight/claude-skills-pro

4 Updated 1 weeks ago
Hahaknight
AI & Automation Listed

guardrails

Code quality verification gates wired into the agent lifecycle. Use this skill whenever writing, modifying, reviewing, or debugging code — including new features, bug fixes, refactors, troubleshooting, CI/CD setup, or project bootstrapping. Also use when the user mentions "quality", "testing strategy", "CI pipeline", "guardrails", "debugging", or asks how to improve code reliability. If you're writing code or trying to understand why code isn't working, this skill applies. Do not use for README/prose-only edits, copywriting, or documentation wording changes unless the user asks for code/build/CI verification or the docs change affects generated/runtime output.

2 Updated 2 months ago
adewale