e4e9eb0928becfa4e48484dde85ef5032671d582
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
afabb7f90f |
library: a skill the router lists stays a /name of Claude Code's
RoyShen on X (yuushabu_buyinn): with the skill router on, / in the agent
no longer picks a skill. A listed skill has no link of its own in the
skills folder, so Claude Code had no /name for it.
For each skill the router lists for Claude Code (any profile; not a
plugin agent or WSL), routerCommands writes <claude dir>/commands/
<name>.md: the skill's description, disable-model-invocation: true, and
a body that has the agent read the skill's SKILL.md at the router's path
and follow it, with $ARGUMENTS. The flag keeps the description out of
the model's prompt, so the router still saves what it saved. The stubs
go in the commands folder, not the skills folder, because Crush, DevEco
Code and Kimi Code read ~/.claude/skills too and ignore the flag.
Applied.RouterCommands records the files with their hash (syncOwnFiles):
one the user changed is theirs. A user's own command file by that name,
or a Library command of that name given to Claude Code, means no stub;
syncCommands takes a stub's file over when such a command is added. The
command import leaves the stubs out. Router off, or the skill kept
direct: the stub goes.
Run:
- mica-run go test -tags nogui ./internal/library -count=1 -timeout 45m: ok
(277s); GOOS=linux and GOOS=windows go vet ./internal/library: ok;
gofmt -l clean. Base
|
||
|
|
ec1a1a7a55 |
library: import the slash commands the agents already have
miantiao_me on X (after v0.1.4189): 「之前在 Pi 定义的可以导入吗?」. Library ›
Slash commands now has a "Find in agents" card at the top. It reads the
command files each agent already has, from the same places magpie writes
them (Pi prompts/*.md, Claude commands/*.md, OpenCode command/ and
commands/, Gemini and Qwen .toml, Qwen .md, Droid), and lists them to
import, the way Subagents' import does.
- Parsing: frontmatter description plus body; for TOML, description and
prompt. Arguments go back to magpie's form: Claude's $ARGUMENTS[n] and
$n (0-based) become $n+1, Gemini/Qwen {{args}} becomes $ARGUMENTS,
Pi's $@ becomes $ARGUMENTS (${@:N} is left as written).
- Files magpie wrote itself are skipped. The same content in several
agents is one command; a name with different bodies per agent shows
"Differs by agent" and one of them is picked; a name the library has
with other content is "Name taken" and can't be picked.
- An imported command keeps its source agents ticked, and magpie adopts
each original file byte for byte (Command.Taken): sync writes the same
bytes at the same path, so the file is never doubled or rewritten.
After an edit the agent gets magpie's render at that path; a rename
drops Taken. Taken never leaves the machine (Collect strips it, Put
keeps the local one).
- API: POST /api/library/commands/probe, and commands/import through
the library change route. internal/cli's parity test names the probe
as stage 3, like subagents/probe.
- Docs: docs/subsystems/library.md has the new row.
Run at 039e25752 (on origin/main
|