Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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 (runs review-llm-artifacts --all first if no review JSON)
  • --category <name> - Only fix specific category: tests|dead_code|abstraction|style (also accepts dead-code; - and _ are normalized when matching JSON category)

Instructions

Hard gates

Sequence matters. Do not apply fixes until each pass condition is satisfied (these steps are not "internal verification").

  1. Working tree — git status --porcelain is empty or a stash was created with message pre-fix-llm-artifacts backup and git stash list shows it. If the user refuses stash/backup, stop or document explicit acceptance of risk in the report before edits.
  2. Review artifact on disk — .beagle/llm-artifacts-review.json exists, or --all completed a review-llm-artifacts run 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) its id is in the locked set, and (ii) the cited file exists and the cited code is actually present at file: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.
  3. Stale review — If jq -r '.git_head' .beagle/llm-artifacts-review.json does not match git rev-parse HEAD (prefix match accepted only for legacy short SHAs with len(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).
  4. Verification overlay — If .beagle/llm-artifacts-verification.json exists, it must parse; build exclude/inconclusive sets before partitioning (Section 4). On parse failure, stop and report the error.
  5. Risky fixes — No code_removal, logic_change, mock_boundary, abstraction_change, or test_refactor work without the interactive choice in Section 6 (or s to 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 match review-llm-artifacts JSON category values: 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 --all flag: Run review-llm-artifacts --all first 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("|----|----------|-----------|-------------|"
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить fix-llm-artifacts с