serdes-yaml-edit
БесплатноБез исполняемых скриптовНе проверенEdit Metabase serdes YAML files (cards, dashboards, databases) with correct portable references and structural conventions. Use when modifying exported YAML…
от metabase★ 50 742 звезды на GitHubОб этом скилле
Serdes YAML Edit Skill
Golden Rule
Run both checkers after every edit. No exceptions. Do not batch multiple edits before validating.
clojure -M:run:ee --mode checker --checker structural --export /path/to/export-dir
clojure -M:run:ee --mode checker --checker cards --export /path/to/export-dir
If either checker fails, fix the issue before making further edits.
Portable References
Serdes YAML uses portable references instead of integer IDs. This is the most important concept for editing.
Database references
String name: "Sample Database"
Table references
Array of [database, schema, table]:
table_id:
- Sample Database
- PUBLIC
- ACCOUNTS
Field references
Array of [database, schema, table, field]:
id:
- Sample Database
- PUBLIC
- ACCOUNTS
- EMAIL
Field refs in queries
field_ref:
- field
- - Sample Database
- PUBLIC
- ACCOUNTS
- EMAIL
- null
The outer array is [field, <field-path>, <options>]. The options are usually null.
Card references
Entity ID string (21 characters): "Qk5TgsNx4ubXIUtsQmT8G"
Source table in queries
dataset_query:
database: Sample Database
query:
source-table:
- Sample Database
- PUBLIC
- ACCOUNTS
type: query
Safe Edits (low risk)
These rarely break validation:
name- card/dashboard display namedescription- card/dashboard descriptiondisplay- visualization type (table, bar, line, pie, etc.)visualization_settings- chart configurationarchived- true/falsecollection_id- move to a different collection (use entity_id of target collection, or null for root)
Structural Edits (must match schema)
These must use valid portable refs and will be caught by the cards checker if wrong:
dataset_query- the query definitionresult_metadata- column metadata (must match the query's output columns)table_id- must reference a table that exists in the exportdatabase_id- must reference a database that exists in the export
Editing result_metadata
Each entry in result_metadata describes an output column. When changing a query's source table or fields, you must update result_metadata to match. Each field entry needs at minimum:
name- column name (e.g.,EMAIL)base_type- Metabase type (e.g.,type/Text,type/Integer,type/DateTime)display_name- human-readable namefield_ref- portable field referenceid- portable field pathtable_id- portable table pathsource- usuallyfields
Common Operations
Rename a card
Change name: at the top level. Safe, no ref changes needed.
Change a card's source table
Update all of these consistently:
table_id- top-leveldataset_query.query.source-table- in the queryresult_metadata- every field entry'sid,field_ref, andtable_id
Add a filter to a structured query
dataset_query:
database: Sample Database
query:
source-table:
- Sample Database
- PUBLIC
- ORDERS
filter:
- ">"
- - field
- - Sample Database
- PUBLIC
- ORDERS
- TOTAL
- null
- 100
type: query
Change visualization type
display: bar # was: table
Valid types: table, bar, line, pie, scalar, row, area, combo, scatter, funnel, map, pivot, progress, gauge, waterfall
Looking Up Valid References
The export directory IS the reference catalog. When you need to find the correct name for a database, table, or field, look it up directly from the export.
List valid databases
ls databases/
Each entry is a database name (directory for serdes format, .yaml for concise format).
List valid tables for a database
ls databases/<db-name>/schemas/<schema>/tables/
Example: ls databases/Sample\ Database/schemas/PUBLIC/tables/ shows ACCOUNTS, ORDERS, PRODUCTS, etc.
List valid fields for a table
ls databases/<db-name>/schemas/<schema>/tables/<table>/fields/
Example: ls databases/Sample\ Database/schemas/PUBLIC/tables/PRODUCTS/fields/ shows CATEGORY.yaml, TITLE.yaml, PRICE.yaml, etc. The filename (minus .yaml) is the field name.
Find card entity IDs
Card filenames encode the entity ID: <entity-id>_<slug>.yaml. The entity ID is the part before the first underscore (21 characters).
Self-Healing Loop
When a checker reports errors, follow this loop:
- Read the error message - it tells you what's wrong and often suggests the fix
- Look up the correct value from the export directory (see "Looking Up Valid References" above)
- Fix the YAML
- Re-run both checkers
- Repeat until clean
Do not guess at fixes. Always look up the correct value from the export.
Understanding Checker Errors
Structural checker errors
The structural checker validates YAML shape against Malli schemas. Common errors:
**Missing required key
Установить serdes-yaml-edit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл serdes-yaml-edit?
Edit Metabase serdes YAML files (cards, dashboards, databases) with correct portable references and structural conventions. Use when modifying exported YAML content.
Как установить скилл serdes-yaml-edit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл serdes-yaml-edit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic