add-pattern

add-pattern is a skill for Claude Code from leefanv/omit-design. It costs 105 tokens per session (1,078 once invoked), scanned A, original, MIT.

Instructions for creating a reusable design pattern in a project, including its metadata, starter code, and usage notes.

In plain words
What is it for?
Use them when adding a new page pattern, such as an approval queue, or when an existing design task does not fit the available patterns.
Why use it?
They prevent new interface designs from being created without a matching structure, and define a short question-based process when no suitable pattern exists.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use them when adding a new page pattern, such as an approval queue, or when an existing design task does not fit the available patterns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leefanv/omit-design/add-pattern
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add leefanv/omit-design --skill add-pattern
Clone the repo
git clone --depth 1 https://github.com/leefanv/omit-design

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-pattern

README.md
[![agentmods](https://agentmods.dev/badge/skills/leefanv/omit-design/add-pattern/github.svg)](https://agentmods.dev/skills/leefanv/omit-design/add-pattern)
Your own site
<a href="https://agentmods.dev/skills/leefanv/omit-design/add-pattern"><img src="https://agentmods.dev/badge/skills/leefanv/omit-design/add-pattern/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-pattern

Your own site · 80×15
<a href="https://agentmods.dev/skills/leefanv/omit-design/add-pattern"><img src="https://agentmods.dev/badge/skills/leefanv/omit-design/add-pattern.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,078 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00105 $0.01078
Opus 5.5 $0.00042 $0.00431
Sonnet 5.5 $0.00021 $0.00216
Haiku 4.5 $0.00011 $0.00108

Measured 1mo ago against content hash 3d5c55561da2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

add-pattern scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/cli/templates/init/.claude/skills/add-pattern/SKILL.md · 77 lines

How it starts

The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.

add-pattern — create a project-local design pattern

When to trigger

  • The user proactively asks to add a new pattern.
  • During new-design, after scanning <project>/patterns/, you decide nothing fits the PRD's page archetype.
  • Invoked by new-design when patterns/ is empty and the user provided no PRD — enter Conversational mode (see below).

Conversational mode (called by new-design with no PRD)

When triggered by new-design with no PRD source, you do not have a body to parse. Instead, ask the user the following 5 questions in order, one per turn, and collect short answers:

  1. 这个页面的核心目的是什么?(一句话)
  2. 用户在这页主要做什么动作?(看 / 选 / 填 / 提交 / 对比 / 取消……)
  3. 数据形态是单条 / 列表 / 树 / 看板 / 表单 / 嵌套?
  4. 类似的页面在 list-view / detail-view / form-view / dashboard / dialog-view 这五个标准类目里靠近哪一个?
  5. 有没有特殊约束?(手势 / 离线 / 实时刷新 / 大数据量……)

Once all 5 answers are in, enter the Flow steps below with one constraint:

  • Produce exactly ONE pattern, kept minimal: whitelist ≤ 5 Om* components, template.tmpl.tsx ≤ 30 lines.
  • Skip Step 1's "compare with PRD" — instead, treat the 5 answers as the spec.
  • After Step 6 HARD-GATE passes, return to new-design's main flow.

This mode is not for add-pattern invoked directly by the user — when the user explicitly says "add a pattern for X", proceed with the standard Flow below (the user already knows what they want).

Output location

All files land under <project>/patterns/<name>/:

patterns/<name>/
├── pattern.json            # { "name", "whitelist": [...], "description" }
├── template.tmpl.tsx       # the TSX skeleton new-design copies
└── README.md               # when to use, when NOT to use, skeleton breakdown

No registration needed elsewhere. ESLint's require-pattern-components rule auto-discovers via filesystem walk; the workspace's Library UI lists everything in patterns/.

Flow

  1. Understand the pattern's core:
    • Purpose (one sentence — what user need it serves).
    • Skeleton (which whitelisted Om* components, in what structure).
    • How it differs from existing patterns in <project>/patterns/.

Read the full file on GitHub · 77 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 77 lines · 105 tokens per session scan A 3d5c55561da2

Subscribe to this mod's changes

add-pattern is a skill published in the GitHub repository leefanv/omit-design (55 stars, last pushed 5mo ago), licensed MIT. It adds 105 tokens to every session and 1,078 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

moai-design-tools

Design tool integration specialist covering Figma MCP, Pencil renderer, and Pencil-to-code export. Use when fetching design context from Figma, rendering Pencil designs, or exporting to React/Tailwind code.

modu-ai/moai-adk · 45 tokens

mcp-host-styling-integration

Integrates MCP App UI with host theming system. Applies host CSS variables, handles onhostcontextchanged, safe area insets, display mode detection, and fullscreen configuration.

a5c-ai/babysitter · 44 tokens

moai-ref-ui-polish

UI polish and interface-completion reference: the small visual details — concentric border radius, optical alignment, shadow-vs-border, motion easing, typography smoothing, tabular numbers, icon stroke weight, hit areas — that separate polished interfaces from generic ones. Agent-extending skill that amplifies…

modu-ai/moai-adk · 98 tokens

moai-domain-uiux

UI/UX design systems specialist covering accessibility, icons, theming, design tokens, and user experience patterns. Use when working on design systems, WCAG compliance, ARIA patterns, or dark mode theming.

modu-ai/moai-adk · 49 tokens

moai-domain-design-dna

Reverse-engineer a reference design — a screenshot, an image set, or a live URL — into a portable Design DNA JSON across three dimensions (measurable tokens, qualitative style, special-rendering effects), then generate a new self-contained artifact from that JSON. Carries the extraction rules (dominance-based colour…

modu-ai/moai-adk · 112 tokens

moai-domain-frontend

Frontend development specialist covering React 19, Next.js 16, Vue 3.5, and modern UI/UX patterns with component architecture. Use when building web UIs, implementing components, optimizing frontend performance, or integrating state management.

modu-ai/moai-adk · 54 tokens