Hai Razor logo

Hai Razor

Community
hylarucoder
hai-razor

Tests whether each requirement, step, role, field, state, module, layer, abstraction, or rule deserves independent existence, then classifies it as Keep, Merge, Defer, Delete, Replace, or Prove first. Use when the explicit decision is what can be removed or collapsed(奥卡姆剃刀、砍需求、这个字段/状态/层有必要吗、是否过度设计). Use hai-prd to shape product requirements and hai-architecture to redesign module boundaries after the cuts are known.

Overview

Publisherhylarucoder
Repositoryhai-stack
Skill namehai-razor
Stars
284
Forks
15
Bundled files
4
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.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

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

Installation

Install the Hai Razor 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/hylarucoder/hai-stack.git /tmp/hai-stack
mkdir -p .claude/skills
cp -r /tmp/hai-stack/skills/hai-razor .claude/skills/hai-razor
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Hai Razor 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 Hai Razor 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 Hai Razor 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.

Hai Razor

For Chinese readers, see SKILL.zh_CN.md. The English SKILL.md is the execution source of truth.

Overview

Audit the existence of product requirements, workflow steps, data fields, states, modules, layers, abstractions, service boundaries, and design choices, then classify each as Keep/Merge/Defer/Delete/Replace/Prove-first with evidence. The goal is not a smaller system — see Core Principle for the bar a concept must clear.

Core Principle

Every concept must earn its existence.

A thing deserves to exist only when removing it would break a real goal, erase a real distinction, hide an important risk, or push unavoidable complexity onto a worse owner. If a concept survives only because of habit, fear, symmetry, imagined future needs, or aesthetic completeness, cut it, merge it, defer it, or demand proof. Cutting real distinctions, safety, observability, permissions, migration paths, or a deep module that hides genuine complexity is not simplification — it is damage.

Razor Targets

Audit anything that claims a separate existence. The existence question is the lens for each type.

TargetExistence question
RequirementWhat user, business, operator, or maintainer pain proves this is needed?
Workflow stepWhat decision, transformation, or risk does this step own?
RoleWhat capability or responsibility is unique to this actor?
FieldWhat behavior, decision, audit, or invariant depends on this data?
StateWhat transition, permission, recovery path, or user meaning requires this state?
ModuleWhat complexity does this module hide from callers?
LayerWhat boundary does this layer protect, translate, or stabilize?
AbstractionWhat family of variation exists now, and what must callers no longer know?
RuleWhat failure, conflict, or decision would become ambiguous without it?

Classify Each Concept

After running the deletion test and finding the hidden owner (Workflow steps 4-5), assign every concept exactly one verdict.

DecisionUse when
KeepIt carries irreducible responsibility, protects correctness, hides real complexity, or preserves a needed distinction.
MergeIt has some value, but not enough independent meaning to justify its own name, module, field, state, or step.
DeferIt may become necessary, but current evidence is too weak and adding it now creates ballast.
DeleteIt does not protect a goal, invariant, decision, or meaningful distinction.
ReplaceThe responsibility is real, but the current shape is the wrong owner, boundary, name, or mechanism.
Prove firstThe concept may be necessary, but evidence is missing and the cost or risk is nontrivial.

Workflow

  1. Name the chain being cut. State the scope (PRD section, feature flow, data model, module boundary, architecture chain, or implementation plan), the current goal it claims to serve, and list every concept asking for independent existence.

  2. Gather evidence before judgment. Review the PRDs, docs, code, schemas, traces, tests, metrics, user flows, support cases, or decision records that bear on each concept. Separate evidence from inference — if a claim is plausible but unproven, label it an assumption or "prove first." Prefer concrete evidence about current behavior over imagined future extensibility. Every keep/cut/merge/defer/replace verdict needs a reason grounded in evidence, or an explicit statement that evidence is missing. For code-level over-engineering signals such as defensive over-checking, speculative parameters, pass-through layers, reimplemented standard behavior, or ceremonial error handling, consult references/llm-complexity-tells.md and apply its behavior-preservation gate before recommending a cut.

  3. Map the current chain when the cut is structural. Show before/after responsibility when a workflow, state machine, module chain, or service boundary materially changes. Use Mermaid only when it makes the ownership move clearer than a table or short explanation.

  4. Run the deletion test. For each concept ask: if this disappears, what concretely breaks? Distinguish "something feels less complete" from "a user goal, invariant, operation, safety property, or decision fails." If nothing breaks, the concept is suspect.

  5. Find the hidden owner. If the concept is removed, who must absorb its responsibility? If it moves to a worse place, the concept may deserve to stay. If an existing concept can absorb it with less cognitive load, merge it.

  6. Classify each concept using the decision table above. Give every concept exactly one verdict with its reason.

  7. Protect necessary complexity. Explicitly name what should not be cut: complexity that prevents invalid states, secures trust boundaries, supports recovery, improves observability, or hides implementation behind a deep interface.

  8. Attack the remaining design. Ask how future builders would reintroduce the deleted concept, and whether the cut creates hidden coupling, vague ownership, migration risk, or unclear acceptance. Add a guardrail: naming, test, doc boundary, acceptance criterion, architecture note, or follow-up proof.

  9. Render only when requested. The default deliverable is Markdown. If the user explicitly asks for HTML or a visual report, hand the completed judgment to hai-visual-report; do not duplicate its rendering workflow here.

Output

Read references/output-template.md before finalizing. The answer must contain, at minimum:

  • A razor verdict for the reviewed scope, the stated razor principle used, and an explicit not-audited scope (to prevent mis-cutting).
  • An evidence table, or a clear statement that evidence is missing.
  • A classification table mapping each concept to Keep / Merge / Defer / Delete / Replace / Prove first, with the strongest survival argument for anything cut.
  • The complexity that must be preserved.
  • A concrete cut list or prove-first list, plus risks and guardrails.

For structural cuts, include before/after ownership only when it materially improves understanding. HTML remains opt-in and belongs to hai-visual-report.

Use a different skill when

  • The target is a requirement document or product scope — use hai-prd.
  • The target is module boundaries, dependency direction, or abstraction depth — use hai-architecture.
  • The question is whether the whole idea is worth doing at all — use hai-idea.
  • The user wants the cuts turned into an execution plan — use hai-goal.

Common Mistakes

  • Cutting a concept because it is large, not because it is unnecessary.
  • Treating "future extensibility" as evidence without naming the expected variation.
  • Replacing a visible concept with a hidden convention and calling that simplification.
  • Keeping a concept only because it has a name, a file, a meeting, or an owner.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Hai Razor AI skill do?

Tests whether each requirement, step, role, field, state, module, layer, abstraction, or rule deserves independent existence, then classifies it as Keep, Merge, Defer, Delete, Replace, or Prove first. Use when the explicit decision is what can be removed or collapsed(奥卡姆剃刀、砍需求、这个字段/状态/层有必要吗、是否过度设计). Use hai-prd to shape product requirements and hai-architecture to redesign module boundaries after the cuts are known.

Why use Hai Razor on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hylarucoder/hai-stack/tree/main/skills/hai-razor. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Hai Razor?

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 Hai Razor?

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

Is the Hai Razor AI skill free?

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