v0.3.21 7fe8dbc

SKILL.md RawHistoryFolder


name: test-fix description: Diagnose and minimally fix a failing test, then re-run. allowed-tools: [read, edit, bash]

Test fix

When the user reports a failing test (or a test suite failure), work in this order. Resist the temptation to rewrite large chunks of code.

1. Reproduce

Run the failing test in isolation first. For Go: go test -run TestThing ./pkg/.... For Node: npm test -- --run TestThing. The goal is a fast feedback loop, not the whole suite.

2. Read the failure carefully

  • What was expected vs got?
  • Which line of test code triggered the failure?
  • Is it a logic error in the implementation, an outdated test expectation, or environmental drift (e.g. timezone, locale, file system case-sensitivity)?

3. Choose the smallest possible fix

  • If the test is wrong → update the assertion only. Don't restructure.
  • If the implementation is wrong → patch the smallest function that fixes the failing case. Avoid drive-by refactors.
  • If the test depends on behaviour you need to change deliberately → ask the user before changing the assertion.

4. Re-run

The same isolated test, then the immediate suite, then the full test command if applicable. Stop the moment you see green; don't keep poking.

5. Report

Write 2–3 sentences: what was wrong, what changed, and which command verifies the fix. Include the diff inline.

source
1---
2name: test-fix
3description: Diagnose and minimally fix a failing test, then re-run.
4allowed-tools: [read, edit, bash]
5---
6
7# Test fix
8
9When the user reports a failing test (or a test suite failure), work
10in this order. Resist the temptation to rewrite large chunks of code.
11
12## 1. Reproduce
13
14Run the failing test in isolation first. For Go: `go test -run
15TestThing ./pkg/...`. For Node: `npm test -- --run TestThing`. The
16goal is a fast feedback loop, not the whole suite.
17
18## 2. Read the failure carefully
19
20- What was expected vs got?
21- Which line of test code triggered the failure?
22- Is it a logic error in the implementation, an outdated test
23  expectation, or environmental drift (e.g. timezone, locale, file
24  system case-sensitivity)?
25
26## 3. Choose the smallest possible fix
27
28- If the test is wrong → update the assertion only. Don't restructure.
29- If the implementation is wrong → patch the smallest function that
30  fixes the failing case. Avoid drive-by refactors.
31- If the test depends on behaviour you need to change deliberately →
32  ask the user before changing the assertion.
33
34## 4. Re-run
35
36The same isolated test, then the immediate suite, then the full
37test command if applicable. Stop the moment you see green; don't
38keep poking.
39
40## 5. Report
41
42Write 2–3 sentences: what was wrong, what changed, and which command
43verifies the fix. Include the diff inline.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 476

↑↓ moveenter openesc close