Skip to content

list

list answers “what is installed right now, and which of it is actually available to me?”

It is read-only. It writes no files and changes no configuration.

NameTypeRequiredMeaning
action"list"yesSelects this action.
other fields—noIgnored by list. id, name, effect and dryRun are not used.
skill_management({ action: "list" })

One JSON object. Every action starts with the same envelope:

FieldTypeMeaning
schemaVersionnumber1 in 1.2.x.
actionstring"list".
okbooleantrue when the registry and config were read.
warningsstring[]Human-readable notes (Chinese in 1.2.x); empty when there is nothing to report.

list adds:

FieldTypeMeaning
callerAgent.idstring | nullAgent whose rule set was evaluated.
callerAgent.verifiedbooleanfalse when context.agent was missing or not in the registry; the result falls back to a visible agent and warnings says so.
summary.totalnumberRegistered skills.
summary.disablednumberSkills whose caller effect is deny.
summary.asknumberSkills whose caller effect is ask (explicit or host fallback).
summary.divergednumberSkills whose effect differs under at least one other visible agent. hidden internal agents (title, summary, …) are excluded; their detail is still in inspect.agents[].
summary.derivedIdsnumberIds derived from paths because the registry supplied none.
skills[]object[]One entry per skill, sorted by id.
skills[].idstring | nullRegistry id, or derived from the path. null when neither exists.
skills[].namestring | nullRegistry name (frontmatter.name when it differs).
skills[].autoinvokeboolean | nullfalse means the registry turned auto-invocation off; null when the registry did not provide it.
skills[].sourcestringembedded, config, claude, agents, catalog, project, plugin or unknown.
skills[].scopestringuser or project, relative to the home directory.
skills[].statestringavailable, disabled, ask or unknown. Evaluated for the calling agent only.
skills[].pathstring | nullAbsolute path as reported by the registry.
skills[].descriptionstring | nullFirst line of the description; not truncated further.
config.filestringGlobal config file that writes would target.
config.configDirstringResolved <config> directory.
config.configDirsstring[]Candidate directories considered.
config.hadPermissionsbooleanWhether the target document already had a permissions array.
config.notesstring[]Why that file was chosen.
sidecar.filestring<config>/skill_management.state.json.
sidecar.okbooleanWhether the sidecar could be read.
sidecar.errorstring | nullRead error, without guessing at its meaning.
consistency.staleSidecarIdsstring[]Sidecar records with no matching rule in the config.
consistency.unrecordedRulesobject[]Config skill rules the sidecar does not know: resource, effect.
consistency.missingFromRegistrystring[]Recorded ids that are no longer registered.

Skill bodies are never included. Messages inside warnings are Chinese in 1.2.x; field names and values above are the stable part.

  • available — the caller’s last matching rule is allow, or an earlier rule allows it and nothing overrides it.
  • disabled — the last matching rule is deny. The skill is hidden from the model-visible list and loading it is rejected.
  • ask — the last matching rule is ask, or no rule matched at all (the host falls back to ask). list cannot tell those two cases apart; use inspect.

State is computed per agent on purpose. Merging all agents’ rules would leak a sub-agent’s deny into the caller’s view, which is a bug this project has already had to fix.

{
"schemaVersion": 1,
"action": "list",
"ok": true,
"warnings": ["另有 2 个 skill 在其它可见 agent 下状态不同(逐 agent 明细见 inspect)。"],
"callerAgent": { "id": "build", "verified": true },
"summary": { "total": 29, "disabled": 1, "ask": 0, "diverged": 2, "derivedIds": 0 },
"skills": [
{
"id": "windows-shell",
"name": "windows-shell",
"autoinvoke": null,
"source": "config",
"scope": "user",
"state": "available",
"path": "<config>\\skills\\windows-shell\\SKILL.md",
"description": "Windows shell conventions…"
},
{
"id": "pdf-tools",
"name": "pdf-tools",
"autoinvoke": null,
"source": "catalog",
"scope": "user",
"state": "disabled",
"path": "<cache>\\skills\\pdf-tools\\SKILL.md",
"description": "Read and extract from PDF files."
}
],
"config": {
"file": "<config>\\opencode.jsonc",
"configDir": "<config>",
"configDirs": ["<config>"],
"hadPermissions": true,
"notes": ["目标文件含现有 permissions,直接在其数组中追加/删除"]
},
"sidecar": { "file": "<config>\\skill_management.state.json", "ok": true, "error": null },
"consistency": { "staleSidecarIds": [], "unrecordedRules": [], "missingFromRegistry": [] }
}

Use it before a bulk cleanup, and again after disable to confirm the state actually changed.

Next: inspect when a row surprises you.