fix_bug
Skill1.1k starsChanged 9 months agoApache-2.0View on GitHub
Fix a bug from a GitHub issue using TDD. Analyzes the issue, creates a reproducing test case, implements the fix, verifies it, and creates a PR. Use this skill whenever working on a GitHub issue, bug report, or regression — even if the user just provides an issue number or URL.
- Commits and pushes
1 other project uses a version of this.
Trending
More talk lately.about the whole repository
Most recently taken up by
- pgschema/pgschemaword for word, first seen Oct 8, 2026
Who's talking about pgplex/pgschema
- ONREZA/sqlx-js“feat: harden sql contract boundaries”GitHub · Aug 4, 2026 · 1 reactions
- NixOS/nixpkgs“pgschema: 1.13.4 -> 1.14.1”GitHub · Nov 12, 2026
- yuniruyuni/FighterNotes“ci(deps): Update release supply chain”GitHub · Nov 8, 2026
- sudosubin/agents.nix“agent-skills.github.pgplex.pgschema: 1.14.0 → 1.14.1”GitHub · Nov 8, 2026
- sudosubin/agents.nix“agent-skills.github.pgplex.pgschema: 1.13.4 → 1.14.0”GitHub · Nov 6, 2026
The biggest 5 of 22 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 22
Talked about on GitHub (22 times).
On GitHub · 22
- Aug 4, 2026feat: harden sql contract boundaries — ONREZA/sqlx-js1 reaction
- Nov 12, 2026pgschema: 1.13.4 -> 1.14.1 — NixOS/nixpkgs0 reactions · 1 comment
- Nov 8, 2026ci(deps): Update release supply chain — yuniruyuni/FighterNotes0 reactions · 1 comment
- Nov 8, 2026agent-skills.github.pgplex.pgschema: 1.14.0 → 1.14.1 — sudosubin/agents.nix0 reactions
- Nov 6, 2026agent-skills.github.pgplex.pgschema: 1.13.4 → 1.14.0 — sudosubin/agents.nix0 reactions
17 more on GitHub
- Oct 31, 2026pgschema: 1.13.3 -> 1.13.4 — NixOS/nixpkgs0 reactions · 3 comments
- Oct 30, 2026ci(deps): Update release supply chain — yuniruyuni/FighterNotes0 reactions · 2 comments
- Oct 27, 2026agent-skills.github.pgplex.pgschema: 1.13.3 → 1.13.4 — sudosubin/agents.nix0 reactions
- Oct 19, 2026pgschema: 1.13.1 -> 1.13.3 — NixOS/nixpkgs0 reactions · 4 comments
- Oct 15, 2026agent-skills.github.pgplex.pgschema: 1.13.2 → 1.13.3 — sudosubin/agents.nix0 reactions
- Oct 15, 2026agent-skills.github.pgplex.pgschema: 1.13.1 → 1.13.2 — sudosubin/agents.nix0 reactions
- Oct 11, 2026chore(deps): update release supply chain — yuniruyuni/FighterNotes0 reactions · 1 comment
- Oct 1, 2026agent-skills.github.pgplex.pgschema: init at 1.13.1 — sudosubin/agents.nix0 reactions
- Sep 27, 2026pgschema: 1.13.0 -> 1.13.1 — NixOS/nixpkgs0 reactions · 4 comments
- Sep 17, 2026pgschema: 1.12.5 -> 1.13.0 — NixOS/nixpkgs0 reactions · 5 comments
- Sep 6, 2026pgschema: 1.12.4 -> 1.12.5 — NixOS/nixpkgs0 reactions · 4 comments
- Aug 27, 2026pgschema: 1.12.3 -> 1.12.4 — NixOS/nixpkgs0 reactions · 1 comment
- Jun 15, 2026sha256 is inconsistent with the one on github release — pgplex/homebrew-pgschema0 reactions
- Apr 22, 2026pg-delta: add enum-arg function privilege parity coverage (pgschema #366) — supabase/pg-toolbelt0 reactions · 1 comment
- Apr 22, 2026pg-delta: add parity coverage for DEFERRABLE UNIQUE constraints (pgschema #404) — supabase/pg-toolbelt0 reactions · 2 comments
- Mar 5, 2026Daily scan, git submodules, GitHub Models API, Copilot instruction docs — avallete/delta-schema-compare0 reactions
- Mar 3, 2026Joergs TODO list — numtide/llm-agents.nix0 reactions
Other versions1 project uses a version of this.
Word for word · 1
- pgschema/pgschema★ 1.1k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- pg_dumpSkill
- postgres_syntaxSkill
- review_commentsSkill
- run_testsSkill
- validate_dbSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Both: start with dump; if dump is correct, it's a diff bug
- Very specific: line 41
Verify it fails: go test -v ./cmd/dump -run TestDumpCommand_Issue<N>
- Very specific: line 52
Verify it fails (use the case name you folded into, or the new issue_<N>_<description>):
- Distinctive: line 73
Run only the impacted tests (not the full suite — CI runs that on the PR).
- Very specific: line 83
Only widen the filter to the whole category (PGSCHEMA_TEST_FILTER="<category>/") if the fix touched shared diff logic that could affect …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fix Bug
TDD workflow for fixing bugs from GitHub issues: reproduce first, then fix, then verify.
Two principles to keep turnaround fast:
- Run only the impacted/relevant tests locally — never the full suite. CI runs the full suite on the PR; locally you only need to confirm the reproducing test and its immediate neighbors. Narrow
PGSCHEMA_TEST_FILTERto the specific case (or category) you touched. - Prefer folding
testdata/diffcases into existing ones — each test case is its own embedded-postgres apply cycle, so every new directory adds to total test time. By default, consider adding the scenario to a related existing case. Only create a new case when that's more reasonable or consistent with the existing layout (see Phase 2).
Phase 1: Analyze
- Fetch the issue:
gh issue view <number> - Classify the bug:
- Dump bug:
pgschema dumpproduces wrong output → test intestdata/dump/ - Diff/Plan bug: dump is correct but plan generates wrong DDL → test in
testdata/diff/ - Both: start with dump; if dump is correct, it's a diff bug
- Dump bug:
Phase 2: Create Test Case (Red)
Dump Bugs
Create testdata/dump/issue_<N>_<description>/ with:
manifest.json— metadata with name, description, source URL, notesraw.sql— original DDLpgdump.sql— what pg_dump produces (input to test)pgschema.sql— expected correct output
Register in cmd/dump/dump_integration_test.go:
func TestDumpCommand_Issue<N><Description>(t *testing.T) {
if testing.Short() { t.Skip("Skipping integration test in short mode") }
runExactMatchTest(t, "issue_<N>_<description>")
}Verify it fails: go test -v ./cmd/dump -run TestDumpCommand_Issue<N>
Diff/Plan Bugs
Categories: create_table, create_index, create_trigger, create_view, create_function, create_procedure, create_sequence, create_type, create_domain, create_policy, create_materialized_view, comment, privilege, default_privilege, dependency, online, migrate.
Decide: fold or create new (default: consider folding). Each case directory is a separate embedded-postgres apply cycle, so folding keeps the suite fast.
- Fold when the bug is a natural variation of an existing case (same object type/category) and adding the DDL doesn't obscure that case's intent. Add the reproducing statements to the existing
old.sql/new.sql, then regenerate its expected outputs. Browse the category first (ls testdata/diff/<category>/) to find the best home. - Create new (
testdata/diff/<category>/issue_<N>_<description>/withold.sqlandnew.sql) when the scenario is distinct, or when a standaloneissue_<N>case is more consistent with how the category is organized.
Verify it fails (use the case name you folded into, or the new issue_<N>_<description>):
PGSCHEMA_TEST_FILTER="<category>/<case>" go test -v ./internal/diff -run TestDiffFromFilesGenerate expected outputs once you know correct behavior:
PGSCHEMA_TEST_FILTER="<category>/<case>" go test -v ./cmd -run TestPlanAndApply --generatePhase 3: Fix (Green)
Common locations:
- Dump:
ir/inspector.go,ir/normalize.go,internal/dump/ - Diff:
internal/diff/(table.go,column.go,index.go,trigger.go,view.go,function.go,procedure.go,sequence.go,type.go,policy.go,constraint.go) - IR:
ir/ir.go,ir/quote.go
Make the minimal fix. Use pg_dump and postgres_syntax skills as needed.
Phase 4: Verify
Run only the impacted tests (not the full suite — CI runs that on the PR). Keep the filter as narrow as possible:
# Dump bugs
go test -v ./cmd/dump -run TestDumpCommand_Issue<N>
# Diff bugs — start with the specific case
PGSCHEMA_TEST_FILTER="<category>/<case>" go test -v ./internal/diff -run TestDiffFromFiles
PGSCHEMA_TEST_FILTER="<category>/<case>" go test -v ./cmd -run TestPlanAndApplyOnly widen the filter to the whole category (PGSCHEMA_TEST_FILTER="<category>/") if the fix touched shared diff logic that could affect sibling cases.
Phase 5: Create PR
git checkout -b fix/issue-<N>-<description>
git add <files>
git commit -m "fix: <description> (#<N>)"
git push -u origin fix/issue-<N>-<description>
gh pr create --title "fix: <description> (#<N>)" --body "## Summary
<what was broken and how it was fixed>
Fixes #<N>
## Test plan
<what test was added and how to run it>"Checklist
- Bug classified (dump vs diff)
- Test case folded into an existing case, or new
issue_<N>_<description>created when more reasonable - Test fails before fix (red)
- Minimal fix implemented
- Test passes after fix (green)
- Impacted tests pass locally (narrow filter — full suite left to CI)
- PR created and linked to issue
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

