fix-error-queue

Claims queued root causes, fixes bugs on branches, and opens GitHub PRs.

1|1|Updated May 9, 2026
One-click install
npx skills add https://github.com/methodic-research/skills --skill fix-error-queue-methodic-research
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: fix-error-queue
Source: https://github.com/methodic-research/skills/tree/main/plugins/chronicle/skills/fix-error-queue
Command: npx skills add https://github.com/methodic-research/skills --skill fix-error-queue-methodic-research

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests.

What problem does it solve? Draining a backlog of triaged production errors requires an operator to manually claim each root cause, read the triage analysis, write a fix, and open a PR. This Skill automates one full iteration of that loop against the Chronicle fix queue, running the fix work in your local agent session instead of a metered operational LLM key. ## Core Features & Use Cases - Lease-based queue claiming: Claims the highest-severity open root_cause from the Chronicle fix queue with a 2-hour lease, heartbeat support, and clean handling of empty queues (204) and lease conflicts (409). - Guided fix workflow: Reads the triage agent's root-cause analysis from the linked GitHub issue, branches off origin/main as agent/fix-<n>, verifies with cargo check/test/fmt, and opens a PR with Closes #<n> linkage. - Triage mismatch handling: Releases the claim with a reason when the triage agent matched the wrong root cause, and documents discrepancies in the PR body when suspected files were wrong. - Use Case: An operator cd's into their local methodic checkout and runs the skill in a loop (e.g. claude /loop fix-error-queue) to drain the error queue, with a human reviewing each PR before merge — no autonomous merging at any stage. ## Quick Start From inside your local methodic checkout with CHRONICLE_SERVER_URL and CHRONICLE_API_KEY exported, ask the agent to fix the next error in the queue.

Frequently Asked Questions about fix-error-queue

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I drain the Chronicle fix queue locally?▼

Run the skill repeatedly from inside a methodic checkout, for example with claude /loop fix-error-queue or a Codex shell loop. Each invocation claims one open root_cause, works the fix on a branch, opens a PR, and marks the entry in_fix; a 204 response means the queue is empty.

How does the fix queue claim and lease mechanism work?▼

Claiming POSTs to /v1/admin/fix-queue/claim with a consumer ID and a 2-hour lease. The server uses SKIP LOCKED so no two operators claim the same root_cause, and long fixes can be extended via the heartbeat endpoint.

What credentials does the fix-error-queue skill need?▼

It needs a Chronicle superadmin Auth0 JWT or sk_admin_* API key via CHRONICLE_SERVER_URL and CHRONICLE_API_KEY, plus the operator's own gh CLI authentication for pushing branches and creating PRs. It does not mint a chronicle-agent-app token in local mode.

What happens when the fix queue lease expires mid-fix?▼

If the lease expires, another consumer can claim the root_cause and your /complete call returns 409 Conflict. Treat the 409 as final: abort the iteration and manually clean up your local branch and PR since the queue row no longer references them.

Does the skill merge fix PRs automatically?▼

No. The skill only opens a PR with Closes #<n> linkage and marks the queue entry in_fix; a human reviews and merges. The merge triggers a GitHub webhook that closes the root_cause as fixed, while an unmerged close returns it to open.

What should I do when the triage analysis is wrong?▼

If the triage matched the wrong root_cause, release the claim via the /release endpoint with a note pointing at the correct one. If the suspected files are wrong but the bug is real, proceed with the fix and call out the discrepancy in the PR body.