Create new CachiBot agent plugins (tools) following the project's capability-gated plugin architecture. Use this skill when adding a new tool, capability, or plugin to the CachiBot agent system — e.g., "add a translate tool", "create a web scraping plugin", "add a new capability".
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Create new CachiBot agent plugins (tools) following the project's capability-gated plugin architecture. Use this skill when adding a new tool, capability, or plugin to the CachiBot agent system — e.g., "add a translate tool", "create a web scraping plugin", "add a new capability".
metadata
{"author":"cachibot","version":"1.0"}
CachiBot Plugin Creation
Create new plugins that expose tools to the CachiBot agent. Plugins are capability-gated, meaning they're only loaded when a bot has the corresponding capability enabled.
Architecture Overview
Base class: CachibotPlugin extends Tukuy's TransformerPlugin
Skills: Each plugin exposes tools via Tukuy's @skill decorator
Registry: PluginManager bridges plugin skills to Prompture's ToolRegistry
Step-by-Step Process
1. Create the Plugin File
Create cachibot/plugins/<your_plugin>.py:
"""
<Description> plugin — <tool_name> tool.
<What it does and what external services it uses.>
"""import logging
from tukuy.manifest import PluginManifest, PluginRequirements
from tukuy.skill import ConfigParam, RiskLevel, Skill, skill
cachibot.plugins.base CachibotPlugin, PluginContext
logger = logging.getLogger(__name__)
():
() -> :
().__init__(, ctx)
._skills_map = ._build_skills()
() -> PluginManifest:
PluginManifest(
name=,
display_name=,
icon=,
group=,
requires=PluginRequirements(network=),
)
() -> [, Skill]:
ctx = .ctx
() -> :
tool_cfg = ctx.tool_configs.get(, {})
effective_arg2 = arg2 tool_cfg.get(, )
model =
ctx.bot_models:
model = ctx.bot_models.get(, )
:
result =
result
Exception exc:
logger.error(, exc, exc_info=)
{: your_tool.__skill__}
() -> [, Skill]:
._skills_map
from
import
class
YourPlugin
CachibotPlugin
"""Provides the <tool_name> tool for <purpose>."""
def
__init__
self, ctx: PluginContext
None
super
"<plugin_name>"
self
self
@property
def
manifest
self
return
"<plugin_name>"
"<Display Name>"
"<lucide-icon-name>"
"<group>"
# e.g. "Creative", "Utility", "Integration"
True
# set True if network needed
def
_build_skills
self
dict
str
self
@skill(
name="<tool_name>",
description="<Clear description of what the tool does for the LLM>",
category="<category>",
tags=["<tag1>", "<tag2>"],
side_effects=False, # True if it modifies external state
requires_network=True, # True if it makes network calls
display_name="<Display Name>",
icon="<icon>",
risk_level=RiskLevel.MODERATE, # SAFE, MODERATE, DANGEROUS, CRITICAL
config_params=[
ConfigParam(
name="<param_name>",
display_name="<Param Display Name>",
description="<What this config does>",
type="<type>", # "string", "number", "select", "boolean"
default=<default_value>,
# For select: options=["opt1", "opt2"]# For number: min=0, max=100, step=1, unit="seconds"),
],
)
async
def
your_tool
arg1: str, arg2: str = ""
str
"""Tool function docstring (shown in API docs).
Args:
arg1: Description of arg1.
arg2: Description of arg2. Defaults to plugin config.
Returns:
Human-readable result string.
"""
# Access per-tool config
"<tool_name>"
or
"<param_name>"
"<default>"
# Access bot model slots (if tool uses a specific model)