Baseline Restorer logo

Baseline Restorer

Organization
TheBushidoCollective
baseline-restorer

Use when multiple fix attempts fail and you need to systematically restore to a working baseline and reimplement instead of fixing broken code.

Overview

PublisherTheBushidoCollective
Repositoryhan
Skill namebaseline-restorer
Stars
195
Forks
20
Bundled files
Instructions only
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 TheBushidoCollective on GitHub. Read the source before you install it.

Installation

Install the Baseline Restorer 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.
  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/TheBushidoCollective/han.git /tmp/han
mkdir -p .claude/skills
cp -r /tmp/han/plugins/core/skills/baseline-restorer .claude/skills/baseline-restorer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Baseline Restorer 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 Baseline Restorer 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 Baseline Restorer 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.

Baseline Restorer

Enforces methodical problem-solving by reverting to last known working state and reimplementing step-by-step instead of trying to fix accumulated broken changes.

Core Philosophy

Reimplement, don't fix the mess

When something breaks after multiple failed fix attempts:

  1. Stop trying to fix forward
  2. Revert to last known working state
  3. Understand what worked and why
  4. Reimplement the needed change ONE step at a time
  5. Verify each step before proceeding

When to Use This Skill

Trigger conditions

  • 2+ failed fix attempts for the same issue
  • "This should work but doesn't" situations
  • Pipeline failures persisting across multiple commits
  • User says "the old version worked fine"
  • Complex accumulated changes with unclear impact

Red flags requiring this skill

  • Making assumptions about root cause without verification
  • Blaming "pre-existing issues"
  • Adding more changes to fix previous changes
  • Not testing locally before committing

Systematic Process

Phase 1: Identify Working Baseline

bash
# Find last known working state
git log --oneline -20
git show origin/beta:path/to/file.sh  # Check beta/main branch
git diff origin/beta -- path/to/file.sh  # What changed?

# Verify baseline works
git stash
git checkout origin/beta -- path/to/file.sh
# Test it - does it work?

Questions to answer

  • What was the last commit where this worked?
  • What branch has a working version? (beta, main, prod)
  • What specific files/scripts were working?

Phase 2: Compare Current vs Baseline

bash
# Get exact differences
git diff baseline..current -- path/to/file.sh

# Understand each change
# For EACH diff hunk, ask:
# - Why was this changed?
# - What problem was it trying to solve?
# - Did it actually solve that problem?

Document findings

  • List every change made
  • Note which changes were necessary
  • Note which changes broke things
  • Identify assumptions that were wrong

Phase 3: Revert to Baseline

bash
# Hard revert to working state
git checkout origin/beta -- path/to/file.sh
git add path/to/file.sh
git commit -m "Revert to working baseline from beta"

# Verify baseline works
./test-locally.sh
# Must pass before proceeding

Critical: Don't proceed until baseline is verified working.

Phase 4: Reimplement ONE Change at a Time

For each needed change

  1. Make ONE small change

    bash
    # Example: Replace sed with awk in ONE function
    # Don't change 5 things at once
  2. Test locally immediately

    bash
    ./run-generation-script.sh
    terraform validate
    # Must pass before committing
  3. Commit if working

    bash
    git add changed-file.sh
    git commit -m "Replace sed with awk in function X"
  4. If it breaks, revert immediately

    bash
    git reset --hard HEAD~1
    # Try different approach or understand why it broke
  5. Repeat for next change

Phase 5: Verify Complete Solution

bash
# Run full test suite
make test
terraform validate

# Compare with original broken state
# Did we achieve the goal without breaking things?

# Push only after local verification
git push

Verification Checklist

Before committing ANY change:

  • Tested locally and passes
  • Compared output with baseline (no unexpected differences)
  • Understood why this change is needed
  • Change is minimal and focused
  • Can explain what would break if this change was wrong

Anti-Patterns to Avoid

DON'T

  • ❌ "Let me try one more fix" (revert instead)
  • ❌ "This is probably a pre-existing issue" (verify with baseline)
  • ❌ "The logic should work" (test it, don't assume)
  • ❌ Change 5 things and hope one fixes it
  • ❌ Commit without local verification
  • ❌ Blame the user's code/environment

DO

  • ✅ "Let me check what worked in beta"
  • ✅ "Reverting to baseline first"
  • ✅ "Testing this one change locally"
  • ✅ Make ONE change, verify, commit
  • ✅ Test before every commit
  • ✅ Take responsibility for breakage

Examples

Example 1: Terraform Generation Scripts

Broken approach (Example 1)

bash
# Made 10 changes trying to "optimize" variable filtering
# Each fix broke something new
# Spent day+ debugging

Baseline approach (Example 1)

bash
# Check beta branch - does it work?
git show origin/beta:terraform/build-module.sh > /tmp/beta-version.sh
bash /tmp/beta-version.sh  # Verify it works

# Revert to beta version
git checkout origin/beta -- terraform/build-module.sh

# Now reimplement ONLY what's needed (e.g., sed→awk for portability)
# One function at a time, test each change

Example 2: Pipeline Failures

Broken approach (Example 2)

bash
# Assume it's a CI environment issue
# Try 5 different "fixes" based on guesses
# Each creates new errors

Baseline approach (Example 2)

bash
# Find last passing pipeline
git log --oneline | head -20
# Check what changed since then
git diff <last-passing-commit>

# Revert suspicious changes
# Test locally before pushing

Commands

bash
# Find working baseline
git log --oneline --all | grep "known working feature"
git show origin/beta:path/to/file

# Compare with baseline
git diff origin/beta -- path/to/file
git diff <working-commit> -- path/to/file

# Revert to baseline
git checkout origin/beta -- path/to/file
git checkout <working-commit> -- path/to/file

# Test locally
terraform validate
mix test
yarn test

# Verify no changes after running script
git diff  # Should be empty if script is idempotent

Remember

  • Reimplement, don't fix - Start from working state
  • One change at a time - Test each change immediately
  • Local verification first - Never commit untested changes
  • Baseline is truth - If baseline works, your changes broke it
  • Stop digging - After 2 failed fixes, revert and rethink
  • Question assumptions - Verify, don't assume
  • Take responsibility - Your changes, your bugs

Frequently asked questions

What does the Baseline Restorer AI skill do?

Use when multiple fix attempts fail and you need to systematically restore to a working baseline and reimplement instead of fixing broken code.

Why use Baseline Restorer on TypingMind?

Because you install it once and use it with any model. Baseline Restorer 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 Baseline Restorer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/TheBushidoCollective/han/tree/main/plugins/core/skills/baseline-restorer. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Baseline Restorer?

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 Baseline Restorer?

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

Is the Baseline Restorer AI skill free?

It is published on GitHub by TheBushidoCollective. Check the repository for licensing terms. 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 👇