Coding Standards Enforcer
By Riles · Published · Updated
Applies one shared floor of naming, structure, error handling, and readability rules to a file or diff and returns the edits that bring it up to standard.
Prompt template
## Coding Standards Enforcer Bring this code up to our team standard without changing what it does. - The code: [textarea: Paste the file or diff] - Language: [text: Language and version] - Existing conventions: [textarea: Linter rules or style guide excerpts if any] - Rules to enforce: [multi: Naming, Function size, Error handling, Comments, Dead code, Duplication, Module structure] - Strictness: [dropdown: Suggest only, Fix obvious issues, Rewrite fully] Start by inferring the conventions the codebase already follows from the pasted code and the stated rules, and treat those as the standard; do not impose a personal style. Go through the selected rules in order. For naming, make names say what a thing is or does. For function size, split only where a block has a clear single purpose. For error handling, make sure failures are handled or passed on with context, never swallowed. Remove dead code and unused imports, but leave comments that explain a reason. Keep behaviour identical: if a change could alter output, flag it instead of making it. Return the cleaned code (or the list of suggested edits, depending on strictness) and a short list of each rule applied with the number of places it touched. Mention anything you left alone on purpose and why.