kungfu-agent-onboarding

An onboarding guide for Kungfu Project environments used by an OpenCode coding agent. It explains how to discover the current project, work assignment, session, available skills, and stored work state.

In plain words
What is it for?
Use it when starting work in a Kungfu-managed OpenCode session, choosing an assignment, checking available skills, or recovering context from the project’s stored records.
Why use it?
It prevents the agent from acting on an unknown assignment or relying on hidden conversation history. It also shows where to confirm the current state with read-only commands.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kungfu-systems/kungfu/opencode
Any agent
npx skills add kungfu-systems/kungfu --skill opencode
Clone the repo
git clone --depth 1 https://github.com/kungfu-systems/kungfu

Made for: Claude Code, Codex.

Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 847 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 97% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00033 $0.00847
Opus 5 $0.00016 $0.00424
Sonnet 5 $0.00007 $0.00169
Haiku 4.5 $0.00003 $0.00085

Measured 3d ago against content hash b39a3090fbf9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

kungfu-agent-onboarding scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

97% identical to kungfu-agent-onboarding — 11 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

framework/core/src/python/kungfu/agent/skills/opencode/SKILL.md · 78 lines

What it actually says

Kungfu Agent Onboarding

When KUNGFU_AGENT_ENVIRONMENT=native-interactive, use the in-process environment envelopes before acting:

  • KUNGFU_AGENT_CONSOLE_ENVELOPE identifies the exact Project, WorkConsole, SessionAttempt, runtime Profile, and optional WorkRef.
  • KUNGFU_SKILL_CONTEXT advertises the compact Skill catalog. Load full Skill instructions only through the declared Kungfu entrypoint.
  • KUNGFU_AGENT_CONTEXT and its entrypoints are discovery pointers, not a prior chat transcript.
  • KUNGFU_PRIOR_TRANSCRIPT_BYTES=0 means continuity comes from Core evidence, never hidden provider conversation state.

Confirm current facts with read-only commands when needed:

"$KUNGFU_CLI_BIN" agent console current --json
"$KUNGFU_CLI_BIN" agent bootstrap-status --json
"$KUNGFU_CLI_BIN" agent capabilities --json
"$KUNGFU_CLI_BIN" skill catalog --json
"$KUNGFU_CLI_BIN" work status --workspace <path> --initiative-id <id> --assignment-id <id>
"$KUNGFU_CLI_BIN" agent session list --json

A bare kungfu run opencode launch is intentionally Work-unbound so many terminal windows can start in the same Project. As soon as you choose or accept one Assignment, and before editing files or invoking a Work mutation, run:

"$KUNGFU_CLI_BIN" agent console bind-work --initiative-id <id> --assignment-id <id> --json

Keep the provider UI available when bootstrap is pending or degraded, but do not create, bind, or mutate Work until kungfu agent bootstrap-status --json reports state: verified.

The plan-native-bind-work and bind-native-work capability names are internal Session protocol operations, not public CLI entrypoints; never invoke them through kungfu agent session.

When durable Work may reduce continuity, handoff, evidence, duplicate retry, or external-write risk, submit only bounded structured signals to kungfu agent work-advisory --signals <signals.json> --json. Never include a transcript, hidden reasoning, credentials, or unrelated context. For recommend, show the returned preview and ask its single confirmation. Only after confirmation use the returned existing kungfu.work.capture, kungfu.work.admit, and kungfu.agent.console.bind-work path, cite its receipts, and continue the original task. Suppress a decline for the returned evidence root until the structured evidence changes. Advice grants no external authority.

For Skill reuse or creation, send only rooted catalog/Work/requirements evidence, candidate roots, enums, and booleans to kungfu agent skill-advisory --signals <signals.json> --json. Consume its shared policy root sha256:dc8ebb873760e55c40ef19b8354ba1e2b91706064a48dec00b1eb8dac0479267; do not reproduce the decision policy in provider prose. The result is read-only.

Do not continue unless it returns status: bound. If Kungfu reports native_work_already_active, stop this Work in the current terminal and follow the returned guidance; never bypass the guard or become a second writer.

Do not infer Work completion from terminal output or process exit. Mutate Work only through public Profile/KFD actions and their receipts. The Kungfu TUI is an observer of this native UI and never owns OpenCode input or transcript bytes.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 78 lines · 33 tokens per session scan A b39a3090fbf9

Subscribe to this mod's changes

kungfu-agent-onboarding is a skill published in the GitHub repository kungfu-systems/kungfu (4,507 stars, last pushed yesterday), licensed Apache-2.0. It adds 33 tokens to every session and 847 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to kungfu-agent-onboarding, differing in 11 lines, and is treated as a copy.