/kunglao-agent:init <workspace> [--type windows|linux|android|web|macos] [--lane malware|algorithm|protocol|web|data|app] — no args → guided setupfrom kunglao-agent
Initializes a kunglao-agent analysis workspace with task-spec intake, lane/target alignment, directory scaffolding, and toolchain probing. Run before any analysis engagement.
Ships in kunglao-agent. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Initializes a fresh kunglao-agent analysis workspace. Run this before any analysis; a workspace that is not initialized is refused work.
Task-spec intake (needs-first) — confirm the primary
questions / scope / constraints / depth / success_criteria BEFORE any
environment or scaffold decision: the environment is a function of the
task (env = f(task_spec)), never of the project-type template alone.
Ask the user HERE (before iteration 1), never later — the same
native-question round may also carry the workspace/target/type
answers. The answers land in <workspace>/task_spec.yaml (from
templates/state/) ahead of the step-5 toolchain probe, which derives
its requirement tiers from it: constraints.dynamic_re: forbidden
(static-only) downgrades the windows/linux VM checks from HARD to
WARN; every field the task_spec does not answer stays HARD
(conservative default — an absent task_spec is byte-identical to a
VM-required workspace).
Oracle anchors (REQUIRED — asked by the script) — init itself
asks the three answers that steer the whole loop through the
structured pending-decision channel: while any anchor is blank in
task_spec.yaml, the init run prints a pending document (stdout,
exit 8) with decision ids goal_verbatim / success_criterion /
verification_method (the last is a choice over
reproduction | replay-evidence | static | manual). Collect the
answers via the native question channel (AskUserQuestion — never
script stdin), write {decision_id: value} JSON, and re-run with
--resolve <answers.json>: the re-entry fills only the missing
fields and pre-fills task-oracle.yaml task_text from the
verbatim goal. Init never completes with blank anchors — there is no
exit-0-with-blank-anchors run to repair later. Your asking role is
to RELAY the machine's questions well, not to decide whether to ask:
goal_verbatim — the user's goal, restated VERBATIM (never
paraphrased; the verbatim form is what the completion oracle
judges).success_criterion — what counts as done, stated as a checkable
end-state (the completion anchor).verification_method — how the result is verified, one of:
reproduction / replay-evidence (either arms the
controlled-comparison oracle: byte-matched pairs become admission
and verdict requirements for every primary question) / static /
manual.
While any anchor is blank the analysis entry also refuses
(kunglao analysis exit 7) — the second line of defense; never
guess or default an anchor. For help turning a folk ask ("我要纯算")
into these answers, point the user at the README section "How to
state the task" (README.md, anchor #how-to-state-the-task).
Lane (asked by the script) — lane: malware | algorithm | protocol | web | data | app is the analysis-MATERIAL contract: it
decides whether bins/<sha> is required at all and which toolchain gate
applies. malware = binary sample (current behavior, kept byte-for-byte
for a lane-less contract or a mounted sample); algorithm = reference
corpora + trace dumps, no sample; protocol / web / data / app =
documented stub lanes. Init reads it from
task_spec.yaml, or takes --lane / --resolve {"lane": ...}; when
the workspace declares NOTHING (no lane, no task contract, no sample)
the run prints a pending document with decision id lane and NO
default — relay it like the anchors, never guess it.**Target alignment ** — run
uv run --project <SKILL_DIR> python <SKILL_DIR>/scripts/kunglao-init.py <workspace> FIRST; undecided
intake items (workspace path -> analysis lane -> analysis target ->
project type) exit 8
with a structured pending list on stdout (JSON). Collect the answers via
the native question channel (AskUserQuestion), write
{decision_id: value} JSON, re-run with --resolve <answers.json>.
No silent defaults: multi-file bins/ requires an explicit target,
MSI/APK/ZIP containers list their contents and never get a guessed type
(a magic-byte hint rides in the pending context only).
Scaffold — create the workspace directory skeleton and state files:
runs/, facts/_INDEX.md, claim-register.yaml, analysis_state.txt,
task_spec.yaml (from templates/state/; already filled by step 0 —
scaffold never clobbers it), goal-operationalization.yaml (from
templates/state/; the Phase-0 goal operationalization skeleton — the
orchestrator pre-registers it mechanically before the first dispatch;
the verbatim task itself stays in task-oracle.yaml).
Write CLAUDE.md — render the type-appropriate workspace contract from
templates/CLAUDE.md.base.tmpl; the task_spec constraints (vm_detonation,
scope exclusions, depth) are rendered INTO the contract.
Mount the material for the declared lane — lane: malware (the
default when a lane-less contract or a mounted sample exists): place the
binary at bins/<sha256> and verify the hash matches task_spec.yaml /
report; an empty bins/ on this lane is RC_NO_SAMPLE (exit 5).
lane: algorithm: no sample required — mount the reference corpora /
trace dumps under the workspace. lane: protocol|web|data|app:
documented stub lanes — mount the capture / dataset / target record;
init routes them, renders their material line and probes uv + python +
the lane's material dir, with no lane-specific toolchain claimed yet.
A workspace that declares no lane at all is ASKED (exit 8, no default)
when it also has no task contract and no sample; answering malware
keeps today's behavior.
Toolchain probe — run per-project-type probes (Windows: Ghidra-or-IDA
task_spec.yaml when present (:
static-only → the VM checks are WARN, not HARD); missing/unreadable
fields stay HARD. Hard failures report root-cause guidance; the
ask-then-install flow runs only under --assume-yes (stdin is not a user
channel).Deploy the engineering environment — init itself deploys
hooks (creates <ws>/.claude/settings.json when absent, then registers
--no-hooks is the only skip), copies the core 3
subagents to <ws>/.claude/agents/, records the MCP supply state in
env-manifest.yaml (missing registrations become MANUAL entries with
their register command — init never runs claude mcp add itself), and
writes the deployment ledger. Deployment is WORKSPACE-SCOPED:
the hooks live in <ws>/.claude/settings.json and fire only for
sessions opened inside <ws> — a Claude session started elsewhere
(another project, the repo checkout, home) loads none of them, so
kunglao's gates are silently absent there; hooks/session_start.py
prints an explicit NOT-active notice when it runs without a kunglao
workspace. --builtin-skills a,b opts into auxiliary skill
deployment (kunglao's BUILT-IN bundled skills only — globally-installed
skills are a different, future surface). Activation (which hooks FIRE)
stays a separate orchestrator act:
uv run --project <SKILL_DIR> python <SKILL_DIR>/scripts/hook_activation.py <workspace> --wire-up
remains the canonical re-registration/repair entry .Repeat init on an existing workspace resumes idempotently from
analysis_state.txt + claim-register.yaml — never rebuild or overwrite.
The workspace path is a positional argument (omitted -> pending decision).
--type selects the project type: windows | linux | android | web (no
default — an undecided type pends, exit 8). --target NAME names the
analysis target under bins/; containers additionally resolve
target_object. --no-hooks skips hook deployment (the only legal skip);
--builtin-skills a,b deploys named built-in auxiliary skills (opt-in,
default none; kunglao-bundled names only).
An empty $ARGUMENTS never starts scaffolding and never guesses the cwd:
print the guided prompt below and WAIT — one prompt, enumerated choices,
never guess, no bare argparse-style error dump.
<workspace> is required and show the canonical invocation:
/kunglao-agent:init <workspace> [--type windows|linux|android|web|macos].claim-register.yaml present), say
so: point to /kunglao-agent:analysis for the loop, or note that re-run
init resumes idempotently (never rebuild or overwrite).--typeWith a workspace but no --type, never silently default to windows:
route into the intake type-alignment sequence — a magic-number sniff is
only a suggestion, the operator confirms the type before scaffolding, and
an unresolved ambiguity is surfaced as a decision_pending item.
/kunglao-agent:init ~/cases/synth-dropper --type windows/kunglao-agent:init /cases/android-samples/xyz --type android/kunglao-agent:init ~/cases/codec-work --lane algorithm --type linux
(no binary sample: the task is a codec/algorithm recovery)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (amd2g2zz/kunglao-agent) — no native marketplace selected
npx claudepluginhub p/amd2g2zz-kunglao-agent6 skills in this plugin
/analysiskunglao-agent:analysisEnter the kunglao-agent convergence loop on an initialized workspace: dispatch specialist workers, verify evidence byte-by-byte, and drive the fact base to PROVEN convergence. The workspace must already be initialized (see /kunglao-agent:init)./helpkunglao-agent:helpPrint the kunglao-agent subcommand usage list: the commands, their arguments, and an example invocation for each. Also shown automatically when /kunglao-agent runs with no arguments./kunglao-agentUse when the user runs, starts, dispatches, or continues kunglao-agent (/kunglao-agent), or when a reverse-engineering target needs deep analysis with unresolved claims. Also auto-triggers on the user's problem phrases — Chinese OR English: "kunglao-agent 笨了", "傻等", "空转", "不收敛", "方法错了", "分析办法有问题", "失败归因", "实际进度和计划不匹配", "kunglao-agent stuck / not moving", "plan doesn't match reality", "worker reports problem / 卡住", "VM 网络不通", "should just ping". Convergence-driven RE orchestrator: dispatches specialist workers, verifies evidence byte-by-byte, refuses to conclude NEGATIVE from a failed method (forces failure_analysis first). NOT for: report writing, single quick questions, re-running CTI that already produced artifacts. Convergence loop, failure gate, and reference protocols are loaded on demand from references/.Other plugins' skills for the same job