.claude/skills/klytos-hooks-reference/SKILL.md
Complete reference of all hooks (actions and filters) available in Klytos CMS for intercepting and extending functionality. Use when hooking into Klytos events, modifying behavior through filters, adding custom behavior at lifecycle points, or understanding the hook system and priorities.
npx skillsauth add joseconti/klytos Klytos Hooks ReferenceInstall 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.
| | Actions | Filters |
|---|---|---|
| Purpose | Execute code at specific points | Modify and return data |
| Return | None (void) | Modified value |
| Register | klytos_add_action() | klytos_add_filter() |
| Fire | klytos_do_action() | klytos_apply_filters() |
klytos_add_action(string $hook, callable $callback, int $priority = 10): void
klytos_do_action(string $hook, mixed ...$args): void
klytos_add_filter(string $hook, callable $callback, int $priority = 10): void
klytos_apply_filters(string $hook, mixed $value, mixed ...$args): mixed
klytos_remove_action(string $hook, callable $callback): bool
klytos_remove_filter(string $hook, callable $callback): bool
klytos_has_action(string $hook): bool
klytos_has_filter(string $hook): bool
klytos_remove_all_actions(string $hook): void
klytos_remove_all_filters(string $hook): void
klytos_did_action(string $hook): int // Times action was fired
klytos_get_fired_actions(): array // ['hook' => fire_count, ...]
klytos_get_registered_hooks(): array // ['actions' => ['hook' => count], 'filters' => [...]]
IMPORTANT: ALWAYS use the global
klytos_*functions. NEVER useHooks::class methods directly. TheHooksclass is an internal engine — plugins and core code must use theklytos_*wrappers.
klytos_current_admin_page(): string // 'settings', 'users', 'dashboard', etc.
klytos_is_admin_page(string $page): bool // Exact ('settings') or prefix ('settings.*')
page.before_save, page.after_save, page.before_delete, page.after_delete (actions)page.content (filter)build.before, build.after, build.page.before, build.page.after (actions)build.page.output, build.head_html, build.body_end_html, build.sitemap_urls (filters)build.llms_generated (action) — after llms.txt + llms-full.txt + .html.md are generated, receives $stats arraybuild.llms_txt (filter) — modify llms.txt content before writingbuild.llms_full_txt (filter) — modify llms-full.txt content before writingbuild.page_markdown (filter) — modify per-page Markdown before writing .html.md, receives ($md, $page)build.llms_pages (filter) — modify/reorder/add pages array for LLM file generationmcp.tools_list (filter) — register new toolsmcp.handle_tool (filter) — handle tool callsmcp.tool_response (filter) — modify responsesmcp.tool_called (action) — tool was calledauth.before_login, auth.after_login (actions)auth.capabilities (filter)admin.sidebar_items (filter) — customize sidebaradmin.head, admin.footer (actions)admin.{page}.before, admin.{page}.after (actions)block.before_save, block.after_save (actions)block.rendered_html (filter)page_template.before_save, page_template.after_save, page_template.approved (actions)plugin.activated, plugin.deactivated (actions)plugin.loaded, plugin.installed (actions)installer/core/hooks.phpinstaller/core/helpers-global.phpFor the complete hook catalog with all arguments and sources, see the references/complete-hooks.md file.
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.