@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
systemPrompt directly — coexists with OpenClaw's own GPT5_BEHAVIOR_CONTRACT and other plugins.
Install
npm install -g @skillfm/openclaw-plugin
Verify after install
openclaw run "看下我家 AI 的状态"
grep "SkillFM Beacon helps users" ~/.openclaw/logs/*.log
If 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.instructions field 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_build hook.
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