playful-design/router

rule

Turns a repeated correction into a short project rule with the broken and fixed line, then applies it to existing code.

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/playful-design/router --skill rule

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

Rule

This skill turns a correction into a written rule. It writes the rule once in the right file, then fixes the code that already breaks it.

Twice is a rule

When the user says "make it a rule", "always", "never" or "remember this", write it down. When they correct the same thing twice, propose a rule. A rule is a pair, short enough to read before every edit.

Following the rules while editing belongs to scope. Reviewing a codebase against all of them runs in audit.

1. Read what exists

Read AGENTS.md, CLAUDE.md and the editor rule folders before acting. Acting against a written rule is rule-read-before-acting.

2. Write the pair

State the rule in one sentence, then the broken line and the line that replaces it. A rule with no example is rule-write-the-pair.

3. Keep it short

One rule is one to three sentences plus its pair. A paragraph of reasoning is rule-keep-it-short.

4. Give it one home

Put the rule in the file that owns its topic. Copying it into a second file is rule-one-home. When a new rule contradicts an old one, replace the old one and say so. Two contradicting rules left side by side is rule-resolve-conflicts.

5. Sweep the code

Search for code that breaks the new rule, fix it and list the files. A rule written with old violations left in place is rule-sweep-existing.

The pair

Every check is a pair. The broken line sits beside the line that replaces it.

RuleBrokenReplacement
rule-read-before-actingA pill button added in a repo whose rules forbid pillsRules read first, rounded button
rule-write-the-pair"Use good casing""Labels take Title Case. Add to library becomes Add to Library"
rule-keep-it-shortA paragraph of reasoningOne sentence and a pair
rule-one-homeOne rule in three filesOne file, the others point at it
rule-resolve-conflicts"Use borders" beside "never use borders"The old rule replaced, the change noted
rule-sweep-existingThe rule added, twelve violations leftThe violations fixed and listed

Reporting

Severity. HIGH is an edit that breaks a written rule, or two rules that contradict. MEDIUM is a rule with no pair, or old violations left after a new rule. LOW is a rule longer than it needs.

Format. One finding per root cause:

file:line - [rule-id] what is wrong

Then a Rule | Count | Severity summary. Block when any HIGH remains, Approve otherwise. Mark every rule file you could not read as Not verified.

同じリポジトリから

関連する Skills

すべての Skills
playful-design
コミュニティ

alignment

Measures a running page for edges, gaps, centring and radii that miss by a pixel or two, then judges visual weight and returns a numbered report with proof.

1時間の導入数
2
GitHub Stars
13
更新日
11月5日
playful-design
コミュニティ

animate

Build an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations.

1時間の導入数
2
GitHub Stars
13
更新日
11月5日
playful-design
コミュニティ

animate-expo

Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web a

1時間の導入数
2
GitHub Stars
13
更新日
11月5日
playful-design
コミュニティ

animation-performance

Keep web animations inside the frame budget — animate composite-only properties, keep motion off the main thread when the page is busy, and find the cause when an animation drops frames. Covers the layout/paint/composite pipeline, cheaper property swaps, CSS vs WAAPI vs requestAnimationFrame, Motion's hardware-accelerated path, React re-rendering per frame, inherited CSS variable recalculation, blur cost, and when will-change actually helps. Use when an animation is janky, choppy, stutters, or d

1時間の導入数
2
GitHub Stars
13
更新日
11月5日