LLMSkillHub
mirroredCopied from whiteguo233/OpenBiliClaw under MIT. whiteguo233 has not claimed this page, and is not affiliated with LLM SkillHub.

whiteguo233 / openbiliclaw-adapter

Use OpenBiliClaw's versioned Agent Bridge CLI to read multi-source recommendations, profile state, dialogue, probes, saved lists, and submit explicit feedback.

0
SKILL.md
8.8 KB

OpenBiliClaw Agent Bridge Skill

Use this skill when you are inside the OpenBiliClaw workspace and need current state or want to push feedback back into the learning loop. The bridge is host-neutral: OpenClaw, Hermes and WorkBuddy use the same JSON contract.

Deployment Choice

Choose deployment by target machine capability:

  1. Docker available: prefer Docker
  2. No Docker: use local Python deployment

Bootstrap

Docker-first

Run:

docker compose up -d --build
docker exec -it openbiliclaw-backend openbiliclaw init

Keep the repository checkout available so the host can discover this workspace skill.

Local fallback

If Docker is unavailable, bootstrap locally:

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
cp config.example.toml config.toml

Then initialize OpenBiliClaw once:

openbiliclaw init

If config.toml is still missing API Key or B 站 Cookie and the terminal is interactive, openbiliclaw init will guide the operator through setup. After init, verify the adapter bridge:

uv run python -m openbiliclaw.integrations.openclaw.cli doctor

For a longer setup guide, read docs/openclaw-quickstart.md and docs/agent-integration.md.

Command Bridge

Always call the adapter through the JSON CLI bridge:

uv run python -m openbiliclaw.integrations.openclaw.cli <command> [flags]

Supported commands:

  • capabilities — negotiate agent-bridge/v2 and the complete capability list before caching tools
  • sync-account
  • get-profile
  • recommend --limit 5 [--source-platform <platform>] [--exclude-item-id <id>] [--realtime]
  • reshuffle / append — replace or append precomputed recommendation pages
  • get-delight / respond-delight — view, like, dislike, dismiss or chat about a surprise
  • activity-feed / platform-availability
  • next-probe — get the next speculative-interest hypothesis to ask the user about
  • respond-interest-probe --domain "..." --response confirm|reject|defer|chat [--message "..."]
  • next-avoidance-probe / respond-avoidance-probe --domain "..." --response confirm|reject|defer|chat
  • chat --message "..." [--session openclaw] — durable Socratic dialogue turn
  • chat-history [--session openclaw]
  • profile-edit-state / edit-profile — read or update deterministic profile overlays
  • save-local, list-saved, remove-saved — local-first saved lists
  • sync-saved --allow-state-changing — explicitly authorized native-save synchronization
  • runtime-status
  • submit-feedback --recommendation-id 7 --feedback-type like --request-id feedback-7-like-1 --note "很对胃口"
  • listen — long-running WebSocket stream for real-time push events (see below)

The complete source of truth is openbiliclaw_get_capabilities / emit-skill-descriptors; do not hard-code an older subset.

Proactive Push (WebSocket)

Instead of polling get-delight / next-probe, OpenClaw can receive real-time push notifications via WebSocket:

uv run python -m openbiliclaw.integrations.openclaw.cli listen

This connects to the runtime stream and outputs one JSON line per event:

{"ok": true, "data": {"status": "connected", "ws_url": "ws://127.0.0.1:8420/api/runtime-stream", "event_types": ["avoidance.chat", "avoidance.confirmed", "avoidance.deferred", "avoidance.probe", "avoidance.rejected", "delight.candidate", "delight.chat", "delight.disliked", "delight.liked", "delight.refreshed", "interest.chat", "interest.confirmed", "interest.deferred", "interest.probe", "interest.rejected"]}}
{"ok": true, "data": {"type": "delight.candidate", "bvid": "BV1xxx", "title": "...", "delight_reason": "...", "delight_score": 0.92, "delight_hook": "深层共鸣"}}
{"ok": true, "data": {"type": "interest.probe", "domain": "建筑美学", "reason": "...", "question": "我从你最近的轨迹里嗅到你可能对【建筑美学】感兴趣——... 这个方向你自己认不认?"}}
{"ok": true, "data": {"type": "avoidance.probe", "domain": "浅层热点复读", "reason": "...", "question": "我猜【浅层热点复读】可能是你想避开的方向——... 这个判断准吗?"}}

Default event types include delight.candidate, interest.probe, avoidance.probe and their confirmed/rejected/deferred result events. The command auto-reconnects on disconnection. Press Ctrl-C to stop.

Options:

  • --ws-url <url> — override the WebSocket endpoint
  • --events <types> — comma-separated event types to forward; omit it to use the current default manifest

Socratic Dialogue & Interest Probing

The host can proactively ask the user to clarify or confirm interests and avoidances, then send the answer back into the learning loop.

Get the next interest hypothesis

uv run python -m openbiliclaw.integrations.openclaw.cli next-probe

Returns a ready-to-ask question plus raw hypothesis data (domain, reason, specifics, confidence). If no active hypothesis exists, probe is null.

Get or answer the next avoidance hypothesis

uv run python -m openbiliclaw.integrations.openclaw.cli next-avoidance-probe

If the user confirms, rejects or defers the hypothesis:

uv run python -m openbiliclaw.integrations.openclaw.cli respond-avoidance-probe \
  --domain "浅层热点复读" \
  --response confirm \
  --message "对,这类我不想看"

Use --response defer to snooze it without treating it as a permanent rejection.

Relay the user's answer via Socratic dialogue

uv run python -m openbiliclaw.integrations.openclaw.cli chat \
  --message "嗯对,最近在看很多参数化设计的东西"

The agent replies in Socratic style (probing deeper, proposing hypotheses) and the dialogue automatically feeds back into the soul engine to refine the user's profile.

Daily Loop

Use this order for routine work:

  1. capabilities
  2. get-profile / runtime-status
  3. next-probe and next-avoidance-probe; ask and respond with the matching four-state command
  4. reshuffle --limit <n> / append (fast, precomputed) or recommend --limit <n>
  5. submit-feedback / respond-delight
  6. get-delight or listen for proactive surprise recommendations and probes
  7. sync-account when long-term signals need refreshing
  8. Use saved-list commands only when the user asked to save or remove an item

Working Rules

  1. Parse the returned JSON instead of relying on prose.
  2. If the JSON payload is { "ok": false, ... }, surface the error and stop.
  3. Prefer reshuffle --limit <n> (or append for pagination) for fast precomputed pages. recommend --limit <n> now also serves precomputed pool copy by default; add --realtime only when you explicitly want fresh per-item LLM expressions (slow). Neither triggers a runtime refresh unless you pass --refresh-if-needed.
  4. Use --refresh-if-needed only when the user explicitly wants a heavier freshness check before recommendation fetch.
  5. For every feedback action, create one stable non-empty --request-id (maximum 400 characters) and reuse it for every retry of that same action. Never reuse it for a different recommendation/type/note.
  6. For comment feedback, always include --note.
  7. For like, dislike, dismiss delight actions, create and reuse a stable --request-id.
  8. save-local is local-only; never run sync-saved without explicit user authorization and --allow-state-changing.
  9. After an upgrade, rerun capabilities; if a host caches descriptors, refresh the cache when protocol_version or skill names change.

Examples

uv run python -m openbiliclaw.integrations.openclaw.cli get-profile
uv run python -m openbiliclaw.integrations.openclaw.cli recommend --limit 3
uv run python -m openbiliclaw.integrations.openclaw.cli recommend --limit 3 --refresh-if-needed
uv run python -m openbiliclaw.integrations.openclaw.cli submit-feedback \
  --recommendation-id 12 \
  --feedback-type comment \
  --request-id feedback-12-comment-1 \
  --note "方向对,但我想看更深一点。"
uv run python -m openbiliclaw.integrations.openclaw.cli get-delight
uv run python -m openbiliclaw.integrations.openclaw.cli next-probe
uv run python -m openbiliclaw.integrations.openclaw.cli next-avoidance-probe
uv run python -m openbiliclaw.integrations.openclaw.cli respond-avoidance-probe \
  --domain "浅层热点复读" \
  --response confirm
uv run python -m openbiliclaw.integrations.openclaw.cli chat \
  --message "嗯对,最近在看很多参数化设计的东西"
uv run python -m openbiliclaw.integrations.openclaw.cli listen