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…
от Nebulavenus★ 51 звезда на GitHub
Установить forge-import-settings-editor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
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
| Component | Function / Route | Purpose |
|---|---|---|
import_settings.py |
sidecar_path(source) |
Return .import.toml path for a source file |
import_settings.py |
load_sidecar(source) |
Parse sidecar TOML, empty dict if missing |
import_settings.py |
save_sidecar(source, settings) |
Write settings to sidecar file |
import_settings.py |
delete_sidecar(source) |
Remove sidecar (revert to defaults) |
import_settings.py |
merge_settings(global, per_asset) |
Two-layer overlay merge |
import_settings.py |
get_effective_settings(plugin, global, per_asset) |
Three-layer merge with schema defaults |
import_settings.py |
get_schema(plugin_name) |
Return schema dict for a plugin type |
server.py |
GET /api/assets/{id}/settings |
Read schema + global + per-asset + effective |
server.py |
PUT /api/assets/{id}/settings |
Save per-asset overrides as .import.toml |
server.py |
DELETE /api/assets/{id}/settings |
Remove sidecar (revert to defaults) |
server.py |
POST /api/assets/{id}/process |
Re-process with effective settings |
Architecture
Three-layer settings merge:
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
- Define settings schemas in
import_settings.py— one dict per plugin type withtype,label,description,default, and optional constraints - Implement sidecar CRUD —
sidecar_path,load_sidecar,save_sidecar,delete_sidecar - Implement merge functions —
merge_settings,get_effective_settings - Add API endpoints to
server.py— GET, PUT, DELETE for settings, POST for process - Integrate sidecars into CLI processing — load sidecars in
_process_files(), include settings in fingerprint cache key
Frontend
- Add TypeScript types for
ImportSettingsResponse,SettingsSchemaField,ProcessResponseinapi.ts - Add API functions —
fetchImportSettings,saveImportSettings,deleteImportSettings,processAsset - Add UI primitives —
Label,Select,Switch,Separatorincomponents/ui/ - Build
ImportSettingscomponent with schema-driven form rendering - Mount on the asset detail page below the preview panel
- Wire TanStack Query cache invalidation on mutations
Settings schema definition
Each plugin type has a schema dict describing its configurable fields:
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:
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 type |
UI control | Notes |
|---|---|---|
bool |
Switch |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл 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.
Как установить скилл forge-import-settings-editor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл forge-import-settings-editor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…