Prompier
Approved SkillEngineeringcode-reviewqualitytesting

Self-review of generated code before sharing

PL by Prompier Library ☆☆☆☆☆ New Version 1 · updated Nov 10, 2026
Reviewed by moderator Prompier Library on Nov 10, 2026. Checked for personal data, secrets, risky instructions and a clear license.

When to use this skill

Use when you have just written or changed code and before presenting it: runs a focused second pass for the mistakes generated code commonly contains, fixes what it can, and reports what was fixed and what needs the author's attention.

SKILL.md

--- name: self-review-of-generated-code-before-sharing description: "Use when you have just written or changed code and before presenting it: runs a focused second pass for the mistakes generated code commonly contains, fixes what it can, and reports what was fixed and what needs the author's attention." --- Apply this after you write, edit or refactor code and before you present it. Do not use it for reading or explaining code, or as a replacement for the project's linters, tests or human review. Check the change against these rules 1. Every function, method, option and import you used exists in the version the project uses. If you are not sure, say so instead of presenting it as fact. 2. Errors are not silently swallowed. No catch-all handlers that log and continue, and no code that returns success when the operation failed. 3. Nothing is hard-coded to make a check pass: no fixed return values, skipped assertions or weakened tests. 4. Tests exercise real behavior. They assert outcomes, not just that mocks were called, and include at least one failure or edge case. 5. No speculative abstraction: no new layers, factories or options that the task did not need. 6. Code copied from a similar place has been fully adapted: names, conditions and limits match the new context. 7. Comments and documentation match what the code now does; remove comments that only narrate the obvious. 8. Inputs from users or other systems are validated; no secrets in code or logs; queries and commands are not built by string concatenation. 9. Behavior that was not part of the task is unchanged. Keep bug fixes separate from refactors, and ask before changing a public interface. Fix or flag Fix violations you can fix safely. Flag the rest for the author with a one-line reason. Report List each item as 'file:line - what changed or what needs attention'. End with one line: 'Self-review: N fixed, M flagged' or 'Self-review: clean'. Never invent a quality score or percentage. Before delivering, answer yes or no: did tests run or did I say they did not; are all APIs verified or flagged; is anything outside the task touched? Any wrong answer means fix first.

Save this as SKILL.md in a folder named self-review-of-generated-code-before-sharing. Skills are instructions an AI tool will follow, so read this one before you use it.

Sample output

Self-review of the CSV import change: - importer.py:42 - Replaced 'except Exception: pass' with handling for the two expected errors (bad encoding, missing column); anything else now raises. - importer.py:88 - parse_date() had been copied from the invoice module and still assumed day-first dates; changed to the format in the import spec. - test_importer.py:15 - Test only checked that save() was called; now asserts the stored row values and adds a test for a missing required column. - importer.py:120 - Removed an unused ImporterFactory class I had added; the task needs one importer. - settings.py:7 - Flagged for author: the upload size limit is read from an environment variable with no default. I did not change it because it affects other features. Tests: ran the import test file, 9 passed. Did not run the full suite. Self-review: 4 fixed, 1 flagged

An example the author shared. Your result will differ.

Reviews

No written reviews yet. If you have used this prompt, tell others how it went.