add-pattern

add-pattern is a skill for Claude Code, Codex 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 CodeCodex

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.

agentmods
npx agentmods add skills/leefanv/omit-design/add-pattern
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00105 $0.01078
Opus 5 $0.00053 $0.00539
Sonnet 5 $0.00021 $0.00216
Haiku 4.5 $0.00011 $0.00108

Measured 3d ago against content hash 3d5c55561da2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 (54 stars, last pushed 3mo ago), licensed MIT. It adds 105 tokens to every session and 1,078 once invoked, about $0.0005 per session on Opus 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

agent-code-analyzer

Agent skill for code-analyzer - invoke with $agent-code-analyzer.

ruvnet/ruflo · 19 tokens

agui-dotnet-streaming-chat

Get started with the AG-UI .NET SDK: bootstrap and run your first streaming-chat app (client + server) with the AG-UI .NET NuGet packages (AGUI.Client, AGUI.Server, AGUI.Formatting, AGUI.Abstractions). USE FOR: which packages to install and how to wire them; constructing an AGUIChatClient against an endpoint and…

ag-ui-protocol/ag-ui · 223 tokens

agui-dotnet-sample-step

Add a GettingStarted sample Step (a Server/Client pair) to the AG-UI .NET SDK that demonstrates one protocol feature the way we want users to write it. USE FOR: adding a new samples/GettingStarted/StepNN Server+Client pair, wiring it into AGUI.slnx and the integration-test project, giving it a deterministic…

ag-ui-protocol/ag-ui · 168 tokens

agui-dotnet-protobuf

Use the protobuf wire transport (instead of the default Server-Sent Events) for an AG-UI connection with the AG-UI .NET SDK — a compact binary event stream negotiated via the Accept header. USE FOR: making an AGUIChatClient prefer protobuf by wiring an AGUIEventStreamHandler with ProtobufEventStreamFormatter (then…

ag-ui-protocol/ag-ui · 162 tokens

revdiff

Review diffs, files, and documents with inline annotations in a TUI overlay, or answer questions about revdiff usage, configuration, themes, and keybindings. Opens revdiff in tmux/zellij/herdr/kitty/wezterm/cmux/ghostty/iterm2/emacs-vterm, captures annotations, and addresses them. Works in git, hg, and jj repos…

umputun/revdiff · 246 tokens

revdiff-plan

Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…

umputun/revdiff · 84 tokens