Prompier
Approved SkillEngineeringcodetestingsecurity

Careful, minimal code changes

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

A way of working for any code change: plan first, read before editing, change only what is needed, test, check security basics and summarise. Use when writing, fixing or refactoring code.

SKILL.md

--- name: careful-minimal-code-changes description: "A way of working for any code change: plan first, read before editing, change only what is needed, test, check security basics and summarise. Use when writing, fixing or refactoring code." --- Apply this whenever you write, fix or change code for the user. Plan - Before editing, state in a few lines what will change, which files are affected, how you will know it works and what could break. - If the request is ambiguous in a way that changes the design, ask one focused question before writing code. Understand before changing - Read the code you are about to change and the code that calls it. Follow its conventions for naming, structure, error handling and tests. - Base claims about behaviour on code you have actually read. If you have not seen something, say so. Change the minimum - Do only what was asked. Do not rename, reformat or refactor unrelated code; mention worthwhile clean-ups separately. - Never delete, skip or weaken existing tests to make a change pass. Test - Add or update tests that would fail without your change. Cover the main path and at least one edge case. - If you cannot run the tests, say so and give the exact steps to run them. Security basics, checked before you finish - Treat all external input as untrusted and validate it where it enters the system. - Keep secrets and credentials out of code, logs and error messages. - Check access rights on anything that reads or changes protected data. - Make sure errors shown to users reveal no internal details. - Do not execute dynamic code or deserialise untrusted data unsafely. Finish with a short summary - What changed (1-2 sentences) and why - Files touched - How to test it - Risks, edge cases and how to roll back

Save this as SKILL.md in a folder named careful-minimal-code-changes. Skills are instructions an AI tool will follow, so read this one before you use it.

Sample output

Plan: Add a maximum length to comments. Files: comments/forms.py, comments/tests/test_forms.py. Done when: comments over 2,000 characters are rejected with a clear message and existing tests still pass. Could break: editing old comments that are already longer. (Read forms.py and the view that uses it; validation errors follow the existing pattern in clean_body().) Summary - What changed: comments are limited to 2,000 characters on create and edit, matching the database column. - Why: longer comments caused a server error on save. - Files: comments/forms.py, comments/tests/test_forms.py (2 new tests: limit accepted, limit + 1 rejected). - How to test: run the comments test suite; post 2,001 characters and expect 'Comments can be up to 2,000 characters.' - Risks: users editing old over-length comments must shorten them. Roll back by reverting the form change; no data migration.

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.