Logo vun Add Rule

Add Rule

Organisatioun
uiverify
add-rule

Turn a code-owner correction (or a recurring mistake) into a durable rule - the right conventions-doc edit, and a real failing lint guard whenever the rule is mechanically checkable. This is the self-improving loop the factory leans on - when something goes rogue, capture it so the linter/conventions-doc catches it next time instead of a human re-explaining it. Also runs as a weekly sweep over recent merged work. Use when asked to "/add-rule", "turn this into a rule", "make sure this never happens again", "capture this correction", "add a lint guard for X", or "do the weekly rule review".

Iwwersiicht

Editeuruiverify
Repositoryuiverify
Skill-Nummadd-rule
Stären
27
Forks
1
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum uiverify op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Add Rule an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/uiverify/uiverify/tree/main/packages/workflow-skills/skills/add-rule
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/uiverify/uiverify.git /tmp/uiverify
mkdir -p .claude/skills
cp -r /tmp/uiverify/packages/workflow-skills/skills/add-rule .claude/skills/add-rule
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Add Rule an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Add Rule automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Add Rule net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

/add-rule - capture a correction as a durable, enforced rule

When you (or a reviewer, or CI) correct the same class of mistake twice, that's a rule waiting to exist. This skill turns a correction into something durable: the right conventions-doc edit (a CLAUDE.md / AGENTS.md, root or a subtree's own), plus a real failing guard whenever the rule can be checked mechanically. "The linter is law" only means something if new laws actually get written - this is how they do. It's the manual, on-demand version of the self-improving loop, and the thing /factory and /babysit-pr call when a failure generalizes.

Two modes:

  • Point mode (default): the argument (or the recent conversation) is a specific correction - "stop hand-writing route paths", "always colocate a route.test.ts", "don't put an em dash in shipped copy". Capture that one.
  • Sweep mode (/add-rule sweep): the weekly pass. Scan recent merged PRs, review outputs, and corrections from recent sessions for patterns worth codifying, and propose a batch. (This replaces a scheduled cron - you're one developer; run it when you feel the drift.)

Execute directly - do not enter plan mode. Always land on a concrete proposal, then act on the user's yes.

Step 0 - Route the correction (is this even a code rule?)

A correction has one of three homes - pick before you write anything:

  • A code / codebase-convention mistake ("stop hand-writing route paths", "colocate the route.test.ts", "batch this, don't await per story") → this skill: a conventions-doc rule + a lint guard. Continue to Step 1.
  • A how-you-work / process preference ("stop asking so many questions", "give me a recommendation not a survey", "don't over-explain", "always run the tests before saying done") → not a lint rule. Save it wherever your harness persists cross-session guidance with the why and how-to-apply, so it carries across sessions. If it's specifically about working in your repo, also add it to the root conventions doc's engineering conventions. Then stop - Steps 1-6 below are about mechanical code rules and don't apply.
  • A genuine one-off (a typo, a this-once preference with no plausible recurrence) → just fix the instance and move on. Say so; don't manufacture a rule.

The rest of this skill is the code-rule path.

Step 1 - State the rule in one sentence

Compress the correction to a single "when X, do Y (not Z)" with the why. If you can't state it crisply, it's not a rule yet - ask the user to sharpen it, or drop it. A rule that's really a one-off typo (no plausible recurrence) is not worth capturing; say so and stop.

Step 2 - Pick the enforcement layer (prefer mechanical over prose)

The order of preference - a machine catches it before a human has to:

  1. Linter rule (your linter - ESLint, oxlint, …)
    • if it's an AST/type pattern your linter already has a rule for (like the existing no-explicit-any / no-non-null-assertion). Cheapest and fastest.
  2. Import-boundary rule (your import-boundary tool - dependency-cruiser, an ESLint boundaries plugin)
    • if it's an import boundary (who may import what). Add a forbidden entry with severity: "error" and a comment.
  3. Custom guard script (point at your own custom-lint script, or create a small one) - if it's a prose/regex-checkable convention your linter can't express (an inline route path, a missing colocated test, a banned string in shipped copy). Add a guard following the script's existing shape: a name, the rule text, a fix hint, and a run() that returns the list of violations (each with its file, line, snippet, and detail).
  4. Prose-only conventions-doc rule - only when it genuinely can't be mechanized (a judgment call, a design-taste rule). Prose is the fallback, not the default.

A mechanical guard MUST be zero-false-positive on the current tree - it runs on every push, and a noisy guard trains everyone to ignore your linter/guard. If the clean-tree state already has violations you can't cheaply fix, either fix them as part of this change, scope the guard tighter, or fall back to prose and say why (this is exactly why a rule with many pre-existing intentional hits stays prose - e.g. an em-dash ban with hundreds of pre-existing hits, including intentional ones).

Step 3 - Place the rule in the right conventions doc

Match scope to file - a rule enforced in the wrong file gets missed:

  • General engineering principle (types, tests, performance, comments) → your root conventions doc.
  • A framework / app-surface convention (a particular app or subtree) → that subtree's own conventions doc.
  • A package-specific convention → that package's own conventions doc (create one only if the package genuinely needs standing rules; don't spawn empty files).

Write it in the house voice: dense, a bolded "when X do Y" lead, the why stated (a hidden invariant, a real trade-off), and a pointer to the guard/decision that enforces or justifies it. Match the surrounding bullets - don't tack on a differently-styled section.

Step 4 - Wire prose ↔ guard together

If you added a mechanical guard, the conventions-doc rule should name it ("...enforced by ") and the guard's rule/fix strings should point back at the conventions-doc rule - so a future reader finds one from the other. They are a pair; never add one without the other when the rule is mechanizable.

Step 5 - Prove it, then propose

Before presenting: run the guard/lint on the current tree and confirm it's green (no false-positives), and - for a guard - construct one throwaway example to confirm it actually fails on a real violation (don't ship a no-op guard). Run your linter/guard to confirm the whole chain still passes.

Then present the concrete change for the user's OK: the one-sentence rule, the layer you chose and why, the exact conventions-doc diff, and the guard diff if any. Only write on a yes ("adds a rule agreed"). If the user amends it, fold that in and re-confirm.

Step 6 - Offer the decision-log note

If this rule reflects a real decision (you chose a convention, reversed one, learned something that changes the plan), offer to add an entry to your decision log, if you keep one, per your conventions doc's "ask, don't assume" policy - don't write it unprompted.

Guardrails

  • Confirm before writing. This skill proposes; the user's yes is the gate.
  • No noisy guards. Zero false-positives on the clean tree, or it's prose.
  • Don't over-rule. Codify recurring, generalizable mistakes - not every one-off. Fewer, sharper, enforced rules beat a wall of prose no one reads.
  • Prose and guard travel together when the rule is mechanizable.

Heefeg gestallte Froen

Wat mécht de KI-Skill Add Rule?

Turn a code-owner correction (or a recurring mistake) into a durable rule - the right conventions-doc edit, and a real failing lint guard whenever the rule is mechanically checkable. This is the self-improving loop the factory leans on - when something goes rogue, capture it so the linter/conventions-doc catches it next time instead of a human re-explaining it. Also runs as a weekly sweep over recent merged work. Use when asked to "/add-rule", "turn this into a rule", "make sure this never happens again", "capture this correction", "add a lint guard for X", or "do the weekly rule review".

Firwat Add Rule op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Add Rule besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Add Rule an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/uiverify/uiverify/tree/main/packages/workflow-skills/skills/add-rule an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Add Rule benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Add Rule benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Add Rule domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Add Rule gratis?

Jo. De Skill gëtt vum uiverify ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇