Post Refactor logo

Post Refactor

Community
akitaonrails
post-refactor

Post-refactor clean-code check after recent refactors or a few merged PRs. Use when the user says "post-refactor", "after the refactor", "we merged a few PRs", "clean code checks", or wants a focused sweep for regressions, vulnerabilities, duplicated abstractions, magic values, weak documentation, missing coverage, or flaky tests without running a full PR/post-merge audit.

Overview

Publisherakitaonrails
Repositorymy-skills
Skill namepost-refactor
Stars
268
Forks
31
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 akitaonrails on GitHub. Read the source before you install it.

Installation

Install the Post Refactor 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/akitaonrails/my-skills/tree/master/post-refactor
  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/akitaonrails/my-skills.git /tmp/my-skills
mkdir -p .claude/skills
cp -r /tmp/my-skills/post-refactor .claude/skills/post-refactor
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Post Refactor 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 Post Refactor 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 Post Refactor 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.

Post-Refactor Clean-Code Sweep

Use this skill after a refactor, cleanup series, or a handful of related PRs landed. It is not a full PR audit and should not re-litigate already merged work. Keep the pass focused on the code that changed recently and on defects that refactors commonly leave behind.

Primary goal: answer, "Did we leave the touched code cleaner, safer, and well covered, or did we leave regressions and cleanup debt behind?"

Scope

Pick the narrowest useful range:

  1. If the user names a range, use it exactly.
  2. Else, if a release just happened, inspect changes since the previous tag: git describe --tags --abbrev=0 HEAD^ → PREV_TAG..HEAD.
  3. Else, inspect the last 3-8 related commits or merged PRs.
  4. If the range spans unrelated areas, group by subsystem and review each group separately.

Do not expand into full architecture review unless a finding shows a real risk.

Workflow

1. Establish the changed surface

Collect:

  • commit range and shortlog
  • changed files grouped by subsystem
  • dependency/config/schema changes
  • tests added/changed
  • public/user-facing surfaces touched

Prefer cheap git commands and focused reads. Do not read the whole repository.

2. Run the local safety gate

Run the project's documented post-change checks. If none are documented, infer the normal formatter, lint/static-analysis, test, and security/dependency checks from the stack.

For Rust repos, prefer:

bash
cargo fmt --check
git diff --check
TAILWIND_SKIP=1 cargo test --workspace
TAILWIND_SKIP=1 cargo clippy --workspace --all-targets -- -D warnings

Run vulnerability/dependency checks when available (cargo audit, cargo deny, npm audit, bundle audit, etc.). Treat tool availability separately from findings: "tool not installed" is a validation gap, not a pass.

3. Review the changed code for refactor fallout

For touched implementation files, check:

  • regressions from changed behavior, defaults, serialization, migrations, auth, scope resolution, IO boundaries, or error handling
  • new unwrap, expect, panic, unreachable, broad catches, ignored errors, or lossy fallbacks in runtime paths
  • duplicated helpers or repeated logic that should be consolidated
  • over-abstraction: new traits/generics/public APIs that have only one real caller and no concrete need
  • magic values that should become named constants, config, or comments
  • stale comments/docs that no longer match behavior
  • hidden coupling between modules or crates introduced by the refactor
  • data loss, destructive operations, auth bypass, secret leakage, or unsafe path/scope handling

Bias toward practical clean-code fixes. Do not demand abstraction for one-off logic unless duplication is already causing drift or risk.

4. Review test quality and flake risk

Check whether changed behavior has focused tests. Look for:

  • missing regression tests for bug fixes or behavior changes
  • tests that assert implementation details instead of behavior
  • overly broad snapshot/golden tests that hide the meaningful assertion
  • sleeps/timeouts, wall-clock dependence, network dependence, shared global state, non-temp filesystem writes, randomized order, current-user/home-dir dependence, and cross-test pollution
  • tests that passed only because they were run individually

If a test looked flaky during the session, rerun that exact target once before classifying it. If it passes on rerun, report it as "observed transient" with evidence, not as definitively fixed.

5. Classify findings

Use these severities:

  • BLOCKING: likely regression, vulnerability, data loss, auth/scope bypass, failing gate, reproducible flake, or release/deploy blocker.
  • SHOULD-FIX: maintainability/test gap that is likely to grow or confuse the next change; duplicated logic with drift risk; missing focused test for a real behavior change.
  • NIT: cleanup/documentation/readability issue that is safe to defer.
  • OBSERVATION: verified healthy area or watch item with no required change.

Each finding must include:

  • file/path and line when available
  • why it matters
  • suggested fix or next check
  • whether it was verified by a command/test/read

6. Fix policy

Do not automatically edit code unless the user explicitly asks to fix findings. This skill is primarily a focused review/check. If fixes are requested, keep them small and run the relevant focused gate after each batch.

Specialist routing

  • Use @explorer for broad changed-surface mapping when the range touches many files.
  • Use @oracle for code review, maintainability, security, or flake-risk review of the changed surface.
  • Use @fixer only after findings are accepted and bounded implementation work is clear.
  • Use @designer only for user-visible UI/UX regressions.

Output format

Keep the final report compact:

markdown
## Post-refactor result

Range: <range>
Gate: <pass/fail/partial>

### Findings
- [SEVERITY] <file:line> — <issue>. <recommended action>

### Coverage / flake notes
- <summary>

### Clean-code notes
- <summary>

### Suggested next step
- <one concrete next action, or "none">

If there are no required changes, say so directly and list the checks that passed.

Frequently asked questions

What does the Post Refactor AI skill do?

Post-refactor clean-code check after recent refactors or a few merged PRs. Use when the user says "post-refactor", "after the refactor", "we merged a few PRs", "clean code checks", or wants a focused sweep for regressions, vulnerabilities, duplicated abstractions, magic values, weak documentation, missing coverage, or flaky tests without running a full PR/post-merge audit.

Why use Post Refactor on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/akitaonrails/my-skills/tree/master/post-refactor. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Post Refactor?

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 Post Refactor?

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

Is the Post Refactor AI skill free?

It is published on GitHub by akitaonrails. 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 👇