shorin-kiwata/miyu-agent/script-creator
Claude Code and agent skill by shorin-kiwata/miyu-agent
- community
Checking that the SKILL.md file is still in the repository.
Write and register a Miyu script tool. Use when the user wants a new command-line script Miyu can call as a tool, or when a script fails to register or run — 写脚本、加个工具、注册脚本、脚本跑不起来。
Install
npx vskill@latest install shorin-kiwata/miyu-agent/script-creatorSKILL.md
Script Creator
A script tool is one executable file. Miyu reads the tool contract from comment lines at the top of the file, runs the file with JSON arguments, and hands stdout back to the model.
Calling manage_script
manage_script is not on the always-loaded tool list: registering a script is a once-in-a-while action, so it lives behind this skill. Call it through the tool bridge with run_command:
miyu tool-call manage_script --describe prints the full parameter contract. Everything below that says "call manage_script" means this.
Workflow
- Write the script anywhere, the session workspace is fine. Start from a skeleton below.
- Call
manage_scriptwithaction=registerand the absolutepath. The file is copied into the scripts directory, made executable, and becomes a tool from the next tool round. Passscope=globalonly when every persona should see it. - Call the new tool once with real arguments and read
success,exit_code,stdoutandstderrin the result. - To fix the script, edit the copy at the
paththat register returned and call the tool again. Code changes need no re-register. Header changes are picked up automatically as well. manage_scriptwithaction=listshows registered, unregistered and disabled scripts with their directories.
Runtime contract
- The first line must be a shebang such as
#!/usr/bin/env python3or#!/bin/bash. Miyu executes the file directly. - Arguments arrive as one JSON object on stdin. The same JSON is also in the environment variable
MIYU_ARGS_JSONwhen it is under 64 KB. - Nothing is passed on argv unless the header says
# Argv: flags. That mode additionally expands{"query":"x","limit":5,"json":true,"dry":false}to--query=x --limit=5 --json. Keys are sorted, false and null are omitted, arrays and objects become JSON strings. - Without a
Parametersheader the tool accepts any JSON object. The special keystdinthen replaces the JSON on stdin with raw text. - Print the result to stdout and exit 0. On failure exit non-zero and print a JSON object with
ok:false,errorand, when the user must act,fix. Miyu reports the exit code and the model reads your JSON. - Default timeout is 120 seconds, maximum 300. Output beyond 20000 characters is cut before the model sees it, so cap lists and offer a
limitparameter. MIYU_SCRIPT_CACHE_DIRpoints at Miyu's cache directory. Keep login profiles, cookies and caches under it. Fall back to XDG defaults when the variable is missing so the script also works from a terminal.- Host queries (only when the header declares
Capabilities:): Miyu injectsMIYU_HOST_TOKEN,MIYU_HOST_CAPABILITIESandMIYU_HOST_BIN. Run$MIYU_HOST_BIN host <method> [json]— methodshost.info,providers.list,providers.get,subsystems.enabled; stdout is one JSON line{"ok":true,"data":…}or{"ok":false,"error":{"code","message"}}. Provider data never includes API keys or endpoints. Treat a missing variable as "host unavailable" and keep working. - Default to compact human-readable output and offer
format=jsonfor field-by-field processing.
Header
Comment lines right after the shebang, written as # Key: value. Unknown comment lines such as a coding declaration are skipped. The header ends at the first code line.
Descriptionis what the model sees. Write it in English. Keep the first sentence under 60 characters: in stub loading mode only that sentence is visible until the tool is loaded. Say what the tool does and when to use it first, caveats later.显示名称is the human-facing name and is required. Write it in Chinese. Without it a Chinese UI can only show the tool id.Display nameis the English-UI name and is optional: the tool id is already English, so an English UI falls back to a humanized id (xhs_searchbecomesXhs search). The two are separate slots, not aliases, so never put a Chinese name inDisplay name— that is what makes Chinese leak into an English UI.Parametersis a JSON Schema object withtype: object. Give every property adescription. Omit the block for free-form tools.Idoverrides the tool name derived from the file name.battery-care.pybecomesbattery_carewithout it.Groupplaces the tool in aload_toolsgroup.Argv: flagsturns on argv expansion.Timeoutis in seconds.index.jsonin the scripts directory can override any header field perid.manage_scriptwrites there only the fields you pass explicitly.
Skeletons
Python, stdin JSON:
Bash, argv flags:
Rules
- Never ask the user to copy files into
~/.miyu. Register does that. - Never put secrets in the header or the description.
- Do not report the tool as working until you have called it once.
- Keep the script self-contained. Name third-party dependencies in a comment and fail with a
fixmessage when they are missing.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/personas/default/skills/script-creator/SKILL.md
Popularity
- Repository stars
- 112
- Repository forks
- 28
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/shorin-kiwata/miyu-agent/script-creator)