/kyant:write-rulefrom kyant
Formalizes repeated mistakes, owner decisions, or review findings into enforceable rules with tiered enforcement (type, lint, policy test, doc). Use when adding to AGENTS.md, design-language rulebooks, or ~/.claude/rules.
Ships in kyant. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A rule that lives only in prose gets broken by the next agent that did not read it. Pick the strongest enforcement that is cheap, then write the shortest text that still carries the why.
Write a rule only if all three hold; otherwise fix it in the code or drop it:
| Tier | Use when | Example |
|---|---|---|
| Type / compiler | the wrong call can be made unrepresentable | a control's props omit the thing callers must not set |
| Lint rule | a syntactic pattern, no legacy debt or an allowlist | no electron import in the renderer |
| Policy test | a repo-wide scan, a count that may only fall (ratchet) | no new button class family; docs and stylesheet stay in sync |
| Doc only | judgement, taste, an invariant no tool can see | "no continuously repainting animation" |
Say the tier in the rule or in the commit. "Doc only" is a legitimate answer, but name it so a later reader knows nothing will catch a slip.
Check how the repo runs lint before choosing it: a hook that runs --quiet on changed files
silences warnings and fails on every touched legacy file. With legacy code, prefer a ratchet
test (baseline file, count may only go down) or a lint rule with a shrinking allowlist.
For a lint tier, measure before enabling: skill quality-gates, module probe, counts the
hits per rule per path group, unscoped and scoped. A warn level is no ratchet when the hook
is quiet and CI fails only on errors. Exempt legacy files by name at error level, give each
exemption a comment, and add a test that every named exemption still exists. An override
replaces the rule's options for the files it matches, so repeat the existing entries in it.
One bullet, in this order, no preamble:
src/").Do not write: history ("we used to"), a list of every case, a rule that restates a type signature, or a claim that a test exists before it does.
AGENTS.md (numbered, short).~/.claude/rules, never a project file.Rules describe current behaviour: if the enforcement lives on an unmerged branch, write the rule on that branch.
Run the repo's doc and policy checks on the touched files; confirm each link resolves and each cited rule number exists. Report the tier chosen and anything left doc-only.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
rule-writing, enforcement-tiers, lint-rules, policy-tests, agent-rules
8 skills in this plugin
/diagnosing-bugsInvestigate reported bugs, failing tests, unexpected behavior, and performance regressions before fixing them. Build evidence for the cause and verify the original symptom. For read-only reviews, use only the evidence discipline and preserve the read-only scope./kyant-intentFind out what the user actually wants before any plan, spec or code exists, when an ask hits a W1 threshold with unclear intent or the user calls /kyant-intent. Runs Read → Ask → Dig → Stop → Lock, one question per turn with a guess attached, until ~95% confidence; ends in a restate the user confirms. Pre-decision only; to stress-test a plan or decision that already exists, use grilling./kyant-kanbanWork with the owner's task vault (Tolaria vault `kanban`) in four moves — create a task note, start a task from its note, close a task as Done, reconcile notes with GitHub issues. Use when the owner says "thêm vào kanban", "lưu task này", "làm task X", "đóng task", "sync kanban", names a note in the vault, or asks what is on the board. Procedure only; the schema lives in the vault's AGENTS.md./quality-gatesRouter for UI and code quality gates — study how a reference repo enforces quality, measure a lint rule's noise before enabling it, install lint/test gates (suppression reasons, unreasoned skips, shadcn/Tailwind design-system checks, focus-ring and import boundaries), define a shared UI control that owns its look, capture light/dark state sheets for eye review, and review a UI diff for what lint cannot see. Use when setting up quality checks in a project, adopting a UI preset or registry, adding or reshaping a shared control, a feature restyling a shared component with its own class, changing focus or selection styling, or before committing UI changes. Not for building a screen or judging its look (kyant-ui-rules and the owner's eye)./scaffold-projectScaffold a new project repo end to end — official generator, folder layout from the global structure template, lint/format, AGENTS.md, first commit, verified build. Use when the user wants to start, init, bootstrap or create a new app/repo. Covers Next.js App Router today; other stacks follow the structure template and ask first. Not for adding a framework to an existing repo./tidy-gitGit hygiene for a user who rarely opens git or GitHub — summarize the dirty worktree and open PRs/issues in one picture, then commit, merge ready PRs or close done issues via `git`/`gh` after one approval. Use for "tidy", "dọn", "worktree bẩn", "diff lộn xộn", "merge PR", "còn PR/issue nào mở", "commit push đi", "push all code diff", "merge vào main đi", or at the end of a session with uncommitted work or an open PR. Not for code review (built-in /code-review), PR content (CLAUDE.md branching) or `.issues/` files (gh-issue-sync).npx claudepluginhub mxrsv/agents-skills --plugin kyantOther plugins' skills for the same job