Surgical logo

Surgical

Community
albertobarnabo
surgical

Forces Claude to match output scope exactly to what was requested. Triggers on any bounded coding request — "fix X", "add Y", "write a function/script that Z" — at the moment of writing each block, before adding anything the request didn't name: error handling for impossible edge cases, tests, docstrings, type annotations, CLI flags, config options, one-time abstractions, or refactors of surrounding code. Does NOT trigger when error handling, tests, or validation are the explicit subject of the request, or when the user asked for a complete or production-ready implementation. The best code is code you didn't write.

Overview

Publisheralbertobarnabo
Repositorylazy-cat
Skill namesurgical
Stars
50
Forks
1
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by albertobarnabo on GitHub. Read the source before you install it.

Installation

Install the Surgical AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/albertobarnabo/lazy-cat/tree/main/skills/surgical
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/albertobarnabo/lazy-cat.git /tmp/lazy-cat
mkdir -p .claude/skills
cp -r /tmp/lazy-cat/skills/surgical .claude/skills/surgical
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Surgical in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Surgical on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Surgical is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Surgical — Build Exactly What Was Asked

"Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." — Antoine de Saint-Exupéry

Every line of unrequested code costs twice: once to generate, once for the user to read and discard. Match the output scope to the request scope. Nothing more.

Override this skill immediately when:

  • The user explicitly asks for a complete or production-ready implementation
  • The request is for error handling, validation, or tests (those are the task, not scope creep)
  • Safety or security genuinely requires defensive code

The Rule

Before writing any function, class, or block, ask one question:

Did the user explicitly ask for this?
  YES → write it
  NO  → don't write it

What Scope Creep Looks Like

Error handling for cases that can't happen

python
# Asked: write a function that doubles a number
# Scope creep:
def double(n):
    if n is None:
        raise ValueError("n cannot be None")
    if not isinstance(n, (int, float)):
        raise TypeError("n must be numeric")
    return n * 2

# Correct:
def double(n):
    return n * 2

If the caller controls the input and None is impossible in context, the guards are noise.

Abstractions for one-time use

typescript
// Asked: format a date as YYYY-MM-DD in one place
// Scope creep:
class DateFormatter {
  constructor(private format: string) {}
  format(date: Date): string { ... }
  static forISO() { return new DateFormatter('YYYY-MM-DD'); }
}

// Correct:
const formatted = date.toISOString().split('T')[0];

Three similar lines is better than a premature abstraction.

Unrequested tests

If the user says "fix this bug", fix the bug. Don't add a test suite unless asked. If a test is genuinely critical to safety, ask first rather than adding silently.

Refactoring surrounding code

If the task is to fix function A, don't rename variables in function B, reorder imports, or clean up unrelated logic. The user can't easily review what they didn't ask for.

Future-proofing nobody requested

python
# Asked: save user preferences to a file
# Scope creep:
def save_prefs(prefs, backend="json"):
    if backend == "json": ...
    elif backend == "sqlite": ...   # nobody asked
    elif backend == "redis": ...    # nobody asked

# Correct:
def save_prefs(prefs):
    with open(PREFS_PATH, "w") as f:
        json.dump(prefs, f)

Don't design for hypothetical future requirements.


The Scope Test

Before each block, run three checks:

[ ] Is this in the task description?
[ ] Would removing this break what was asked for?
[ ] Would a reviewer ask "why is this here"?

If the first is NO, or the third is YES — cut it.


Legitimate Additions

Some additions are genuinely necessary even when not requested:

  • A required import the task clearly needs
  • A type annotation that removes ambiguity
  • A single line preventing an obvious crash the user would hit immediately
  • A single line preventing obviously wrong output (e.g. a timezone offset that would produce incorrect dates in the caller's context)

For anything beyond these, surface it explicitly:

"I can also add X — want me to include it?"


When NOT to Guard Scope

Override this skill when:

  • The user explicitly asks for a complete, production-ready implementation
  • Safety or security genuinely requires defensive code
  • The addition is one line and unmistakably necessary

Output Contract

Every response that delivers code under this skill closes with two lines:

Done: <what was changed/built, one line>
Left out: <what was deliberately not added — tests, validation, flags — or "nothing">

The "Left out" line is the enforcement mechanism: it forces the scope decision to be explicit instead of silent, and it hands the user a one-word path to expand scope if they want to ("add them").

Build exactly what was asked. Never silently expand the scope.

If scope is genuinely ambiguous — ask the user one targeted question before writing any code.

Frequently asked questions

What does the Surgical AI skill do?

Forces Claude to match output scope exactly to what was requested. Triggers on any bounded coding request — "fix X", "add Y", "write a function/script that Z" — at the moment of writing each block, before adding anything the request didn't name: error handling for impossible edge cases, tests, docstrings, type annotations, CLI flags, config options, one-time abstractions, or refactors of surrounding code. Does NOT trigger when error handling, tests, or validation are the explicit subject of the request, or when the user asked for a complete or production-ready implementation. The best code...

Why use Surgical on TypingMind?

Because you install it once and use it with any model. Surgical is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Surgical in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/albertobarnabo/lazy-cat/tree/main/skills/surgical. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Surgical?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Surgical?

As many as you like. As long as a model supports skills, you can use Surgical with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Surgical AI skill free?

Yes. It is published on GitHub by albertobarnabo under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇