fix-llm-artifacts
БесплатноБез исполняемых скриптовНе проверенApplies fixes from a prior review-llm-artifacts run with safe/risky classification, honoring verify-llm-artifacts output when present to skip false positives…
от existential-birds★ 92 звезды на GitHubОб этом скилле
Fix LLM Artifacts
Apply fixes from a previous review-llm-artifacts run with automatic safe/risky classification. If .beagle/llm-artifacts-verification.json exists, skip findings marked false_positive and treat inconclusive like risky fixes (prompt or skip per user).
Usage
Invoke the fix-llm-artifacts skill, optionally passing these flags:
fix-llm-artifacts [--dry-run] [--all] [--category <name>]
Flags:
--dry-run- Show what would be fixed without changing files--all- Fix entire codebase (runsreview-llm-artifacts --allfirst if no review JSON)--category <name>- Only fix specific category:tests|dead_code|abstraction|style(also acceptsdead-code;-and_are normalized when matching JSONcategory)
Instructions
Hard gates
Sequence matters. Do not apply fixes until each pass condition is satisfied (these steps are not "internal verification").
- Working tree —
git status --porcelainis empty or a stash was created with messagepre-fix-llm-artifacts backupandgit stash listshows it. If the user refuses stash/backup, stop or document explicit acceptance of risk in the report before edits. - Review artifact on disk —
.beagle/llm-artifacts-review.jsonexists, or--allcompleted areview-llm-artifactsrun that wrote that file. Otherwise stop (no fixes from memory or guesses). 2a. Echo + ID lock (anti-confabulation) — After loading the review (Section 3), echo the finding table (id | category | file:line | description) from the parsed JSON and record the exact id set as the locked id set. You fix only findings in this set; never fix a finding inferred from the branch name, directory, or memory. Every fix you apply or skip maps 1:1 to a locked id. See the review-verification-protocol skill → Anti-confabulation (gate 0). 2b. Per-fix existence precondition — Before editing for any finding, confirm (i) itsidis in the locked set, and (ii) the citedfileexists and the cited code is actually present atfile:line(read it now). If the file or code is absent, do not edit — the finding is stale or confabulated; mark it skipped with a reason and move on. Never create or rewrite a file to match a finding. - Stale review — If
jq -r '.git_head' .beagle/llm-artifacts-review.jsondoes not matchgit rev-parse HEAD(prefix match accepted only for legacy short SHAs withlen(stored_head) >= 7), prompt to re-run review.y→ re-run review, then continue.n→ abort the fix pass (do not apply fixes against stale findings). - Verification overlay — If
.beagle/llm-artifacts-verification.jsonexists, it must parse; build exclude/inconclusive sets before partitioning (Section 4). On parse failure, stop and report the error. - Risky fixes — No
code_removal,logic_change,mock_boundary,abstraction_change, ortest_refactorwork without the interactive choice in Section 6 (orsto skip all remaining risky items).
Post-edit: Sections 7–8 pass only when invoked tools exit successfully (non-zero = failure; keep JSON artifacts per Cleanup).
1. Parse Arguments
Accept optional flags (--dry-run, --all, --category <name>):
--dry-run- Preview mode only--all- Full codebase scan--category <name>- Filter to specific category (normalize-to_, e.g.,dead-code→dead_code, to matchreview-llm-artifactsJSONcategoryvalues:tests,dead_code,abstraction,style)
2. Pre-flight Safety Checks
# Check for uncommitted changes
git status --porcelain
If working directory is dirty, warn:
Warning: You have uncommitted changes. Creating a git stash before proceeding.
Run `git stash pop` to restore if needed.
Create stash if dirty:
git stash push -m "pre-fix-llm-artifacts backup"
3. Load Review Results
Check for existing review file:
cat .beagle/llm-artifacts-review.json 2>/dev/null
If file missing:
- If
--allflag: Runreview-llm-artifacts --allfirst to produce a full-project review - Otherwise: Fail with: "No review results found. Run the review-llm-artifacts skill first."
Echo + lock ids (gate 2a): Once the file is present, print every finding from the parsed JSON and lock the id set before partitioning:
python3 - <<'PY'
import json
r = json.load(open('.beagle/llm-artifacts-review.json'))
f = r['findings']
if not isinstance(f, list) or not f:
raise SystemExit("No findings to lock; aborting.")
ids = [x.get('id') for x in f]
if any(not isinstance(i, int) for i in ids):
raise SystemExit("All finding ids must be integers; aborting.")
if len(set(ids)) != len(ids):
raise SystemExit("Duplicate finding ids detected; aborting.")
print("| id | category | file:line | description |")
print("|----|----------|-----------|-------------|"
Установить fix-llm-artifacts в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл fix-llm-artifacts?
Applies fixes from a prior review-llm-artifacts run with safe/risky classification, honoring verify-llm-artifacts output when present to skip false positives. Use when cleaning up reviewed LLM coding artifacts.
Как установить скилл fix-llm-artifacts?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fix-llm-artifacts запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic