fix-repo
БесплатноБез исполняемых скриптовНе проверенImprove a specific repo's corpus conformance by fixing its top diverging cops in parallel using worktree-isolated teammates.
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
Fix Repo — Repo-Targeted Conformance Improvement
This skill targets a specific corpus repo (e.g., rails, discourse, mastodon) and fixes
the cops that contribute the most FP/FN for that repo. Unlike /fix-cops (globally worst
cops) or /fix-department (all cops in a gem), this focuses on improving a specific repo's
match rate.
If you edit code yourself (without dispatching teammates), do that work in a dedicated git worktree by default. Only skip this when the user explicitly asks to use the current tree.
Workflow
Phase 0: Assess (you do this)
If no repo was specified, show the repo list and let the user pick:
python3 scripts/investigate-repo.py --list $ARGUMENTSOnce a repo is chosen, run the repo investigation and paste its full output verbatim to the user (the table IS the primary output — do not summarize or skip it):
python3 scripts/investigate-repo.py <repo-name> $ARGUMENTSThe script automatically excludes cops fixed since the last corpus oracle run by scanning git commit messages, so the output only shows cops that still need work.
Show the user the top diverging cops and confirm the target repo.
Phase 1: Full Table & Recommendations (you do this)
Show the complete table of ALL diverging cops (use
--limit 0) ordered by FP+FN descending. This is the full picture of what needs to happen to reach 100%:python3 scripts/investigate-repo.py <repo-name> --limit 0 $ARGUMENTSPaste the full output verbatim to the user.
Check global FP/FN for the top candidates (use
--repos-only | head -5for each). This helps prioritize cops where the target repo is a significant contributor.Recommend up to 4 cops to fix in this batch. Prioritize by impact (highest FP+FN first), but use judgment about difficulty. Present your recommendations with global context:
My recommendations for this batch (4 cops): 1. Style/OptionHash — 91 FP on rails (1,819 FP globally), likely <hypothesis> 2. Layout/IndentationWidth — 0 FP, 5,696 FN on rails (Xk FN globally), likely <hypothesis> 3. ... Want me to proceed with these, or would you like to swap any out?Don't skip any cop category — Layout alignment cops, low-match-rate cops, and FN-heavy cops are all fair game. The goal is 100% conformance, so everything needs to be tackled eventually.
Wait for user confirmation before proceeding. The user may want to pick different cops or adjust the batch size.
Once confirmed, investigate each selected cop's FP/FN pattern in depth:
python3 scripts/investigate-cop.py Department/CopName --context --fp-only --limit 10
python3 scripts/investigate-cop.py Department/CopName --context --fn-only --limit 10
Run the delta reducer on up to 3 examples per cop (mix of FP and FN) to get minimal reproductions:
python3 scripts/reduce-mismatch.py Department/CopName repo_id filepath:line # FP
python3 scripts/reduce-mismatch.py Department/CopName repo_id filepath:line --type fn # FN
Pick examples from different repos when possible. The reduced files (typically 5–20 lines) go
to /tmp/nitrocop-reduce/ — read them and include them in the teammate prompt.
Summarize: cop name, repo-specific FP/FN, global FP/FN, minimal repro(s), root cause hypothesis.
Phase 2: Dispatch (you do this)
Create a team:
TeamCreate(team_name="fix-repo", description="Improve <repo-name> conformance")Create tasks for each cop fix.
Spawn one teammate per cop using the Task tool. Critical settings:
isolation: "worktree"— each teammate gets its own git worktreesubagent_type: "general-purpose"— needs full edit/bash accessteam_name: "fix-repo"mode: "bypassPermissions"— teammates need to run cargo test etc.
Each teammate prompt MUST include:
- The exact cop name (e.g.,
Lint/ConstantResolution) - The FP/FN counts (both repo-specific and global) and root cause hypothesis
- The minimal repro(s) from the delta reducer — paste the reduced Ruby source directly
- Whether to focus on FP fixes, FN fixes, or both
- A reminder that parallel-agent activity often leaves unrelated local modifications; those files are off-limits
- The teammate workflow (Phase 3 below) — paste the full instructions
- The exact cop name (e.g.,
Phase 3: Teammate Workflow (paste this into each teammate's prompt)
You are fixing false positives/negatives in a single nitrocop cop to improve corpus
conformance for a target repo. Follow the CLAUDE.md rules strictly.
**NEVER use git stash or git stash pop.** You are in an isolated git worktree — just commit directly.
Parallel-agent activity is common. If you see unrelated modified files, do not edit/revert them.
## Steps
1. **Read the cop source** at `src/cop/<dept>/<cop_name>.rs`
Read the vendor RuboCop spec at `vendor/rubocop*/spec/rubocop/cop/<dept>/<cop_name>
Установить fix-repo в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(*)ReadWriteEditGrepGlobTaskTeamCreateTaskCreateTaskUpdateTaskListTaskGetSendMessageВложенные файлы
FAQ
Что делает скилл fix-repo?
Improve a specific repo's corpus conformance by fixing its top diverging cops in parallel using worktree-isolated teammates.
Как установить скилл fix-repo?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fix-repo запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic