skrift-hooks

Register actions and filters for Skrift CMS lifecycle events.

1|3|Updated Jun 17, 2025
One-click install
npx skills add https://github.com/Smarter-Dev/smarter-dev --skill skrift-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skrift-hooks
Source: https://github.com/Smarter-Dev/smarter-dev/tree/main/smarter_dev/.claude/skills/skrift-hooks
Command: npx skills add https://github.com/Smarter-Dev/smarter-dev --skill skrift-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Skrift provides a decoupled mechanism to extend behavior by offering actions (fire-and-forget events) and filters (transform values through a chain of handlers).

Core Features & Use Cases

  • Actions trigger side effects at defined lifecycle points without returning a value.
  • Filters transform data stepwise through registered handlers, enabling progressive customization (e.g., enhancing SEO metadata or template context).
  • Use cases include plugin-like extensions, custom analytics, and global cross-cutting behaviors.

Quick Start

Install and import the hook system, register actions and filters using the provided decorators or runtime APIs, and trigger them with do_action and apply_filters to extend behavior.

Frequently Asked Questions about skrift-hooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add custom hooks and filters to a headless CMS?

To add custom hooks and filters to a headless CMS, use a system that provides actions for fire-and-forget side effects and filters for stepwise value transformations. This enables plugin-like extensions across page lifecycle events.

What is the difference between actions and filters in CMS extensibility?

In CMS extensibility, actions trigger side effects at defined lifecycle points without returning a value, while filters transform data stepwise through registered handlers to enable progressive customization like enhancing SEO metadata.

How do I register custom analytics or SEO metadata filters during page rendering?

You can register custom analytics or SEO metadata filters during page rendering by using decorator-based or runtime APIs. These hooks apply transformations across content rendering scenarios through a central hooks registry.

How do I manage execution order when multiple plugins extend the same CMS lifecycle event?

To manage execution order when multiple plugins extend the same CMS lifecycle event, the hook system uses clear priority handling within its central registry to deterministically control the sequence of registered actions and filters.

Can I create plugin-like extensions for Skrift CMS without modifying core code?

Yes, you can create plugin-like extensions for Skrift CMS without modifying core code by registering actions and filters. This decoupled mechanism applies global cross-cutting behaviors across page lifecycle events using do_action and apply_filters.