opportunistic-fixes

opportunistic-fixes is a skill for Claude Code from Fergius-Engineering/instincts. It costs 35 tokens per session (533 once invoked), scanned A, original, MIT.

A rule for handling small correctness problems noticed while editing a nearby part of a project, such as an outdated comment or documentation line.

In plain words
What is it for?
Use it to verify the incidental problem, point it out, ask whether it belongs in the current change, and fix it only after approval.
Why use it?
It prevents known mistakes from being ignored or silently changed outside the requested work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the instincts plugin — 20 skills, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fergius-engineering/instincts/opportunistic-fixes
Any agent
npx skills add Fergius-Engineering/instincts --skill opportunistic-fixes
Clone the repo
git clone --depth 1 https://github.com/Fergius-Engineering/instincts

Made for: Claude Code.

Or install instincts, the plugin that ships this one along with the rest of its 20 skills, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for opportunistic-fixes

README.md
[![agentmods](https://agentmods.dev/badge/skills/fergius-engineering/instincts/opportunistic-fixes.svg)](https://agentmods.dev/skills/fergius-engineering/instincts/opportunistic-fixes)
Your own site
<a href="https://agentmods.dev/skills/fergius-engineering/instincts/opportunistic-fixes"><img src="https://agentmods.dev/badge/skills/fergius-engineering/instincts/opportunistic-fixes.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 533 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.00533
Opus 5 $0.00017 $0.00267
Sonnet 5 $0.00007 $0.00107
Haiku 4.5 $0.00003 $0.00053

Measured 6d ago against content hash 52d5c78d1df3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

opportunistic-fixes scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/opportunistic-fixes/SKILL.md · 29 lines

How it starts

The opening of the file, as written. The whole thing — 29 lines — stays where its author put it; the contents beside it link to each section on GitHub.

The rule

While you're already working in an area, you'll spot small things that are wrong but aren't your task. A comment that describes old behavior, a doc line that drifted from the code. Don't silently ignore them, and don't silently fix them either: point them out, ask if the fix belongs in this change, and only then do it, staying inside the area you're already in. This is not a license to go hunting for unrelated refactors — it's a refusal to leave a known-wrong thing behind without saying so.

Fires when

You're editing a file or area for one task and notice a separate, incidental correctness problem nearby.

How to apply

Name the thing you noticed and where it is. Ask whether to fix it as part of the current change. On a yes, fix it and say what you changed. Keep it to the area you're already touching. If the fix would pull you into unrelated code, that's a new task, not an opportunistic fix. A bug you hit in your own shared code isn't opportunistic either — that's fix-in-the-shared-layer. Check the thing is actually wrong against the code before you flag it, so you don't "correct" something that was already right.

Worked example

You're editing a function to add a parameter. Right above it, the doc comment still says it returns a list, but the code has returned a map for two versions. You're already here, so it's cheap. Say so: "While I'm in this function, the comment above it is stale. It says list, the code returns a map. Want me to fix it in this change?" On a yes, fix it and mention it. Leaving a known-wrong comment because it wasn't the task is how a codebase rots, one ignored line at a time. Silently rewriting nearby code without asking is how a small change turns into a surprise diff the user didn't want. Surfacing it first avoids both.

Red flags

Thought Reality
"Not my task, leave it" A known-wrong line you ignore is rot you chose to keep.
"I'll just fix it while I'm here" (silently) Surface it and ask first. A surprise diff erodes trust.
"While I'm at it, let me refactor this whole module" That's a new task, not an opportunistic fix. Stop.

Read the full file on GitHub · 29 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 29 lines · 35 tokens per session scan A 52d5c78d1df3

Subscribe to this mod's changes

opportunistic-fixes is a skill published in the GitHub repository Fergius-Engineering/instincts (2 stars, last pushed 11d ago), licensed MIT. It adds 35 tokens to every session and 533 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

stuck

Diagnose frozen, stuck, or slow Qwen Code sessions on this machine. Scans for problematic processes, high CPU/memory usage, hung subprocesses, and debug logs. Use /stuck or /stuck to focus on a specific process.

QwenLM/qwen-code · 57 tokens

agenttrace-session-audit

Audit local AI coding-agent sessions with agenttrace for cost, tool failures, latency, anomalies, health, diffs, and CI gates.

sickn33/agentic-awesome-skills · 34 tokens

systematic-debugging

Skill "systematic-debugging" from jnMetaCode/superpowers-zh, covering 系统化调试, 概述, 铁律, 何时使用 and 四个阶段.

jnMetaCode/superpowers-zh · 24 tokens

investigate

Systematic debugging with root cause investigation. Four phases: investigate, analyze, hypothesize, implement. Iron Law: no fixes without root cause. Use when asked to "debug this", "fix this bug", "why is this broken", "investigate this error", or "root cause analysis". Proactively invoke this skill (do NOT debug…

GCWing/BitFun · 112 tokens

hns-lsel-curator

Local Self-Evolution Loop (LSEL) curator — the CLUSTER + drain engine for the GOOS-local PROPOSE→APPLY seam closure (SPEC-LSEL-LOCAL-EVOLUTION-001). Companion-offset drain of .moai/lessons-inbox.jsonl with a drain-side severity filter that drops the 65% Bash-timeout/sandbox noise, eventkey clustering with a frequency…

modu-ai/moai-adk · 135 tokens

anti-entropy-governance

Use when touching retiring old logic, collapsing duplicate owners, removing fallbacks, or schema/persistence/source-of-truth boundaries; identify opportunities automatically; destructive execution requires explicit confirmation.

GanyuanRan/Aegis · 42 tokens