- Home
- Skills
- Testing & Debugging
- Repair Sorting Stability, Tie-Break & Pagination Bugs
More screenshots
Works with the AI tools you already use
Repair Sorting Stability, Tie-Break & Pagination Bugs
Diagnose or review stable sorting, tie-break keys, null ordering, collation, cursor pagination, deterministic ordering, database/index alignment, and regression tests. Works from repositories/workspaces or supplied evidence and produces concrete findings, bounded repairs or readiness gates, and deterministic validation while preserving public behavior, authorization, security boundaries, and evidence honesty.
$5
Repair Sorting Stability, Tie-Break & Pagination Bugs
Example session with this skill installed
An orders screen sorts by created_at DESC and uses cursor pagination. Many orders share the same second-level timestamp, so moving to page two sometimes repeats or skips orders. The cursor contains only created_at.
- Read your context and instructions
- Compiled the repair sorting stability
FAULT BOUNDARY IDENTIFIED
Case analyzed
An orders screen sorts by created_at DESC and uses cursor pagination. Many orders share the same second-level timestamp, so moving to page two sometimes repeats or skips orders. The cursor contains only created_at.
The supplied facts are sufficient to perform a concrete repair diagnosis for this case. No repository, production, vendor, or legal access is assumed.
Verified evidence
- VERIFIED: The list sorts by created_at DESC.
- VERIFIED: Many orders share the same timestamp.
- VERIFIED: The cursor stores only created_at.
- VERIFIED: Users see duplicates and omissions between pages.
Concrete findings
- created_at alone is not a total order because multiple orders share the same timestamp; the cursor cannot identify a unique continuation point.
- Use a deterministic tie-break such as order_id and keep direction consistent: created_at DESC, order_id DESC, with both values in the cursor.
- The cursor predicate must match the sort tuple, not merely serialize the second field.
- The directory case also requires explicit null ordering and production-equivalent collation in tests.
The canonical acceptance rule is
A paginated sort is stable only when the ordering defines a deterministic total order, tie-break fields are included consistently in queries and cursors, and null/collation behavior does not change between pages or execution environments.
The current result is based on that invariant, not on a generic success banner or a reusable checklist.
Required actions
Primary Sort Semantics: repair the owning boundary and preserve this case as a regression fixture; record the exact acceptance condition and owner.
2. Deterministic Tie-Break Key: repair the owning boundary and preserve this case as
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
Repair Sorting Stability, Tie-Break & Pagination Bugs is a ToolForge Labs workflow for stable sorting, tie-break keys, null ordering, collation, cursor pagination, deterministic ordering, database/index alignment, and regression tests. It performs the supplied case instead of returning a generic template, separates verified evidence from hypotheses, and produces bounded repair or readiness actions with deterministic validation.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- Passed all security checks, Safe to install