013 · Skills
Skills, the skills policy and skill scripts (spec_013_skills)
| Status | Implemented. Reverse-engineered from 53f8c53 (2026-09-24) and kept with the code since; its paths checked 2026-09-27 (//tools/specs). |
| Source | pkg/engine/skills/{skill,definition,policy,provider,folder,save,scenarios}.go, pkg/engine/{skillfiles,skillmentions,skillscenarios}.go, pkg/service/server/skills_edit.go, pkg/service/server/skillscenarios.go, apps/desktop/web/src/studio/SkillScenarios.tsx, apps/desktop/web/src/studio/SkillsPane.tsx, SkillFiles.tsx, CodeArea.tsx, skillForm.ts, apps/desktop/web/src/skillMention.ts, pkg/engine/skills/builtin/*; pkg/engine/tools/{skills_tools,skillscript,pyenv,scriptbox,scriptbox_gvisor_linux}.go |
| Tests | pkg/engine/skills/*_test.go (save_test.go: kinds, names, saving, files; scenarios_test.go: scenarios, trigger phrases and matching); pkg/engine/skillscenarios_test.go; pkg/service/server/skillscenarios_test.go; pkg/engine/skillfiles_test.go; pkg/service/server/skills_edit_test.go; apps/desktop/web/src/studio/skillForm.test.ts, skillMention.test.ts; pkg/engine/tools/skills_tools_cov_test.go (meta skills, agents, references), skillscript_test.go (TestRunShellScript); pkg/engine/tools/skillscript_test.go, pyenv_test.go, scriptbox_test.go, scriptbox_gvisor_linux_test.go; apps/cli/internal/tui/skills_test.go, envs_test.go |
| Depends on | spec_002_config, spec_005_approvals, spec_007_shell (OS sandbox) |
Skills are reusable instructions (SKILL.md) an agent loads on demand, optionally shipping scripts. Frontmatter follows the Agent Skills fields plus Castor’s castor.skills.v1.SkillDefinition (proto field names). A host skills policy caps what any skill may do; the stricter of the skill’s request and the policy always applies. Scripts run only sandboxed, read the workspace but never write it.
- SK-01 Built-in skills are embedded (
code-review,git-workflow,testing-tdd,sql-query, and since v0.8.4python-uv, the blitz agent’s: before making a uv project it asks which layout, an app, a packaged app, a library, a single script or a workspace, with the Python version and tools, instead of assuming a flat project; project-setup asks a Python project’s layout in its interview and writes it in.agents/AGENTS.md; 2026-10-28 it’s offered tocodertoo), and since 2026-10-28 the language skillsgo,pythonandreact, offered toblitzandcoder(spec_014_agents AG-14a): each says to follow the project’s own conventions first, how to write, test and check code in that language, and what to run before calling it done; andplaywright, offered to the same two: walk a flow in the built-in browser (thebrowsertool, through Blitz’s proxy and approvals) and keep it as@playwright/testspecs run by the project’s own browsers, never by attaching Playwright to the built-in one; without aplaywright.config.*it offers (one question) to write one from the project’s dev command, port, package manager and test folders, to run Playwright’s own setup, or neither, then adds the dev dependency, atest:e2escript and the.gitignoreentries; a failing spec’s steps are replayed in the built-in browser to see why. External skills areSKILL.mdfiles underskills.paths:~/.blitz/skills, and the project’s./skillsand.agents/skills, whose scripts run only once the project’s settings are trusted (spec_031_project_config). - SK-01b 2026-11-08 (the owner: “If there’s a mermaid skill (and there should be), then it should have a detailed section for node styling as most models don’t hand this well”, with Material 3’s contrast guidance “since models consistently make odd/even row issues”). A built-in
mermaidskill (pkg/engine/skills/builtin/mermaid/SKILL.md): leave a diagram unstyled unless asked; hex colors only, in thebasetheme’s front matter; node styling withclassDef,class,:::,style,classDef defaultandlinkStyle; for ER diagrams, that a class’sfillcolors only the header and the even attribute rows while its textcolorapplies to every row (Mermaid 11.17.2’s renderer, checked by rendering), so bothattributeBackgroundColorOddandattributeBackgroundColorEvenare set whenever a fill or text color is; and Material 3’s color roles in pairs, each background with its own “on” color for text, light and dark, with their computed contrast (4.5:1 for text, 3:1 for borders), and a checklist. Itsblitzsibling (spec_060 DRV-20) is built in beside it. - SK-01a 2026-11-05 (scan N26-engine-sub-2#27: a built-in skill whose
SKILL.mddidn’t parse was dropped without a word). A built-in skill that doesn’t parse fails the provider (NewProviderreturns the error): it’s Blitz’s bug, caught by its tests, never a skill that quietly isn’t there. - SK-02 External skills cannot replace built-ins (reported). Parse errors are reported (a typo must not make a skill vanish silently) while other skills still load. Neighbouring resource files are indexed.
- SK-02a 2026-11-05 (scan N26-engine-sub-2#1, #2, #4, #5: a plugin’s skill silently replaced the organization’s locked skill of its name; a
---inside a value ended the front matter, so the keys after it became instructions; aSKILL.mdin a skill’snode_modulesor.venvloaded as a skill; an unreadableSKILL.mdor folder vanished). When two folders hold a skill of one name, the later folder’s wins (the workspace’s over the person’s), except that a skill in the organization’s locked folder (spec_053 EN-31) wins over a skill of its name from any other folder, a plugin’s included, whichever is searched first, and the clash is reported (“skill "x" is locked by your organization”). The front matter ends at the first line that is only---(trailing spaces and a CR allowed), never at a---inside a value; a leading BOM is skipped (one splitter,frontmatter.Split, forSKILL.md, scenarios, rules’ editors and Studio); Studio writes a text field that YAML would read as something else (true,1.10,null) quoted. Discovery skips the folders the stamp skips (SK-95). ASKILL.mdor a folder that can’t be read is reported like a parse error. - SK-03
Listis sorted by name;Searchmatches name, description or tags.
- SK-10 Agent Skills fields:
name,description,license,compatibility,allowed-tools,metadata. Castor fields:tags,version,author(s),allowed_tools(legacy),tool_requirements[{name, scopes, description}],category,trigger_phrases,execution_hints{preferred_model, requires_human_approval, environment_variables, timeout_seconds, custom_hints, hitl_tier, allow_hitl_bypass},compiled_reference,scripts[],skill_id,uri,source_uri. Unknown keys are ignored. - SK-10a 2026-11-05 (scan N26-engine-sub-2#3:
require_human_approvalmisspelt dropped a tier 3 skill to the policy’s floor, andagent: [x]offered the skill to every agent, without a word). Unknown keys insideexecution_hints,scripts[]andcompiled_reference(Blitz’s and Castor’s blocks) are definition problems (SK-14: shown with the skill, its scripts don’t run), and so is a top-level key one letter off a known one, or differing only in case,-,_or a plural (agent: [reviewer], “did you mean "agents"?”). Other unknown top-level keys are other tools’ and still ignored, as is Claude Code’sagent:with a single name. - SK-11 Script:
name(letters, digits,. _ -, unique),language(python/typescriptor proto enum names; required), exactly one ofinline_code,storage_uri(https, orgs://bucket/object; withstorage_sha256, SK-49),relative_path(must stay inside the skill directory),entry_point,dependencies,timeout_seconds ≥ 0,environment_variables(valid names). - SK-12 HITL tiers by name only (
HITL_POLICY_TIER_2_AUDITED_WRITE,TIER_2_AUDITED_WRITE,tier_2); bare numbers are refused (the proto enum is offset by one). Declared tier =hitl_tier, else the compiled reference’s, and at least tier 3 whenrequires_human_approval. - SK-13 Network need:
custom_hints.network=true/required(no proto field yet). - SK-14 A skill with definition problems still loads (instructions are useful) but its scripts don’t run.
- SK-15 Content hash: SHA-256 over every regular file in the skill directory in path order (relative path, size, content), symlinks skipped, format
sha256:<hex>, bounded size.
- SK-20 Blocks for all scripts: definition problems; unhashable content;
trusted_hashesset and the hash not listed; a tool requirementnameorname:scopematchingdeny_toolsglobs; network needed but not granted (granted only withnetwork = "allowlist"and the skill innetwork_allow). - SK-21 Tier: stricter of declared and
min_hitl_tier(0 or 1 → tier 1; capped at 3; default 2). Tier 0 (bypass) requires both the skill’sallow_hitl_bypassand the policy’s; otherwise it becomes tier 3. - SK-22 Environment: variables the skill asks for pass only if they match
env_passthroughglobs; the rest are withheld (reported). - SK-23 Per script: language must be in
languages(defaultpython,typescript); timeout = script’s, else hints’, capped bymax_timeout_seconds(300) which also applies when none is set; each dependency must be a plain PEP 508 requirement (no URLs, paths or pip options), not inpackages.deny, inpackages.allowif set (PEP 503-normalised names, globs), and pinned==whenrequire_hashes. - SK-23 2026-11-05 (scan N26-api-client-config#13). The default
languagesis every one ofScriptLanguages(SK-105, SK-106), not python and typescript. - SK-24
Problems()of the policy are warned at startup and bydoctor.
- SK-80 Custom slash commands (
pkg/engine/commands): Markdown files in~/.blitz/commands/(user) and the workspace’s.blitz/commands/,.claude/commands/,.agents/workflows/(project, which win; a.flow.yamlthere is a workflow, spec_043_workflows, run by the same/name; prompt text, so no trust is needed — spec_027_parity §12.3), read on each use. The name is the path without.md, subdirectories as:namespaces, lower case ([a-z0-9][a-z0-9._-]*). Optional frontmatter:description(else the body’s first line),argument-hint,agent,model,allowed-tools(a list or a comma/space-separated string;Bash(git *)stays one entry),mode: plan; unknown modes and empty bodies are errors, reported once. - SK-80 2026-11-05 (scan N26-engine-sub-1#12, #14: front matter was read leniently, so
allowed_tools,allowedTools,allowed-tools: []or a mapping gave the turn every tool; an unreadable subfolder’s commands vanished without a word). Command front matter is read strictly: a key Blitz doesn’t know is the command’s problem (Claude Code’sdisable-model-invocationand a catalog’slockandgroupsare accepted and ignored).allowed-toolsleft out is no limit; present with nothing in it ([],"", no value) is no tools; anything else that isn’t a list of names or a string is the command’s problem, never every tool. A folder that can’t be read is reported with the rest. - SK-81 Expansion:
$ARGUMENTSis everything typed after the name,$1–$9its words; without either, the arguments are appended. The turn (Turn.Command) sends the expanded prompt and records the line as typed;agent/modelapply to that turn only (ENG-16),allowed-toolslimits it (runtime.WithAllowedTools; Claude Code names map to Blitz tools,Bash(…)counts as the shell tool),mode: planplans it.ErrUnknownCommand/UNKNOWN_COMMANDotherwise. - SK-82 Every skill is a command
/<skill-name> <request>, whose prompt carries the request and the skill’s instructions (bundled and file commands of the same name win). Bundled commands:/reviewand/security-review(plan mode: read-only reviews of the uncommitted changes, a branch or files, verified findings with file and line),/simplify(behaviour-preserving cleanup of the changed files, then tests),/verify(find and run the project’s build, lint and test commands and report),/grill-me <task>(plan mode: the agent asks clarifying questions withask_user_question, one at a time, until what’s left wouldn’t change the approach, then proposes one; it writes nothing, and the transcript records/grill-me <task>; BL-CLI-02),/setupand/spec(the harness and the specification, spec_012_memory MEM-22, MEM-42),/skills-updateand/agents-update(MEM-44;/skills updateand/agents updateare the same,commands.Alias). Built-in REPL commands win name clashes;/helplists the custom ones with their source;ListCommandsserves them. - SK-82a 2026-11-05 (scan N26-engine-sub-2#17: a skill’s
allowed-tools, edited in Studio as “Tools it may use”, limited nothing)./<skill-name>holds the turn to the skill’sallowed-tools(else Castor’sallowed_tools), read as a command’s (Blitz’s names or Claude Code’s,Bash(git *)counting as Bash), plusactivate_skill,read_skill_fileandrun_skill_scriptso its references and scripts still work; a skill that names none sets no limit. It’s a limit, never a grant: the permission rules still apply. A skill the agent activates itself, or one mentioned with\skill-name, sets no limit (the turn may use several).
- SK-30
list_or_search_skills(query optional) → name, description, tags. - SK-31
activate_skill(skill_name)→ the full instructions and resources, plus each script with description, whether the policy allows it, and why not. - SK-32
run_skill_script(skill, script, args?)→exit_code, stdout, stderr, timed_out, sandbox, tier, output_dir, output_files, error. Registered only when skills are enabled. - SK-33 Engine: when skills exist, the root agent’s instructions list them and suggest
activate_skill(spec_016_engine ENG-02).
- SK-40 The script must be allowed by the policy. Approval by tier: tier ≥ 3 asks every time with no key (not rememberable); tiers 0–2 run without asking and are audited (
auto-tier_n). - SK-41 Dependencies: an isolated environment per distinct (python, normalised deps, index, wheels-only) in
~/.blitz/envs/<key>. Installing needs its own approval showing the exactpip install --index-url … [--only-binary :all:] -- depscommand, rememberable (keypyenv:<key>) for exactly that list. Built inside the script sandbox with the network on and writes only to the environment and package cache, withuvif installed elsevenv+pip, frompackages.index(default PyPI), wheels only by default. The environment is used only after its marker file is written (an interrupted build is rebuilt). The system Python is never modified. Build time is bounded. - SK-41a 2026-11-05 (scan N26-engine-tools-2#25: the prompt showed
pip install … -- depswhichever installer ran, and pip ran without the--). The prompt shows the install command as it runs, from the same words (installArgv):uv pip install --quiet --python <env>/bin/python --index-url … [--only-binary :all:] -- depswith uv, else<env>/bin/python -m pip install --quiet --index-url … [--only-binary :all:] deps. - SK-42 Environment passed:
PYTHONDONTWRITEBYTECODE=1,PYTHONNOUSERSITE=1,SKILL_DIR, the policy-allowed variables, and at tier ≥ 2 (or bypass)SKILL_OUTPUT; plus a fixed PATH, private HOME and TMPDIR, LANG. Nothing else is inherited. - SK-43 Writes: tier 1 — nothing but its private
/tmp; tier ≥ 2 and bypass — only.blitz/skill-output/<skill>/<run>/in the workspace. The workspace is readable. The agent reads the results there and applies changes with the file tools (so diffs, approvals, checkpoints and/undowork). Output files are listed in the result. - SK-46 TypeScript (BL-SK-01): the script runs on the system
node, 22.6 or later (SystemNode; else refused with the reason), with its types stripped (--experimental-strip-types --no-warnings), from a temporary copy of the skill (or the inline code as<name>.ts) so it can import its neighbours. Its npm dependencies go into an environment per distinct set in~/.blitz/node-envs/<key>(NodeEnvs), built as Python’s are (SK-41) withnpm install --ignore-scripts(no package’s code runs at install) from[skills.policy.packages.npm] registry, approved once per exact list (keynodeenv:<key>); anode_moduleslink beside the copy finds them. Each dependency must be a plainnameorname@version(scoped names too; no tarballs, git, file or alias specs), innpm.allowwhen set, not innpm.deny, and withnpm.require_exactan exact version.entry_pointimports the module and calls the named export; a number it returns (or resolves to) is the exit code. The Python-only variables aren’t set; the sandbox, writes, variables and timeout are as for Python./envslists Python’s environments only. - SK-47
execution_hints.writes_workspace: true(BL-SK-02): the skill’s scripts run in a copy of the workspace (its working directory; not.git, blocked paths, symbolic links or files over the size limit; refused past 512 MiB or 50,000 files). When the script succeeds, what it changed, added or deleted in the copy is shown as one diff in an approval asked every time and never remembered, as for tier 3 (MustAsk, kindwrite); approved, it is written through the workspace (WriteFileAtomic,RemoveFile), so it joins the turn’s checkpoint and/undoreverts it, andchanged_fileslists it. Refused, or when the script fails or times out, nothing reaches the workspace.activate_skillsayswrites_workspace. The script’s tier approval (SK-40) still applies before it runs. - SK-47a 2026-11-05 (scan N26-engine-tools-2#13: keeping a script’s changes wrote over a file the user edited while the script ran or the question waited). The changed paths are held (as the file tools hold theirs) from before the question until they’re written, and once approved, if any of them isn’t as it was when the copy was made (edited, made or deleted meanwhile), nothing is written: “changed while waiting for approval”. A file the workspace won’t read (blocked, too large) is left to its write, which fails on its own as before; the other files are still written one by one, not all-or-nothing.
- SK-48 A Python script’s interpreter requirement (BL-SK-03): its definition’s
requires_python, elserequires-pythonin its PEP 723 metadata (# /// script…# ///), a PEP 440 specifier set of release versions (>=3.11,<3.14,~=3.11,==3.12.*). The systempython3runs it when it meets it. Otherwise, withuv(onPATHor in~/.blitz/bin), an interpreter uv finds for it (uv python find, never downloading) does; when there’s none, one is installed after an approval rememberable per requirement (keyuvpython:<spec>), withuv python installinside the script sandbox (network on, writes only to uv’s Python directory and cache). Without uv the script is refused, saying which Python it needs and which the system has. Environments (SK-41) are per interpreter, so each gets its own. - SK-49
storage_uriscripts (BL-SK-04):https://…as it is,gs://bucket/objectthroughhttps://storage.googleapis.com/bucket/object(public objects). The definition must pin the content withstorage_sha256(hex; Blitz’s field, since Castor’s proto has none; SKILL.md’s content hash, and sotrusted_hashes, covers it). A run fetches it under the web rules, asweb_fetchdoes:[web]enabled and the sandbox’s network, public addresses only (unlessallow_private),deny_domains, and approval per host (web:<host>) unlessallow_domainsor an allow rule covers it; at most 10 MiB, no redirect to another host. A wrong hash refuses the run. The content is kept by its hash in~/.blitz/skill-cache, so later runs don’t fetch; then it runs as inline code would. - SK-34
activate_skillalso lists the skill’s Castorresourcesasassets: id, name, description, category (document_text, …), MIME type, size, a URL to fetch (the public URL, else thegcs_urithrough Cloud Storage’s endpoint), inline content, the interpretation’s summary, and its text whenauto_inject_contextis set (each at most 16 KiB). - SK-44
entry_point: the named function is called (module not run as__main__) and its return value is the exit code. - SK-45 Stopped at its timeout or on Ctrl+C.
- SK-50
gvisor(Linux): each run in its own rootless gVisor sandbox (runscfrom PATH,~/.blitz/binorRUNSC_PATH, beside itsgvisor-bin/); root is empty, only host binaries/libraries,/etcand the request’s paths are mounted,/tmpis a private tmpfs, home directories don’t exist, network off unless allowed. Probed once with/bin/true; teardown uses its own context so a cancelled turn still cleans up. State in~/.blitz/sandboxes. - SK-51
os: Seatbelt/bubblewrap built per request — writes only to writable paths and a private temp, blocked paths hidden, network as allowed; rest of the filesystem readable. - SK-52
auto(default): gVisor if its test run works, else the OS sandbox (the reason is shown bydoctor). There is no unsandboxed fallback: without a sandbox (e.g. Windows) scripts don’t run (ErrNoScriptBox).
- SK-60
/envslists key, packages, skills that used it, size, last use, ready;/envs remove <key>;/envs pruneremoves incomplete environments and those no policy-allowed script needs.
CI’s Linux build runs the tests that install for real, which need the network (BLITZ_PYENV_TESTS=1, BLITZ_UV_PYTHON), with Node 22 and uv set up, and fails if any skips (BL-SK-06).
- SK-70
/skills list|show <name>|search <q>(andinstall,registry: SK-92, SK-96);showgives scripts, dependencies, tier, what the policy allows, and the content hash (fortrusted_hashes).doctorreports unparseable skills, blocked scripts and the script sandbox.
2026-10-14 (#36). Skills installed from registries such as Castor (pkg/skillreg). A registry is an index anyone can serve; Castor serves it from its registered, hashed skills (its CompiledReference hash is an index entry’s sha256).
- SK-90 The index (version 1, JSON):
{"version": 1, "name": "...", "skills": [{"name", "description", "version", "archive_url", "sha256", "castor_id?"}]}.archive_urlis absolute or relative to the index;sha256is the archive’s hash, hex. Another version is refused, naming it. - SK-91 Registries are an https URL (http only for localhost) or a local file, added with
blitz skills registry add <url> [--name n] [--token-stdin]or Settings › Library › Skills, checked by reading the index first, named after it unless named. They’re kept in~/.blitz/skill-registries.toml(0600), a token in the system keychain (skill-registry:<name>), never in a file. The token goes asAuthorization: Bearerto the registry’s own host only, never to an archive elsewhere; errors name URLs without their query. Removing a registry forgets its token; its skills stay. - SK-92 Install (
blitz skills install <registry>/<name>|<name> [--project],/skills install … [--project], Install in Settings): the archive (a .zip, at most 32 MB) must matchsha256; it may hold at most 1,000 regular files and 64 MB unpacked, nothing outside it, no links;SKILL.mdat its root or in its one folder must name the skill. It’s unpacked beside the skills and swapped in, into~/.blitz/skills/<name>or<workspace>/.agents/skills/<name>, and recorded with its registry, version and hash. A folder of that name Blitz didn’t install is never replaced (ErrExists); a name two registries offer must be qualified.skills.policyapplies when it loads, as to any skill. - SK-93 Update (
blitz skills update [name…], Update all) reinstalls those whose registry now gives another hash, in place; uninstall removes only a skill it installed; list shows them. - SK-93a 2026-11-05 (scan N26-followups#4: given a workspace, uninstall looked in the user’s folder first, so uninstalling a project skill the user also had removed the user’s copy). Uninstall with a workspace (
blitz skills uninstallin one, or Settings for the active workspace) removes the workspace’s copy, and the user’s only when the workspace has none of that name; without a workspace, the user’s. - SK-94 Search (
blitz skills search [words];/skills searchadds “In your registries” when there are any; Settings) matches every word in the name or description across registries; one that can’t be read is reported while the others answer. - SK-95 Live: the skills provider remembers a stamp of each folder and searches them again when one changes, so a skill installed, updated, edited or removed (from a registry, by
/skills update, by the agent, in an editor) is seen by open sessions at its next look, without a restart. 2026-10-16: the stamp is everySKILL.md’s path, size and modification time and its folder’s time (it was the top folder’s time alone, so aSKILL.mdedited in place was missed until a restart); the look skips.git,node_modules,.venv,venvand__pycache__, which a skill may keep an environment in. Each turn looks (Provider.Refresh), and a change rebuilds the agent, whose prompt lists the skills;/reloadsearches again regardless (Provider.Reload) (spec_012_memory MEM-25). - SK-96 The desktop app: Settings › Library › Skills (advanced) lists the registries (with a key when one has a token; remove), adds one (index address and an optional token), finds skills and installs them for the user or the active workspace, and lists those installed with Update all and uninstall, through
ConfigService(ListSkillRegistries,AddSkillRegistry,RemoveSkillRegistry,SearchRegistrySkills,InstallRegistrySkill,UpdateRegistrySkills,UninstallRegistrySkill; reasonsNO_REGISTRY,NOT_OFFERED,AMBIGUOUS,HASH_MISMATCH,SKILL_EXISTS,NOT_INSTALLED,REGISTRY_FAILED)./skills registryopens it. - SK-96a Since v0.7.1 (the owner’s request). Settings is global, so Settings › Library › Skills holds no workspace’s skills: the registries come first (SK-96), then Built in, the skills Blitz ships with, by name, with their version and description (
ConfigService.ListBuiltinSkills, fromskills.Builtins, no workspace needed). A workspace’s own skills are that workspace’s (next).
- SK-97 A skill is one of four kinds, told from its folder rather than a field (
Skill.Kind): simple (SKILL.md alone), references (areferences/folder), scripts (scripts, declared or found; it may have references too) and meta (front matterskills:names other skills).SkillInfo.kindsays which. - SK-98 References and found scripts (
scanBundle, for skills on disk and built in): every file underreferences/is listed asreferences/<path>(Skill.References, also inResources), returned byactivate_skill(references) and read with the new toolread_skill_file(skill_name, path), confined to the skill’s folder (64 KiB, then truncated). When the front matter declares no scripts, each.pyand.tsinscripts/is a script named by its file (ScriptDefinition.Found,SkillScript.found), under the same policy, approval tiers and sandbox as a declared one. A skill that declares its scripts keeps exactly those: its other files there may be helpers they import. - SK-99 Meta skills and agents: front matter
skills: [a, b]makes a skill combine others;activate_skillreturns each member (members: name, instructions, references, scripts, error), theirs in turn, once each, so a loop ends (at most 16). Front matteragents: [name]offers a skill only to those agents: it’s left out of the system prompt’s skill list for another agent,list_or_search_skillsdoesn’t list it, andactivate_skillandread_skill_filerefuse it; none means every agent. Both fields are written so other tools ignore them. - SK-99a 2026-11-05 (scan N26-engine-tools-2#14:
deny skill(x)was checked only for the skill named in the call, so activating a meta skill that listsxreturned its instructions and scripts). A member adeny skill(…)rule covers comes back with the error “denied by the permission rule deny skill(x)” and none of its content, andread_skill_fileis refused for a denied skill asactivate_skillandrun_skill_scriptare. - SK-100 Studio › Skills (
SkillsPane, spec_040_studio): the workspace’s own skills (a folder inside the workspace:SkillInfo.project) fill the pane with their kind; a skill’s form slides in over the list (the agent form’s pattern) with tabs General, References and Scripts, and Back, Cancel and Save (asking first with unsaved edits, in the form or an open file). General: what it’s for (the name follows it until typed), name (lowercase letters, digits and single hyphens, up to 64:skills.ValidName), instructions with Draft (DraftManifestkindskill) and{secrets:completion, Combines (members, chosen from every skill the workspace sees), Offered to (the workspace’s agents) and the tools (allowed-tools, the agent form’s picker).WorkspaceService.GetSkillFilereturns a skill with SKILL.md’s hash and whether it’s editable (the workspace’s own);SaveSkillwrites.agents/skills/<name>/SKILL.md(or the existing skill’s folder, renamed when the name changes) if the hash still matches (HASH_MISMATCH), keeping every front matter field the form doesn’t edit, in order (skills.Render); problems (a bad or taken name, a built-in’s name, no description, a member that’s itself) come back with nothing written.DeleteSkillremoves its folder. - SK-100a 2026-11-05 (scan N26-engine-sub-2#26: a
SKILL.mdor scenario Studio saved was left owner-only by its temporary file, unlike the files beside it). Studio writesSKILL.mdand scenarios readable by others (0644), as the skill’s other files; whole-file atomic replaces across Blitz (engine, config, secrets, skillreg, pagehost, activity, service) go through the sharedpkg/atomicfilehelpers (atomicfile.Write,atomicfile.MkdirWrite,atomicfile.WriteJSON: temporary file beside it, mode set, flushed, renamed). - SK-101 References tab, a list and a file as Studio’s lists and forms are: the files in
references/fill the tab (an icon by kind), with New file (a name, then Create) and Upload… (several at once); opening one gives it the whole tab, with a back arrow and the skill’s buttons stepping aside. A text file opens in a small editor (CodeArea: highlighting,{secrets:completion, ⌘S) and is saved on its own (Save file, Revert); Markdown, SVG and tables switch between Source and Preview; a PDF, an image, audio or video shows as the Files editor shows it (Preview, through the file’s path in the workspace), with Replace…. Delete is asked first.ReadSkillFilereads any skill’s file;WriteSkillFileandDeleteSkillFileonly a workspace skill’s, underreferences/orscripts/, throughos.Root(INVALID_PATHotherwise). - SK-102 Scripts tab, the same list and file: each script with its language, where it comes from (found in
scripts/, or declared) and the policy’s verdict (allowed, or why not); New script from a template (Python, TypeScript, JavaScript, shell, cmd or PowerShell); the open script takes the tab’s width and height, with Redraft (kindscript, with its language) and, folded under it, Test run: arguments (split as a shell would split words and quotes), thenRunSkillScriptruns it asrun_skill_scriptwould (policy, sandbox, deny rules), its approvals given since the user starts it, and shows the exit code, output and errors. - SK-103 Add from…: every skill the workspace sees (built in, the user’s, a plugin’s or registry’s, the workspace’s), searched by name and description, each with Copy (
CopySkill: its files into.agents/skills/<name>under a name of its own, front matter kept but the name) and, with a skill’s form open, Reference (it becomes one of that skill’s members). - SK-103a 2026-11-05 (scan N26-service#35: every failed skill edit read as a bad path, a full disk included). A skill edit refused for its path (outside the folder, not under
references/orscripts/, missing) isINVALID_PATH(skills.ErrBadPath); one that fails to write (a full disk, a folder it may not write) is the service’s own error,INTERNAL, with the system’s message. - SK-105 Shell and cmd scripts: language
shell(alsosh,bash;.shinscripts/) runs with/bin/sh, andcmd(alsobat,batch;.cmd,.bat) withcmd.exe /d /c(%ComSpec%), in the same sandbox with the same tiers, timeouts and environment (SKILL_DIR,SKILL_OUTPUT); neither takes packages or an entry point. The policy blocks a shell script on Windows and a cmd script anywhere else, saying why (platformReason), andskills.policy.languagesallowsshellandcmdby default. - SK-106 JavaScript and PowerShell: language
javascript(alsojs,node;.js,.mjs) runs with node exactly as TypeScript does (npm packages, entry point), andpowershell(alsopwsh,ps1;.ps1) withpwsh -NoProfile -NonInteractive -ExecutionPolicy Bypass -File, else Windows PowerShell, failing with why when neither is installed. Both are inskills.policy.languagesby default (config.ScriptLanguages). Scripts found inscripts/that share a name (test.py,test.ts) are each named by their whole file name, so running one never runs the other. - SK-107 Packages from the folder: a Python script that names no dependencies takes those of the first Python package file found,
requirements.txt(a line each, comments and blank lines dropped), thenpyproject.toml([project] dependencies), each inscripts/before beside SKILL.md; a JavaScript or TypeScript one takespackage.json’sdependencies(name@version).SkillInfo.package_fileslists the ones the folder has. The Scripts tab’s Packages section lists them (which one counts, and which is unused because another of its kind comes first), opens each in the editor, and offers Add requirements.txt and Add package.json (inscripts/, from a template) when there’s none of that kind; each script’s row says how many packages it gets. Studio may write these three files beside SKILL.md as well as inscripts/. They’re checked as declared ones are (plain requirements only, never URLs, paths or pip options;skills.policy.packagesallow and deny; pins when required), installed into an isolated environment kept by Blitz for exactly that list (not in the skill’s folder, so it isn’t committed or changed by the script), wheels only, after an approval that can be remembered for that list, and the script runs with it read-only in the sandbox. Apackage.jsonthat isn’t JSON, or apyproject.tomlthat isn’t TOML, is a refused dependency saying so. - SK-108 Reviewing scripts: a skill on disk with scripts (not a built-in) runs them unasked only once the user has reviewed and trusted its content:
config.HashTrust(config.OpenSkillTrust,skill-trust.jsonin the settings directory) keeps each skill folder’s trusted content hash, read afresh at each check. Until then (a new or edited script, a package file changed, a registry install or update)skills.EvaluatesaysNeedsReview(not a block:SkillInfo.needs_review), andrun_skill_scriptasks before each run whatever the tier, an ask rule’s way (MustAsk: an unattended run, a job’s, is refused). Trusting the project’s settings, whose hash includes its skills’ content, trusts those skills as they are (at open, and onTrustProject), so a trusted workspace isn’t asked twice.ConfigService.GetSkillReview(dir)says what the scripts are (name, language, file, packages) when they need review, andTrustSkillScripts(dir, hash)records the content shown (HASH_MISMATCHif it changed since;SKILL_NOT_FOUND). The desktop app asks: after a registry install with scripts (Settings › Library › Skills; the installed list’s Review scripts while one waits), and in Studio, whose list marks a skill Scripts to review and whose skill view has a banner with Review scripts; the review dialog lists the scripts and offers Trust these scripts or Not now. Studio’s Test run, which the user starts, isn’t asked about. While a script runs, the chat’s tool row says Running… with a spinner (every running tool has the spinner), and Test run’s button spins. - SK-104
\skill-namein a prompt (where a word starts: the start, after whitespace or an opening bracket or quote) sends that skill’s instructions with the prompt, as/skill-namedoes, with its references and a meta skill’s members to activate; once each, only for skills offered to the active agent. The transcript keeps the prompt as typed. The composer completes it as it’s typed (skillMention.ts: names starting with what’s typed first, then names and descriptions containing it; the list asked for every 30 s, and again after Studio changes a skill).
- SK-110 Trigger phrases are Castor’s
trigger_phrases(SK-10), edited on the skill’s form (General, under its description: chips, a phrase added on Enter or leaving the field;SkillSpec.triggers,SkillInfo.triggers). They’re tidied (spaces collapsed, blanks and repeats left out) and held to 20 phrases of 200 characters (skills.Check). They’re examples, not exact wording (the owner’s decision: no two people write the same phrase). The system prompt’s list of skills gives each skill’s phrases after its description (“For requests like: “…”; “…”.”), and tells the model to match a request to them by meaning, not by wording (skills.TriggerHint).list_or_search_skillsalso finds a skill by them, loosely (skills.TriggerMatches): a request matches a phrase when one holds the other, or when it has two thirds of the phrase’s words that aren’t stop words (a fixed English list: “pdf” counts, “the” doesn’t; every word counts when all of them are stop words), a word matching another that opens with the same four letters or more, three quarters of the shorter (“release” and “releases”, “summary” and “summarize”). - SK-111 Scenarios are Castor’s behaviour tests (FR-8,
ScenarioDefinition):scenarios/<name>.mdin the skill’s folder, its front matterprompt,executes(true unless it says false: the skill should be used; false: it shouldn’t),expected_skills(or Castor’s aliasskills_applied; none means the skill alone),threshold(0.8 when left out) anddescription, the body the outcome expected (skills.Scenarios,LoadScenarios). One that can’t be run (no front matter, no prompt or outcome, a threshold outside 0–1, a name that isn’t one) is listed with its problem. Saving keeps the front matter’s other fields, always writesexecutes, and replacesskills_appliedwithexpected_skills(SaveScenario,DeleteScenario;WorkspaceService.ListSkillScenarios,SaveSkillScenario,DeleteSkillScenario,SCENARIO_NOT_FOUND). A skill copied or installed from Castor brings its scenarios, andcstr testruns them as Blitz does. They run as the evalskill:<name>(api.SkillEvalPrefix), soRunEval(withbackground, spec_042_evals EV-07a),WatchEvalRun,StopEvalRun,ListEvalRunsandblitz eval --skill <name>(EV-10) all take them, and runs are recorded beside the evals’ (asskill--<name>, which no eval’s name can be). Each scenario runs on the skill’s first agent (else the active one) as an eval case does (unattended, a session of its own, the case’s time limits, EV-03), with the skills only offered, not given: the skills it used are those it activated (activate_skill, a meta skill’s members with it;EvalResult.skills_used). It passes when the skills fit (each one expected was used; forexecutes: false, this skill wasn’t: “It didn’t use …”, “It used …, which it shouldn’t for this”) and the judge scores the answer at the threshold or more against the outcome. - SK-112 Trying a skill (
WorkspaceService.TrySkill,Workspace.TrySkill) runs one prompt as a scenario does, on the agent asked for (else the skill’s first, else the active one), and returns the answer, the skills used, whether the skill was among them (triggered), what was refused and what it cost. Withforce, the skill is given with the prompt (as an eval’s skills are) instead of offered, to judge only the answer. It saves nothing. The skill tried is the one saved. - SK-113 The skill form’s Scenarios tab (
SkillScenarios, its count in the tab): Try it (the agent, the prompt, Give it the skill; “It used …” or “It didn’t use …”, the answer, the skills used, the cost; a note when the form has unsaved changes, which the try doesn’t see), Keep it (a dialog filled from the try: a name from the prompt’s first words, the prompt, Should use the skill set to whether it did, the skills it used as those it must use, a threshold of 0.8, the answer as the outcome; all editable before saving), the skill’s scenarios (what each expects, its threshold and prompt, the last run’s mark; edit, delete, + for a new one), and Run all, which runs them in the background, shows each result as it’s scored (with the skills used), and is followed again when the tab opens on a run going on; Stop stops it in the service. A skill that isn’t the workspace’s can be tried and its scenarios run, not changed.
A network field in Castor’s proto.