Forge Import Settings Editorのロゴ

Forge Import Settings Editor

コミュニティ
Nebulavenus
forge-import-settings-editor

Add per-asset import settings with TOML sidecar files, three-layer merge (schema → global → per-asset), a settings editor form with type-specific controls, and single-asset re-processing from the web UI. Use when someone needs configurable per-file processing overrides, settings UI, or sidecar-based configuration.

概要

公開者Nebulavenus
リポジトリforge-gpu
スキル名forge-import-settings-editor
スター
46
フォーク
7
同梱ファイル
指示のみ
ライセンスZlib
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Nebulavenus/forge-gpu.git /tmp/forge-gpu
mkdir -p .claude/skills
cp -r /tmp/forge-gpu/.claude/skills/forge-import-settings-editor .claude/skills/forge-import-settings-editor
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

forge-import-settings-editor

Add per-asset import settings to a pipeline web UI. Assets get individual .import.toml sidecar files that override global config, and a browser-based editor form renders type-specific controls for each setting.

When to use this skill

  • Adding per-asset configuration overrides to a processing pipeline
  • Building a settings editor form driven by a schema definition
  • Implementing three-layer settings merge (defaults → global → per-item)
  • Adding TOML sidecar file I/O without a third-party TOML writer
  • Triggering single-item re-processing from a web UI

Key functions and endpoints

ComponentFunction / RoutePurpose
import_settings.pysidecar_path(source)Return .import.toml path for a source file
import_settings.pyload_sidecar(source)Parse sidecar TOML, empty dict if missing
import_settings.pysave_sidecar(source, settings)Write settings to sidecar file
import_settings.pydelete_sidecar(source)Remove sidecar (revert to defaults)
import_settings.pymerge_settings(global, per_asset)Two-layer overlay merge
import_settings.pyget_effective_settings(plugin, global, per_asset)Three-layer merge with schema defaults
import_settings.pyget_schema(plugin_name)Return schema dict for a plugin type
server.pyGET /api/assets/{id}/settingsRead schema + global + per-asset + effective
server.pyPUT /api/assets/{id}/settingsSave per-asset overrides as .import.toml
server.pyDELETE /api/assets/{id}/settingsRemove sidecar (revert to defaults)
server.pyPOST /api/assets/{id}/processRe-process with effective settings

Architecture

Three-layer settings merge:

text
Schema Defaults ──> Global Config (pipeline.toml) ──> Per-Asset (.import.toml)
       │                      │                              │
       └──────────────────────┴──────────────────────────────┘
                                    │
                              get_effective_settings()
                                    │
                              Effective Settings

Each layer overrides the previous. get_effective_settings() starts with schema defaults, overlays global settings, then per-asset overrides.

Correct order

Backend

  1. Define settings schemas in import_settings.py — one dict per plugin type with type, label, description, default, and optional constraints
  2. Implement sidecar CRUD — sidecar_path, load_sidecar, save_sidecar, delete_sidecar
  3. Implement merge functions — merge_settings, get_effective_settings
  4. Add API endpoints to server.py — GET, PUT, DELETE for settings, POST for process
  5. Integrate sidecars into CLI processing — load sidecars in _process_files(), include settings in fingerprint cache key

Frontend

  1. Add TypeScript types for ImportSettingsResponse, SettingsSchemaField, ProcessResponse in api.ts
  2. Add API functions — fetchImportSettings, saveImportSettings, deleteImportSettings, processAsset
  3. Add UI primitives — Label, Select, Switch, Separator in components/ui/
  4. Build ImportSettings component with schema-driven form rendering
  5. Mount on the asset detail page below the preview panel
  6. Wire TanStack Query cache invalidation on mutations

Settings schema definition

Each plugin type has a schema dict describing its configurable fields:

python
TEXTURE_SETTINGS_SCHEMA: dict[str, dict] = {
    "max_size": {
        "type": "int",           # Control type: bool, int, float, str, list[float]
        "label": "Max size",     # Human-readable label
        "description": "Clamp width and height to this limit (pixels).",
        "default": 2048,         # Schema default value
        "min": 1,                # Optional: numeric minimum
        "max": 8192,             # Optional: numeric maximum
    },
    "compression": {
        "type": "str",
        "label": "GPU compression",
        "description": "GPU block-compression codec.",
        "default": "none",
        "options": ["none", "basisu", "astc"],  # Optional: enum values
    },
    "normal_map": {
        "type": "bool",
        "label": "Normal map",
        "description": "Treat as a normal map (BC5, linear color space).",
        "default": False,
    },
}

SETTINGS_SCHEMAS: dict[str, dict[str, dict]] = {
    "texture": TEXTURE_SETTINGS_SCHEMA,
    "mesh": MESH_SETTINGS_SCHEMA,
}

TOML sidecar format

Sidecars are flat key-value TOML files. Only overridden keys are present:

toml
normal_map = true
compression = "basisu"
basisu_quality = 200

Write TOML with string formatting — no third-party serializer needed for flat tables. Check isinstance(value, bool) before isinstance(value, int) since bool is a subclass of int in Python.

Frontend control mapping

Schema typeUI controlNotes
boolSwitch toggleonCheckedChange callback
str with optionsSelect dropdownRenders <option> per entry
intInput type="number"Uses min/max from schema
floatInput type="number"step={0.01}
list[float]Input type="text"Comma-separated, parsed on change

Common mistakes

  1. Forgetting bool-before-int check in TOML formatting. Python's bool is a subclass of int, so isinstance(True, int) is True. Always check isinstance(value, bool) first.

  2. Not including settings in the fingerprint cache key. If only the content hash is cached, changing a sidecar does not trigger reprocessing. Combine the content hash with a JSON digest of the merged settings.

  3. Mutating the global settings dict during merge. merge_settings() must return a new dict — never .update() the input.

  4. Not invalidating the right TanStack Query keys. After processing, both ["asset", id] and ["assets"] (list) must be invalidated so the status badge and preview update.

  5. Missing error handling for malformed sidecars. load_sidecar() should catch TOMLDecodeError and raise a clear ValueError. The CLI should log a warning and fall back to global settings; the API should return 400.

Ready-to-use template

import_settings.py — core pattern

python
from pathlib import Path
import tomllib

SIDECAR_SUFFIX = ".import.toml"

def sidecar_path(source: Path) -> Path:
    return source.parent / (source.name + SIDECAR_SUFFIX)

def load_sidecar(source: Path) -> dict:
    path = sidecar_path(source)
    if not path.is_file():
        return {}
    try:
        with path.open("rb") as f:
            return tomllib.load(f)
    except tomllib.TOMLDecodeError as exc:
        raise ValueError(f"Malformed sidecar {path}: {exc}") from exc

def get_effective_settings(plugin_name: str, global_s: dict, per_asset: dict) -> dict:
    schema = SETTINGS_SCHEMAS.get(plugin_name, {})
    result = {key: spec["default"] for key, spec in schema.items()}
    result.update(global_s)
    result.update(per_asset)
    return result

API endpoint pattern

python
@app.get("/api/assets/{asset_id}/settings")
async def get_import_settings(asset_id: str):
    asset = _get_cached_asset(asset_id)
    plugin_name = _plugin_name_for_type(asset.asset_type)
    schema = get_schema(plugin_name)
    global_settings = config.plugin_settings.get(plugin_name, {})
    per_asset = load_sidecar(Path(asset.source_path))
    effective = get_effective_settings(plugin_name, global_settings, per_asset)
    return {
        "schema_fields": schema,
        "global_settings": global_settings,
        "per_asset": per_asset,
        "effective": effective,
        "has_overrides": bool(per_asset),
    }

React component pattern

tsx
const { data: settings } = useQuery({
  queryKey: ["settings", assetId],
  queryFn: () => fetchImportSettings(assetId),
})

const saveMutation = useMutation({
  mutationFn: (overrides) => saveImportSettings(assetId, overrides),
  onSuccess: () => {
    queryClient.invalidateQueries({ queryKey: ["settings", assetId] })
  },
})

よくある質問

AIスキル「Forge Import Settings Editor」では何ができますか?

Add per-asset import settings with TOML sidecar files, three-layer merge (schema → global → per-asset), a settings editor form with type-specific controls, and single-asset re-processing from the web UI. Use when someone needs configurable per-file processing overrides, settings UI, or sidecar-based configuration.

TypingMindでForge Import Settings Editorを使うメリットは何ですか?

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

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

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-import-settings-editorを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Forge Import Settings Editorを使えるAIモデルはどれですか?

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

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

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

AIスキル「Forge Import Settings Editor」は無料ですか?

はい。NebulavenusがZlibライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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