melta-ui: Instructions file for Claude Code

AGENTS.md

melta-ui AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from tsubotax/melta-ui. It costs 2,575 tokens per session, scanned A, original, MIT.

A project guide for AI coding agents working on melta UI, a design system for building user interfaces. It points to the official design documents, component specifications, design values, and validation tools.

In plain words
What is it for?
Use it when generating or reviewing UI, choosing design values or components, checking HTML, or understanding the project’s quick, standard, and tool-assisted reading modes.
Why use it?
It helps agents use the approved interface rules and avoid inconsistencies, accessibility problems, or changes that drift from the project’s single source of truth.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: PostToolUse hook event, but also the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is tsubotax/melta-ui's own configuration. It tells Claude Code, Codex and OpenCode how to work on melta-ui itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything melta-ui configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tsubotax/melta-ui. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tsubotax/melta-ui/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/tsubotax/melta-ui

Made for: Claude Code, Codex, OpenCode.

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 melta-ui AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tsubotax/melta-ui/agents-md/github.svg)](https://agentmods.dev/instructions/tsubotax/melta-ui/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/tsubotax/melta-ui/agents-md"><img src="https://agentmods.dev/badge/instructions/tsubotax/melta-ui/agents-md/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 melta-ui AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/tsubotax/melta-ui/agents-md"><img src="https://agentmods.dev/badge/instructions/tsubotax/melta-ui/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,575 This file is loaded in full into every session.
When invoked 2,575 The same file — it is already loaded in full.
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.02575 $0.02575
Opus 5.5 $0.01030 $0.01030
Sonnet 5.5 $0.00515 $0.00515
Haiku 4.5 $0.00258 $0.00258

Measured 12d ago against content hash 839340957ac7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

melta-ui AGENTS.md 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 12d 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.

AGENTS.md · 146 lines

How it starts

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

melta UI — AI エージェント作業ガイド

AI coding agents(Claude Code / Codex / Cursor / Gemini CLI 等)共通の作業指示 SSOT。 デザイン仕様は DESIGN.md、exact value は design/contracts/ を参照。 Claude Code 固有の挙動(PostToolUse hook / MCP 自動接続 / skills)は CLAUDE.md。 Cursor 固有の入口は .cursor/(MCP 設定の mcp.json と、所在ポインタの rules/melta-ui.mdc)。仕様・値は置かない。


アーキテクチャ概要

この DS は 3 層構造(AI-Ready 2.0)で運用されている。

  • Layer 1: 憲法 — DESIGN.md が AI 向け入口。原則 + Quick Reference。これだけで基本 UI を生成可能
  • Layer 2: 仕様 — design/contracts/ に 40 contract(web 28 + app 先行 12)+ 107 禁止ルール + 101 トークンの JSON 仕様。これが SSOT
  • Layer 3: 検証 — scripts/design/ の harness が Schema 整合・drift・a11y を自動検証。CI + hook で守る

詳細: design/authority.md(SSOT 宣言・値競合時の優先順位)、README.md(全体構造)


最初に読むファイル

目的 ファイル
デザイン仕様(Quick Ref 含む) DESIGN.md
作業手順 AGENTS.md(本ファイル)
SSOT 宣言 design/authority.md
loop / pipeline 自動化の統治原則 docs/melta-loop-playbook.md

読み込みモード

モード 読むファイル 概算トークン 用途
クイック DESIGN.md のみ ~4k 単体UIの生成(ボタン、カード等)
標準 + foundations/theme.md + 関連 component md or contract ~10k ページ単位の生成
MCP MCP ツール(get_token / get_component / check_rule / check_html / get_rules / search) 必要分のみ AI ツール統合。生成後は check_html で自己検証
フル 全ファイル(下記の読み順に従う) ~150k 新規プロジェクト構築・DS変更

フル読み順: DESIGN.md → foundations/design_philosophy.md → foundations/theme.md → foundations/ → components/ or design/contracts/components/ → patterns/ → design/contracts/rules.json


作業ルール

  1. UI タスク開始時に DESIGN.md を読む
  2. exact value が必要なら design/contracts/ を参照する
  3. コンポーネント仕様は *.contract.json を優先(なければ components/*.md → metadata/components.json)
  4. 禁止ルールの SSOT は design/contracts/rules.json(107 ルール)
  5. finish 前に npm run design:check と npm run design:lint-generated -- <生成ファイル> を走らせる
  6. generated file(metadata/components.json、llms.txt / llms-full.txt、design/contracts/recipes/web/)を直接編集しない → npm run design:build で再生成
  7. 新しい component を作る場合、まず design/contracts/components/ に contract を書く
  8. loop / pipeline / CI 自動修復を扱う場合は docs/melta-loop-playbook.md を読む。SSOT write、baseline 緩和、test 弱体化、publish/deploy は human gate
  9. recipes の2層規約: recipes/web/ = 契約から生成される導出ミラー(編集禁止)/ recipes/app/ = RN styleRefs の手書き authoring source。app recipe の値は {"token": "<tokens.json ノードパス>"} か literal(色の hex 直書き禁止)。variants / sizes / states のキーは契約の部分集合(語彙の発明は design:check が error)。契約を変えたら design:compat(npm 公開版との互換ゲート)が semver bump を要求する

Read the full file on GitHub · 146 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. 12d ago Changed · +1 lines · +47 tokens per session 839340957ac7
  2. 1mo ago Changed · +1 lines · +47 tokens per session 3544e4573026
  3. 1mo ago First seen · 144 lines · 2,481 tokens per session scan A dc922b1fac6e

Subscribe to this mod's changes

melta-ui AGENTS.md is an instructions file published in the GitHub repository tsubotax/melta-ui (202 stars, last pushed 12d ago), licensed MIT. It adds 2,575 tokens to every session, about $0.0103 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 instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,384 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens