Skip to main content

Module skill

Module skill 

Source

Structs§

Entry
Outcome
StatusRow

Enums§

Action
Agent
RemovalOutcome
Distinguishes why an entry did not end up removed, so the caller can be honest about it instead of collapsing “refused because modified” and “wasn’t there to begin with” into the same boolean.
State

Constants§

SKILL_MD
The skill text ships inside the binary, so every upgrade path — brew, cargo, bb update — carries new content as an inherent consequence rather than needing a separate sync. It also means the installed skill can never describe a flag this binary lacks.
SKILL_NAME

Functions§

content_hash
detect_agents
.cursor/ and .opencode/ both read .agents/skills/, so their presence asks for the .agents write rather than a location of their own.
install
load_state
Entries plus an optional warning. A missing state file simply means nothing is tracked; a corrupt one is reported but treated as empty, so a hand-edited file cannot brick bb update.
refresh_tracked
Refreshes every tracked entry against the currently-running binary’s embedded text. Driven by the recorded entries rather than a root and an agent list, so a single call spans every project the user has installed into. Uses the same drift rules as install, via state_of: Stale or Missing rewrites the file and updates the recorded hash, Modified is left byte-identical and reported as SkippedModified, and Current is reported as Unchanged without touching anything.
save_state
skill_file
Where the real file lives for each agent.
state_path
status
uninstall
Removes what bb recorded. A customized file is left in place unless force, and an untracked file is never touched at all.