Iconsのロゴ

Icons

コミュニティ
jstanden
icons

Cerbのアイコンセット向けにSVGの図形を設計する方法を解説します。4種類のパターン、固定された外側のテンプレート、一般的なSVGの感覚が通用しなくなるmask-imageの制約を扱います。アイコンを描画・編集する前に読み込んでください。

Add to TypingMind

概要

公開者jstanden
リポジトリcerb
スキル名icons
スター
83
フォーク
38
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    jstandenがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Icons」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/jstanden/cerb/tree/12.0.x/features/cerberusweb.core/assets/agent_filesystems/cerb-agents/skills/icons
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jstanden/cerb.git /tmp/cerb
mkdir -p .claude/skills
cp -r /tmp/cerb/features/cerberusweb.core/assets/agent_filesystems/cerb-agents/skills/icons .claude/skills/icons
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでIconsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にIconsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Iconsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Cerb SVG icons

Cerb icons live in an SCSS Sass map and render via CSS mask-image. The icon's geometry determines opacity; the button's CSS text color provides the actual visible color. Fill and stroke are both just "opaque" — there is no color contrast available. Every visual distinction must come from geometry: opaque shape vs transparent gap.

Output format

Each icon is a single line in a Sass map:

scss
  name:           "<inner-svg-geometry>",

The geometry is strictly inner geometry. Never include the <svg> tag (start or end), </svg> closing tags, <g> groups, or xmlns attributes. Just the shapes and paths. Use single quotes on SVG attributes so the whole thing fits in the double-quoted Sass string.

Outer template (applied automatically at render time)

html
  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'
     fill='none' stroke='black' stroke-width='2'
     stroke-linecap='round' stroke-linejoin='round'>
  ...your inner geometry here...
  <!-- The closing </svg> is added automatically -->
</svg>

Your geometry inherits:

  • 24×24 viewBox (everything must fit; stroke extends 1 unit past the path)
  • fill='none' (override per-element with fill='black' to fill)
  • stroke='black' stroke-width='2' (override per-element with stroke='none' to remove)
  • stroke-linecap='round', stroke-linejoin='round' — sharp acute corners get rounded by ~1 unit

The four pattern families

Pick a family up front and design within its constraints. Combining families in one icon usually fails because of the mask-image color limitation.

1. Line icon (Lucide style, default). <path>, <rect>, <circle>, <line>, <polyline>, <polygon> with no extra attributes — they inherit fill='none', stroke='black' stroke-width='2'. Covers the vast majority of icons.

scss
  mail:           "<rect x='2' y='4' width='20' height='16' rx='2'/><path d='m22 7-10 6L2 7'/>",

2. Filled solid icon. Add fill='black'. Add stroke='none' for crisp edges / sharp corners (small triangles, chevrons, arrow tips, pixel-precise cutouts); keep the template stroke when you want visual weight matching line icons.

scss
  chevron-down:   "<path fill='black' stroke='none' d='M12 15.5l-7-7 2-2 5 5 5-5 2 2z'/>",

3. Compass / ring-with-inner-element. Outlined ring + filled inner element(s).

scss
  play-button:    "<circle cx='12' cy='12' r='10'/><polygon fill='black' points='7.5 6 17.5 12 7.5 18'/>",

4. Filled disc with a punched symbol (the circle-* family). Filled r=10 disc centered at (12,12), symbol cut out via fill-rule='evenodd' + stroke='none'. The symbol MUST be a single continuous closed polygon (or non-overlapping subpaths) — overlapping subpaths push the winding count odd and re-fill the cutout. When in doubt, look up a shipped circle-* icon and trace from its geometry.

scss
  circle-plus:    "<path stroke='none' fill='black' fill-rule='evenodd' d='M2 12A10 10 0 1 0 22 12A10 10 0 1 0 2 12ZM10.5 6 13.5 6 13.5 10.5 18 10.5 18 13.5 13.5 13.5 13.5 18 10.5 18 10.5 13.5 6 13.5 6 10.5 10.5 10.5Z'/>",

Critical mask-image constraints

Non-negotiable consequences of mask-image rendering:

  1. No fill/stroke color contrast. Both are opaque. Traditional outlining isn't possible — only geometric outline tricks (negative-space halo via evenodd, or a hollow stroked shape with no fill).
  2. Filled shape + stroke = bigger filled shape. The 2px stroke adds ~1 unit of opacity in every direction. Inset a polygon by 1 unit to keep its visible size when it carries the template stroke.
  3. A transparent gap is required to "outline" anything. Shape B is only visible against filled shape A if B is outside A, a cutout in A (evenodd), or both.
  4. stroke-linejoin='round' rounds every sharp corner by ~1 unit. Use stroke='none' for true sharp corners.
  5. ViewBox edges clip. A path at x=24 with a 2px stroke renders to x=25 and gets clipped. Pull paths in by 1 unit to preserve perimeter stroke. (The circle-* family can use a full r=10 disc only because it uses stroke='none'.)
  6. Masks can't occlude — no "in front / behind". Overlapping shapes merge into one blob. Fanned decks, stacked cards, "one shape behind another" do NOT work — use distinct, spatially-separated elements.
  7. Stroke eats the gap between elements. Each stroked shape extends half its stroke-width toward its neighbor. Budget ~4 geometric units of gap for ~2.5 visual units when spacing composites.
  8. SVG transform renders fine in the mask (e.g. transform='rotate(angle cx cy)') — but re-read #6 before overlapping.

Reference docs (mounted at @cerb-docs, read-only)

You have the full Cerb documentation mounted. Read these instead of guessing — especially before claiming an icon does or doesn't exist.

PathWhat it gives you
@cerb-docs/references/docs/developers/icons.mdThe canonical icon list. Every registered icon name in the shipped set, plus why an icon is a single-color mask that inherits currentColor. Check here first for naming conventions and prior art (circle-*, logo-*, chart-*, window-*, move-* families).
@cerb-docs/references/docs/setup/developers/icon-builder.mdThe Icon Builder: it holds inner geometry only, the wrapper <svg> is fixed by the icon pipeline, and output is two source lines (the $icons entry in cerb-icons.scss + the name entry in the UI service). Nothing is saved server-side.
@cerb-docs/references/docs/data-queries/ui/icons.mdtype:ui.icons data query — filterable/pageable list of icon names, the same source behind the icon-listing tool and the in-app pickers.
@cerb-docs/references/docs/toolbars.mdHow icon: is consumed on toolbar buttons and menu links (icon in addition to, or instead of, a label).
@cerb-docs/references/docs/sheets.mdThe icon column type and the icon:/icon_at: parameters on card, link, interaction, and button columns — the other main place icons render.

Practical notes that follow from those pages:

  • An icon name must be registered to be accepted. Icon pickers, toolbars, and sheets reject unknown names (they silently render nothing), so a new glyph isn't usable until both source lines are copied out and the CSS is rebuilt.
  • Names are the API. Match the existing naming conventions in the icon reference — kebab-case, family prefix first (circle-plus, not plus-circle; chart-bar-stacked, window-left).
  • Check for an existing icon before drawing one. Look it up in the shipped set or the icon reference; adapting a shipped glyph's geometry keeps the house style better than inventing.
  • Icons are sized and colored by their context (buttons, panels, sheet cells, at a range of sizes), so geometry must read at small sizes with no color contrast available.

Draft, look, refine -- do not try to one-shot it

cerb_set_geometry pushes a revision and the preview updates immediately, so you can SEE the icon. That makes a rough first pass cheap and a long analytical build expensive. Get something on screen in your first turn or two, then adjust.

  • Ship the draft early. A plain first version -- right family, right proportions, nothing refined -- teaches you more in one turn than another round of reasoning does. The user is watching the preview and will often correct you before you would have caught it yourself.
  • Refine in small passes. One change per revision, or a couple of related ones. Every cerb_set_geometry is undoable, so a wrong step costs a revision rather than the work.
  • Reason about geometry when the preview disagrees with you. Winding at the center of an evenodd cutout, stroke growth against the viewBox edge, the gap eaten between two stroked shapes -- these are diagnoses for a symptom you can see, not a checklist to run before drawing.
  • Don't precompute what you can just look at. Curve math, traced coordinates, a scratch file of alternatives: reach for those when a shape is genuinely fiddly, not by default.
  • Say where you are. "Here is a first pass -- I will tighten the stem next" sets the expectation that this is a draft. Several silent minutes reads as being stuck, and a perfect icon delivered late is worth less than a good one delivered in three quick rounds.

Working approach

  1. Start from Lucide. Most icons map to an existing Lucide design — adapt rather than invent. Lucide path data drops in cleanly after converting double quotes to single quotes.
  2. Pick a pattern family up front and design within its constraints.
  3. If an evenodd cutout fills in solid, check the winding at its center — for a disc + symbol, the symbol's center must be winding 2 (transparent). That is the diagnosis for that symptom, not a step to run before every draft.
  4. Take multi-icon requests one at a time. An icon editor holds a single icon's geometry, so work through a set in sequence — settle one glyph, note its shared parameters (stroke weight, corner radius, optical size), and carry them into the next so the family stays consistent.
  5. Iterate on dimensions, not approach. "Fatter / thinner / shorter / deeper" → adjust existing parameters. "Different style entirely" → switch pattern family.
  6. Round to 2 decimals max unless precision matters (e.g. cutout sagitta math).
  7. Use your scratch area when a shape genuinely needs it — traced path data, winding and sagitta math, intermediate geometry held across steps. Prefer looking at the preview over computing what it would have looked like.

よくある質問

AIスキル「Icons」では何ができますか?

Cerbのアイコンセット向けにSVGの図形を設計する方法を解説します。4種類のパターン、固定された外側のテンプレート、一般的なSVGの感覚が通用しなくなるmask-imageの制約を扱います。アイコンを描画・編集する前に読み込んでください。

TypingMindでIconsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Iconsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにIconsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/jstanden/cerb/tree/12.0.x/features/cerberusweb.core/assets/agent_filesystems/cerb-agents/skills/iconsを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Iconsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Iconsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもIconsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Icons」は無料ですか?

jstandenがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇