@skillfm/openclaw-plugin
v0.2.5
Published
SkillFM Beacon Agent Forcing plugin for OpenClaw — injects the SkillFM behavior contract into the agent system prompt (cache-friendly via before_prompt_build) plus hook-layer redirect (before_tool_call blocks wrong tool, before_agent_reply rewrites skippe
Maintainers
Readme
@skillfm/openclaw-plugin
V2 Agent Forcing Stack L1 — OpenClaw adapter for SkillFM Beacon.
Injects the SkillFM behavior contract into the OpenClaw agent system prompt via the before_prompt_build hook (cache-friendly), so the agent reliably picks skillfm_* MCP tools instead of going for generic shell exec.
What it does
When loaded, this plugin registers a before_prompt_build hook that returns:
{ prependSystemContext: SKILLFM_BEHAVIOR_CONTRACT }Per OpenClaw's plugin-sdk docs, prependSystemContext is placed above the cache boundary (<!-- OPENCLAW_CACHE_BOUNDARY -->), so the contract is reused across turns by Anthropic / OpenAI / DeepSeek / etc. prompt caching.
What it does NOT do
- Does not register MCP tools — those live in the @skillfm/local Beacon MCP server, registered with OpenClaw via
mcp.servers.skillfm-beacon. - Does not block tool calls (
before_tool_call) — held back to Sprint 2 (L2 Hook Enforcement) to avoid false positives on legitimate bash. - Does not modify
systemPromptdirectly — coexists with OpenClaw's ownGPT5_BEHAVIOR_CONTRACTand other plugins.
Install
# OpenClaw must already be installed (peer dependency)
npm install -g @skillfm/openclaw-plugin
# Then enable in ~/.openclaw/openclaw.json:
# {
# "plugins": {
# "skillfm-forcing": { "enabled": true }
# }
# }Verify after install
# Trigger a turn that exercises agent forcing:
openclaw run "看下我家 AI 的状态"
# Then grep your OpenClaw session log for SKILLFM_BEHAVIOR_CONTRACT:
grep "SkillFM Beacon helps users" ~/.openclaw/logs/*.logIf the agent calls skillfm_checkup instead of curl localhost:45219/status, forcing is working.
Architecture
This plugin is one of four surfaces injecting the same SkillFM behavior contract (V2 PRD §2.3, single-source-of-truth):
- L0 fallback:
__unlock_skillfm_beacon__MCP tool (in@skillfm/local) — agent-discoverable bootstrap when L1 adapters fail. - L1 Claude Code:
server.instructionsfield on the Beacon MCP server (Claude Code 1/7 honors). - L1 Claude Code:
~/.claude/skills/skillfm/SKILL.md(Anthropic Skills format). - L1 OpenClaw: this plugin's
before_prompt_buildhook.
The contract content (SKILLFM_BEHAVIOR_CONTRACT) is duplicated across these packages but kept byte-identical via the scripts/check-protocol-parity.mjs CI guard in the SkillFM monorepo.
License
MIT — © SkillFM
