How to: 🔧 Creating Your Own Plugin
PowerKit makes it easy to create custom plugins. Here's a minimal example:

```bash
#!/usr/bin/env bash
POWERKIT_ROOT="${POWERKIT_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
. "${POWERKIT_ROOT}/src/contract/plugin_contract.sh"

plugin_get_metadata() {
    metadata_set "id" "my_plugin"
    metadata_set "name" "My Plugin"
    metadata_set "description" "What this plugin does"
}

plugin_declare_options() {
    declare_option "icon" "icon" "󰀀" "Plugin icon"
    declare_option "cache_ttl" "number" "60" "Cache duration"
}

plugin_collect() {
    # Collect your data
    local value="42"
    plugin_data_set "value" "$value"
}

plugin_get_content_type() { printf 'dynamic'; }
plugin_get_presence() { printf 'always'; }
plugin_get_state() { printf 'active'; }
plugin_get_health() { printf 'ok'; }

plugin_render() {
    local value=$(plugin_data_get "value")
    printf '%s' "$value"
}

plugin_get_icon() {
    printf '%s' "$(get_option 'icon')"
}
```

**Learn more:** [Developing Plugins](https://github.com/fabioluciano/tmux-powerkit/wiki/DevelopingPlugins)

---