.claude/skills/klytos-custom-fields/SKILL.md
--- name: klytos-custom-fields description: Guide for creating and managing custom fields and metadata in Klytos CMS. Use when attaching extra data to pages, users, or custom post types, storing metadata on entities, working with the Meta API, or using the Field Manager. Covers two systems: MetaManager for free-form key-value data and FieldManager for structured typed fields with 27 field types, validation rules, and schema enforcement. --- # Klytos Custom Fields & Metadata ## Two Systems 1.
npx skillsauth add joseconti/klytos .claude/skills/klytos-custom-fieldsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
klytos_get_meta(string $collection, string $entityId, string $key): mixed
klytos_set_meta(string $collection, string $entityId, string $key, mixed $value): void
klytos_delete_meta(string $collection, string $entityId, string $key): bool
klytos_get_all_meta(string $collection, string $entityId): array
plugin_id.key_nameklytos_set_meta('pages', 'about', 'seo-pro.schema_type', 'Organization');
$schema = klytos_get_meta('pages', 'about', 'seo-pro.schema_type'); // 'Organization'
$all = klytos_get_all_meta('pages', 'about'); // ['seo-pro.schema_type' => 'Organization']
| Hook | Type | Arguments |
|---|---|---|
| meta.before_set | action | string $collection, string $entityId, string $key, mixed $value |
| meta.after_set | action | string $collection, string $entityId, string $key, mixed $value |
| meta.get | filter | mixed $value, string $collection, string $entityId, string $key |
| Type | Description |
|---|---|
| text, textarea, richtext | Text fields |
| number, range | Numeric |
| email, phone, url | Contact |
| date, datetime, time | Date/time |
| color | Color picker |
| image, file, video, audio | Media |
| select, multiselect, checkbox, radio | Choice |
| toggle, boolean | Boolean |
| password, code, json | Special |
| repeater | Repeatable group |
| relationship | Link to entities |
klytos_add_custom_field:
{"post_type_id": "products", "field_id": "price", "field_type": "number", "label": "Price", "required": true, "validation": {"min": 0}}
klytos_add_custom_field (select):
{"post_type_id": "products", "field_id": "condition", "field_type": "select", "label": "Condition", "options": [{"value": "new", "label": "New"}, {"value": "used", "label": "Used"}]}
klytos_add_custom_field (repeater):
{"post_type_id": "products", "field_id": "specs", "field_type": "repeater", "label": "Specs", "sub_fields": [{"field_id": "name", "field_type": "text", "label": "Name"}, {"field_id": "value", "field_type": "text", "label": "Value"}]}
klytos_set_bulk_field_values:
{"post_type_id": "products", "entry_slug": "iphone", "values": {"price": 999, "condition": "new", "specs": [{"name": "Storage", "value": "256GB"}]}}
klytos_update_custom_field / klytos_remove_custom_field / klytos_get_field_types
| Scenario | System | |---|---| | Plugin stores data on a page | MetaManager | | SEO plugin adds meta to any entity | MetaManager | | Product has a price field | FieldManager | | Structured data with validation | FieldManager | | Temporary/internal plugin data | MetaManager | | User-facing content fields | FieldManager |
core/meta-manager.phpcore/post-type-manager.phpcore/mcp/tools/custom-field-tools.phpcore/helpers-global.php (lines 518-572)development
Guide for working with dates, times, and timezones in Klytos CMS. Use when formatting dates, converting timezones, scheduling actions with timestamps, displaying local time, working with UTC storage, building timezone selectors, or using any klytos_date/klytos_gmdate/klytos_timezone functions.
tools
Guide for developing and extending the Klytos web terminal. Use when modifying terminal commands, adding terminal commands from plugins, fixing terminal bugs, extending the pseudo-terminal, working with TerminalExecutor class, registering custom permissions, adding custom category labels, or managing terminal UI and security.
development
--- name: klytos-site-builder description: Guide for building a complete website from scratch with Klytos CMS. Use when creating a new site, configuring a site after installation, setting up design/content/SEO/navigation, or when the user pastes the post-install prompt. Covers 9 phases: discovery, design reference, global config, theme, content structure, templates, content creation, additional features, and launch. --- # Klytos Site Builder ## Overview The Site Builder is a conversational AI
development
Use when creating or editing page content in Klytos CMS. Ensures every page has proper SEO structure, HTML semantics, meta tags, structured data, accessibility for maximum search engine visibility. Apply when writing page titles, descriptions, content, headings, images, internal links, JSON-LD schema, or following the SEO checklist before publishing pages.