@lobehub/ui/awesomeのランディングページ用コンポーネントを組み合わせ、製品や文書サイトのホーム画面を構成してリンクや配色まで整えます。
- 製品のランディングページを作りたいとき
- lobedocsのトップページを作りたいとき
- 動くコンポーネント例を配置したいとき
プロバイダーやモデル、エージェントの識別子と既存アイコンを対応づけ、既定アイコンが表示される問題やマッピング漏れを修正する開発用スキルです。
Add or modify icon keyword mappings for providers, models, or agents in lobe-icons. Use this whenever a task involves mapping a provider/model id to an icon, adding a new entry to ModelProvider enum or providerMappings/modelMappings/agentMappings, or fixing a provider/model that renders the fallback (default) icon in LobeHub. Trigger even if the request only says "add icon for X provider" or references a Linear issue about icon keyword mapping — the actual icon component usually already exists; only the mapping is missing.
実行スコア 未検証
インストール方法を見るlobe-iconsで、プロバイダー、モデル、エージェントの識別子から既存アイコンを表示するためのキーワード対応表を追加・修正します。既定のフォールバックアイコンが表示される場合に、アイコン自体があるかを先に確認し、必要なマッピング箇所を特定します。プロバイダーは完全一致、モデルとエージェントは大文字小文字を区別しない正規表現で照合するため、登録順やパターンの書き方も考慮します。React Native向けの設定にも対応する変更を反映します。
新しいプロバイダーやモデルを追加したとき、既存のブランドアイコンを正しく表示したい場合に使えます。LobeHubで既定アイコンになる問題の調査や、モデル名に対する照合ルールの調整にも向いています。
マッピング変更では、該当するメインパッケージとReact Nativeパッケージの設定を確認します。型チェックには依存関係が必要で、未導入時はReact Native関連の環境エラーが出る場合があります。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
lobe-icons ships icon components (e.g. src/Grok/) and, separately, mapping tables that resolve a provider/model/agent id string to one of those components. A provider showing the fallback icon in LobeHub almost always means the mapping entry is missing, not the icon itself. Always check src/<Name>/ first — if the brand icon already exists, the task is only wiring it up.
The react-native package duplicates the main package's config files. Forgetting the RN package is the most common mistake — the main package edits compile and pass review on their own.
| What | Main package | react-native package |
|---|---|---|
| Provider enum | src/features/providerEnum.ts | packages/react-native/src/features/providerEnum.ts |
| Provider mappings | src/features/providerConfig.tsx | packages/react-native/src/features/providerConfig.tsx |
| Model mappings | src/features/modelConfig.ts | packages/react-native/src/features/modelConfig.ts |
| Agent mappings | src/features/agentConfig.ts | — (main package only) |
The static-* workspace packages (static-svg, static-png, static-webp, static-avatar) are generated from icon components and contain no mapping logic — never edit them for a mapping change.
keyword.toLowerCase() === provider. A keyword like xai will NOT match supergrok; every provider id needs its own keyword.gpt-4 matches chatgpt-4o-latest.gpt-oss sits before the broad OpenAI entry).^o1, /o1, o1- are anchored patterns, and characters like . or + in a keyword are regex metacharacters — escape or anchor deliberately.ModelProvider in providerEnum.ts, alphabetically sorted, value lowercase:
SuperGrok = 'supergrok',
providerConfig.tsx, import the icon (alphabetical order). Main package uses the @/ alias, RN uses relative paths:
import Grok from '@/Grok'; // main package
import Grok from '../icons/Grok'; // react-native package
providerMappings, near related entries:
{ Icon: Grok, keywords: [ModelProvider.SuperGrok] },
RNModelProvider inside its own providerEnum.ts; entry shape is identical.Two established patterns for derived/subscription providers:
keywords: [ModelProvider.Moonshot, ModelProvider.KimiCodingPlan], [ModelProvider.ZhiPu, ModelProvider.GLMCodingPlan].supergrok → Grok icon instead of appending to the XAI entry.Prefer whichever the issue/requester specifies; otherwise pick based on whether users would benefit from telling the two providers apart in a list.
bun run type-check # repo root
cd packages/react-native && bun run type-check # RN package has its own tsconfig
If dependencies aren't installed, the RN type-check reports pre-existing Cannot find module 'react-native' / 'react-native-svg' errors — those are environmental, not caused by your change. Only errors mentioning your new enum member or the config files matter; don't install dependencies just to silence them (pnpm install creates lockfile noise, see below).
Type-check catches typos but not a missed mapping — grep is the completeness check:
grep -rn "supergrok" src packages/react-native/src
Expect hits in both enum files and both config files (2×2). For a model/agent keyword, quickly sanity-check the regex in isolation: new RegExp(keyword, 'i').test(modelId).
There are no committed tests and the repo's vitest.config.ts alias ('@': './src', relative) does not resolve transitive @/ imports — a render test needs a throwaway config with an absolute-path alias and server.deps.inline: [/@lobehub/]. Usually type-check + grep is sufficient.
.npmrc sets lockfile=false — the repo commits no lockfile. Running pnpm install generates pnpm-lock.yaml and may inject a placeholder allowBuilds: block into pnpm-workspace.yaml. Delete the lockfile and git checkout -- pnpm-workspace.yaml before committing.git show --stat HEAD — a mapping change should touch only the 2–4 config files.✨ feat: add Grok icon mapping for supergrok provider.まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
@lobehub/ui/awesomeのランディングページ用コンポーネントを組み合わせ、製品や文書サイトのホーム画面を構成してリンクや配色まで整えます。
@lobehub/docs-kitを使った静的ドキュメントサイトの構成とページ作成を支援し、コンポーネントのデモやAPI表を含む文書をビルド時検証まで整えます。