Skip to content
Agentmart
Submit a tool

fix-with-spec

Fix a bug or adjust existing behavior in code AND keep its OpenSpec capability spec consistent, in any OpenSpec-managed repo under whatever schema that repo…

Skill by Kotivskyi

IndexedMIT
Write a review

Chalk Labs

Need help deploying fix-with-spec?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/kotivskyi-fix-with-spec

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Fix a bug or adjust existing behavior in code AND keep its OpenSpec capability spec consistent, in any OpenSpec-managed repo under whatever schema that repo uses. Use whenever the user types /fix-with-spec, or makes the two-part "fix X and keep the spec / scenario / capability in sync" request: a wrong status code, an off-by-one or validation bug, an auth guard accepting the wrong tokens, a flaky health check, a UI misbehaving. Also covers "fix the code; does the spec need to change?" and "patch this and update the openspec change/delta". Its one real job is the spec-consistency decision: most quick fixes need no spec change, some need a surgical delta on an active change, a few touch an archived spec and need a new change. NOT for pure diagnosis with no code change (use diagnosing-bugs alone), and NOT for net-new capabilities or large contract changes (use /opsx:propose).

Use cases: documents, design, security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/fix-with-spec

What's inside

Skill name
fix-with-spec
Description
Fix a bug or adjust existing behavior in code AND keep its OpenSpec capability spec consistent, in any OpenSpec-managed repo under whatever schema that repo uses. Use whenever the user types /fix-with-spec, or makes the two-part "fix X and keep the spec / scenario / capability in sync" request: a wrong status code, an off-by-one or validation bug, an auth guard accepting the wrong tokens, a flaky health check, a UI misbehaving. Also covers "fix the code; does the spec need to change?" and "patch this and update the openspec change/delta". Its one real job is the spec-consistency decision: most quick fixes need no spec change, some need a surgical delta on an active change, a few touch an archived spec and need a new change. NOT for pure diagnosis with no code change (use diagnosing-bugs alone), and NOT for net-new capabilities or large contract changes (use /opsx:propose).
License
MIT
Instructions
200 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • trigger-eval.json · evals/

SKILL.md (first lines)

# /fix-with-spec — plan, approve, then keep OpenSpec specs consistent, fast

Your one job: make the fix and leave the capability's spec **consistent** with it, with
the **least ceremony that fits the risk** — and **never touch code or specs until the
user has approved a plan**. **Fix time matters — do not spawn OpenSpec ceremony you don't
need.** Most fixes need no spec change at all.

This skill is **repo-agnostic**: it does not assume a particular OpenSpec schema, area
layout, or sync script. It discovers all of that from the OpenSpec CLI at runtime
(`openspec schemas`, `openspec list --specs`, `openspec instructions …`). That is what
lets the same skill serve a project on the stock `spec-driven` schema and one on a
bespoke, area-aware schema with a custom sync helper.

The invariant that constrains you in **every** OpenSpec repo: the applied specs under
`openspec/specs/**` are a **generated mirror of change deltas** — never hand-edit them. A
spec changes only by putting a delta inside a *change* and running that schema's apply
step (plain `openspec archive`, or a schema-bundled sync helper + archive — the schema's
`openspec schemas` description tells you which; see below).

## Hard dependencies — invoke, don't rebuild

This skill orchestrates three skills. When the flow reaches their job, **invoke them**; do
not re-implement their logic inline.

- **`diagnosing-bugs`** — reproduce-and-locate for anything whose root cause isn't obvious.
  Ships in this same plugin, so it travels with `/fix-with-spec` wherever it's installed.
- **`tdd`** — the red→green discipline for the actual fix. Also bundled in this plugin.
- **`/opsx:propose`** — the OpenSpec project's own proposal workflow, for net-new
  capabilities or broad contract changes. This one is **not** bundled — it belongs to the
  OpenSpec-managed repo. When the spec-path decision lands here, you **stop and hand off**
  to it rather than treating the work as a fix.

If one of these isn't present in the session, say so in the plan instead of silently doing
its job by hand — a missing skill changes the risk picture the user is approving. (The
likely gap is `/opsx:propose`, since the bundled two travel with this skill.)

## The gate: plan before you touch code

**Every run passes through this gate before any edit — even a one-liner.** The plan is
lean (two lines), so a trivial fix costs one approval, not ceremony. The point is to get
sign-off on the skill's one real judgement call — the spec path — *before* anything
changes.

1. **Investigate read-only.** Plan mode forbids edits — lean into that. Reproduce or
   locate the bug (running existing tests is fine; reach for `diagnosing-bugs` if the
   cause is unclear), locate the capability (below), and make the spec-path decision
   (below). No test-*writing* yet — authoring a repro test is an edit, so it waits for
   approval.

2. **Present the lean plan and wait for approval.** Use plan mode's native approval gate:
   write the plan, then call `ExitPlanMode` (enter plan mode first with `EnterPlanMode` if
   you aren't already in it). Keep it to two lines:
   ```
   Fix:  <what changes + file>
   Spec: <No change | surgical delta on <active-change> | minimal/full new change via <schema>> → <area-or-cap>
   ```
   `ExitPlanMode` *is* the approval — don't ask "is this plan OK?" some other way.

3. **On approval, implement** (below). If the user redirects, fold it in and re-present
   the plan; don't start editing until they approve.

## The spec-path decision

This is what you settle in step 1 and what fills the plan's **Spec:** line. State your
answer + the capability; proceed unless it's genuinely ambiguous.

**Does this fix change what a spec SAYS** (a capability's documented behavior or contract)?

| Spec change? | Who owns the capability | Plan's Spec line → action |
|---|---|---|
| **No** | — | **No change** — most fixes land here; don't manufacture spec work. |
| **Yes** | an active change | **Surgical delta** — patch that change's delta + `tasks.md` in place; it carries itself forward (you don't archive it; its own apply implements). |
| **Yes** | archived only — fix is small / low-risk / obvious | **Minimal new change** *(default)* — scaffold a change on the right schema, author **only the delta**, apply, archive. |
| **Yes** | archived only — **+ an escalation trigger** | **Full new change** — run the schema's artifact flow to persist the audit trail (proportionately). |
| **Net-new capability / broad contract change** | — | **Stop → `/opsx:propose`** — that's not a fix; say so in the plan instead of editing. |

**Answer the spec-change question *before* the ownership question — and don't pollute an
unrelated active change.** The "active change → surgical delta" row assumes the active
change is the *natural home* for your fix. Often it isn't: a change can own a capability's
spec while being about something entirely different (an `increment/archive` change that
happens to own `pasture-management`), or the capability may have **no applied spec yet** —
it exists only as that in-flight change's delta. Before reaching for surgical-delta,
confirm your fix genuinely sits within that change's scope. If it doesn't, grafting your
scenario onto it pollutes someone's in-flight work — prefer **No change** (when no spec
actually asserts the behavior you're fixing), or defer a standalone change until the
in-flight one lands. The point of asking "does a spec *say* this?" first is exactly to
avoid being railroaded into editing the wrong change.

**Escalate minimal → full only if a trigger applies (otherwise stay minimal):**
- a real **bug / regression / incident** where persisting reproduce→test evidence + a
  named regression test matters (security, data integrity, a prod incident, a
  hard-to-reproduce flake);
- the fix needs a **migration or rollback** plan;
- it **spans multiple capabilities** or has non-obvious design trade-offs worth recording;
- **root cause is uncertain** and reproduce-before-fix discipline de-risks it.

Default is **minimal**. Escalating without a trigger re-introduces the ceremony cost this
skill exists to avoid; minimal still *proves* the fix (implement step 1) — it just
doesn't persist the proof as artifacts.

## Discovering schemas and locating the capability (quick, generic)

Don't assume schema names or a particular spec layout — ask the CLI:

- **Schemas available + the project default:** `openspec schemas` lists every schema with
  a description (which is bug-oriented, which is feature/behavior-oriented, which needs a
  bundled sync helper). The project default is the `schema:` key in
  `openspec/config.yaml` (used when you omit `--schema`).
- **Capabilities + their specs:** `openspec list --specs`, then `openspec spec show <id>`
  to read the applied spec. If the repo keeps an area map (e.g.
  `openspec/specs/README.md`), use it as a shortcut — but treat it as a hint, not a
  requirement; the CLI is the source of truth.
- **Active changes (ownership):** `openspec list` shows active changes. A change owns a
  capability if it carries a `specs/.../<cap>/spec.md` delta for it (read its
  `.openspec.yaml` for the schema); then it's the **surgical-delta** path. Otherwise only
  the archived mirror owns it → **new change** path.

**Routing a new change to a schema:** match the fix to the schema whose description fits —
a bug-oriented schema if the repo has one, otherwise the project default for an intended

From Kotivskyi/skills, MIT.

More from Kotivskyi/skills

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Sep 16, 2026 (1 month ago)
Last release
Jun 22, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Kotivskyi

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get fix-with-spec running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying fix-with-spec?

CallGet help
Cite this page

fix-with-spec skill. Agent Mart. https://agentmart.dev/skills/kotivskyi-fix-with-spec (last updated 2026-10-24)