fix-llm-artifacts
Applies fixes from a prior review-llm-artifacts run, with safe/risky classification
Best use case
fix-llm-artifacts is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Applies fixes from a prior review-llm-artifacts run, with safe/risky classification
Teams using fix-llm-artifacts should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/fix-llm-artifacts/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How fix-llm-artifacts Compares
| Feature / Agent | fix-llm-artifacts | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Applies fixes from a prior review-llm-artifacts run, with safe/risky classification
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Fix LLM Artifacts
Apply fixes from a previous `review-llm-artifacts` run with automatic safe/risky classification.
## Usage
```
/beagle-core: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 with --all first)
- `--category <name>` - Only fix specific category: `tests|dead-code|abstraction|style`
## Instructions
### 1. Parse Arguments
Extract flags from `$ARGUMENTS`:
- `--dry-run` - Preview mode only
- `--all` - Full codebase scan
- `--category <name>` - Filter to specific category
### 2. Pre-flight Safety Checks
```bash
# 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:
```bash
git stash push -m "beagle-core: pre-fix-llm-artifacts backup"
```
### 3. Load Review Results
Check for existing review file:
```bash
cat .beagle/llm-artifacts-review.json 2>/dev/null
```
**If file missing:**
- If `--all` flag: Run `review-llm-artifacts --all --json` first
- Otherwise: Fail with: "No review results found. Run `/beagle-core:review-llm-artifacts` first."
**If file exists, validate freshness:**
```bash
# Get stored git HEAD from JSON
stored_head=$(jq -r '.git_head' .beagle/llm-artifacts-review.json)
current_head=$(git rev-parse HEAD)
if [ "$stored_head" != "$current_head" ]; then
echo "Warning: Review was run at commit $stored_head, but HEAD is now $current_head"
fi
```
If stale, prompt: "Review results are stale. Re-run review? (y/n)"
### 4. Partition Findings by Safety
Parse findings from JSON and classify by `fix_safety` field:
**Safe Fixes** (auto-apply):
- `unused_import` - Unused imports
- `todo_comment` - Stale TODO/FIXME comments
- `dead_code_obvious` - Obviously unreachable code
- `verbose_comment` - Overly verbose LLM-style comments
- `redundant_type` - Redundant type annotations
**Risky Fixes** (require confirmation):
- `test_refactor` - Test structure changes
- `abstraction_change` - Class/function extraction
- `code_removal` - Removing functional code
- `mock_boundary` - Test mock scope changes
- `logic_change` - Any behavioral modifications
### 5. Apply Safe Fixes
If `--dry-run`:
```markdown
## Safe Fixes (would apply automatically)
| File | Line | Type | Description |
|------|------|------|-------------|
| src/api.py | 15 | unused_import | Remove `from typing import List` |
| src/models.py | 42 | verbose_comment | Remove 23-line docstring |
...
```
Otherwise, spawn parallel agents per category with `Task` tool:
```
Task: Apply safe fixes for category "{category}"
Files: [list of files with findings in this category]
Instructions: Apply each fix, preserving surrounding code. Report success/failure per fix.
```
Categories to parallelize:
- `style` - Comments, formatting
- `dead-code` - Imports, unreachable code
- `tests` - Test-related safe fixes
- `abstraction` - Safe refactors
### 6. Handle Risky Fixes
For each risky fix, prompt interactively:
```
[src/services/auth.py:156] Remove seemingly unused authenticate_legacy() method?
This method has no callers in the codebase but may be used externally.
(y)es / (n)o / (s)kip all risky:
```
Track user choices:
- `y` - Apply this fix
- `n` - Skip this fix
- `s` - Skip all remaining risky fixes
### 7. Post-Fix Verification
Detect project type and run appropriate linters:
**Python:**
```bash
# Check if ruff config exists
if [ -f "pyproject.toml" ] || [ -f "ruff.toml" ]; then
ruff check --fix .
ruff format .
fi
# Check if mypy config exists
if [ -f "pyproject.toml" ] || [ -f "mypy.ini" ]; then
mypy .
fi
```
**TypeScript/JavaScript:**
```bash
# Check for eslint
if [ -f "eslint.config.js" ] || [ -f ".eslintrc.json" ]; then
npx eslint --fix .
fi
# Check for TypeScript
if [ -f "tsconfig.json" ]; then
npx tsc --noEmit
fi
```
**Go:**
```bash
if [ -f "go.mod" ]; then
go vet ./...
go build ./...
fi
```
### 8. Run Tests
```bash
# Python
if [ -f "pyproject.toml" ] || [ -f "pytest.ini" ]; then
pytest
fi
# JavaScript/TypeScript
if [ -f "package.json" ]; then
npm test 2>/dev/null || yarn test 2>/dev/null || true
fi
# Go
if [ -f "go.mod" ]; then
go test ./...
fi
```
### 9. Report Results
```markdown
## Fix Summary
### Applied Fixes
- [x] src/api.py:15 - Removed unused import `List`
- [x] src/models.py:42-64 - Removed verbose docstring
- [x] src/auth.py:156-189 - Removed dead method (user confirmed)
### Skipped Fixes
- [ ] src/services/cache.py:23 - User declined risky fix
- [ ] tests/test_api.py:45 - Test refactor skipped
### Verification Results
- Linter: PASSED
- Type check: PASSED
- Tests: PASSED (42 passed, 0 failed)
### Diff Summary
```bash
git diff --stat
```
## Cleanup
On successful completion (all verifications pass):
```bash
rm .beagle/llm-artifacts-review.json
```
If any verification fails, keep the file and report:
```
Review file preserved at .beagle/llm-artifacts-review.json
Fix issues and re-run, or restore with: git stash pop
```
## Example
```bash
# Preview all fixes without applying
/beagle-core:fix-llm-artifacts --dry-run
# Fix only dead code issues
/beagle-core:fix-llm-artifacts --category dead-code
# Full codebase scan and fix
/beagle-core:fix-llm-artifacts --all
# Fix style issues only, preview first
/beagle-core:fix-llm-artifacts --category style --dry-run
```Related Skills
---
name: article-factory-wechat
humanizer
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
find-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
tavily-search
Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.
baidu-search
Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.
agent-autonomy-kit
Stop waiting for prompts. Keep working.
Meeting Prep
Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.
self-improvement
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.
botlearn-healthcheck
botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.
linkedin-cli
A bird-like LinkedIn CLI for searching profiles, checking messages, and summarizing your feed using session cookies.
notebooklm
Google NotebookLM 非官方 Python API 的 OpenClaw Skill。支持内容生成(播客、视频、幻灯片、测验、思维导图等)、文档管理和研究自动化。当用户需要使用 NotebookLM 生成音频概述、视频、学习材料或管理知识库时触发。
小红书长图文发布 Skill
## 概述