Reproduce a bug before fixing it
Fix a bug by reproducing it first: turn the report into a failing test or script, shrink it, make the smallest fix, and show the test pass.
In Lobstack: Skills › Library › Add
What your agent will do.
A bug report, error trace or wrong behaviour needs fixing in a repository you can run.
- 01
Write the expected and the actual behaviour in one line each. If the report does not say, ask rather than guess.
- 02
Reproduce it before touching the code: a failing test in the project's own suite if you can, a short script if you cannot. Run it and show it fails for the reported reason, not some other one.
- 03
Shrink the case. Remove inputs and steps until removing anything more makes it pass. The smallest failing case usually points straight at the cause.
- 04
Find the cause, not the place it showed up. Say which line is wrong and why, and look for the same mistake elsewhere.
- 05
Make the smallest change that fixes the cause. Tidying goes in a separate change.
- 06
Run the new test and the rest of the suite, and show both results.
- 07
Work on a branch. Ask before pushing or opening a pull request, and never push to the default branch.
If you cannot reproduce it, say so plainly and list what you tried. A fix for a bug you never saw fail is a guess.
The whole SKILL.md: 33 lines of Markdown.
Add it in the app from Skills › Library, or copy it and paste it into Skills › Add a skill.
---name: bug-reproductiondescription: "Fix a bug by reproducing it first: turn the report into a failing test or script, shrink it, make the smallest fix, and show the test pass."metadata: title: "Reproduce a bug before fixing it" category: engineering tags: [debugging, testing]--- ## When to use this A bug report, error trace or wrong behaviour needs fixing in a repository youcan run. ## How 1. Write the expected and the actual behaviour in one line each. If the report does not say, ask rather than guess.2. Reproduce it before touching the code: a failing test in the project's own suite if you can, a short script if you cannot. Run it and show it fails for the reported reason, not some other one.3. Shrink the case. Remove inputs and steps until removing anything more makes it pass. The smallest failing case usually points straight at the cause.4. Find the cause, not the place it showed up. Say which line is wrong and why, and look for the same mistake elsewhere.5. Make the smallest change that fixes the cause. Tidying goes in a separate change.6. Run the new test and the rest of the suite, and show both results.7. Work on a branch. Ask before pushing or opening a pull request, and never push to the default branch. If you cannot reproduce it, say so plainly and list what you tried. A fix for abug you never saw fail is a guess.
- Engineering
Commit message from a diff
Write a commit message from a diff: a subject line that states what was found, then prose explaining why the change was made.
SKILL.md · App - Engineering
Triage a failing build
Triage a red CI run: find the first real failure, attribute it to a change, and say whether the code is wrong or the runner was.
SKILL.md · App - Engineering
Review what a linter cannot
Review a change for what a linter cannot see: whether it is correct, what it breaks elsewhere, and which parallel list it forgot to update.
SKILL.md · App - Engineering
Pull request description
Write a pull request description from the diff: why it exists, what changed, how it was tested, and where a reviewer should look first.
SKILL.md · App - Engineering
Incident postmortem
Write a blameless postmortem from an incident's alerts, logs and chat: timeline, impact, root cause, and actions with owners.
SKILL.md · App - Engineering
Security review of a change
Review a change or repository for security holes (leaked secrets, injection, missing permission checks, unsafe input handling) with a real attack for each finding.
SKILL.md · App