executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
lov-upload-image复用用户现有 PicGo 配置上传一张或多张本地图片并返回网址,也可批量把 Markdown 内的本地图片引用改成在线地址;适用于“上传这张图”“替换 md 图片链接”或 "upload images with PicGo"。
Independent GitHub snapshot · Automated classification · Original documentation governs
Turn local image files into public URLs through the user's existing PicGo configuration. It can return URLs directly or create a Markdown copy whose local image references have been replaced safely and consistently.
--secret-env, defaulting to PICGO_SERVER_SECRET..uploaded.md file; in-place mode is explicit and makes a backup.Read skill.yaml and the shared user-profile/v1 context at the start of every
run. Resolve settings in this order: current request, environment, Skill records,
shared preferences, then safe defaults.
Supported durable records are records.server_url, records.backend, and
records.markdown_write_mode. Save them with scripts/profile_store.py only
when the user directly asks for a lasting default. Never persist a Server secret,
image-host key, token, cookie, or inferred value. See
references/user-profile.md for the full contract.
Read references/skill-composition.md before composing adjacent capabilities.
This Skill owns only the local-image-to-public-URL and Markdown-rewrite outcome.
Image creation may happen upstream and destination-specific publishing may happen
downstream, but neither is a hidden runtime dependency.
Resolve SKILL_DIR from the active Skill context or installed path.
Read skill.yaml and resolve server_url, backend, and write mode using the
precedence above. Default to http://127.0.0.1:36677, auto, and new-file mode.
Run the non-mutating preflight:
python3 "$SKILL_DIR/scripts/upload_image.py" doctor --json
When PicGo.app is installed but not running, add --start-app to the requested
upload command. If Server mode is disabled, ask the user to enable PicGo Server
or provide a configured PicGo-Core CLI; do not install or reconfigure an image
host silently.
Read references/picgo-integration.md for backend selection and error semantics.
--dry-run --json first and inspect references,
unique_files, and the resolved file list.data:, blob:, anchors, fenced code, and
inline code as non-local and leave them unchanged.Read references/markdown-coverage.md for supported reference forms.
Run:
python3 "$SKILL_DIR/scripts/upload_image.py" upload \
"/path/to/image.png" \
--verify \
--json
For one image without --json, stdout is exactly the returned URL. For multiple
images, use JSON when another tool will consume the result. Preserve the input to
URL mapping from the uploaded array.
Preflight, then execute:
python3 "$SKILL_DIR/scripts/upload_image.py" markdown \
"/path/to/article.md" \
--dry-run \
--json
python3 "$SKILL_DIR/scripts/upload_image.py" markdown \
"/path/to/article.md" \
--verify \
--json
The second command writes article.uploaded.md. Use --output PATH for another
new file. Use --in-place only when the user explicitly wants the source edited;
it creates article.md.bak unless --no-backup is also explicit. Never use
--force without first resolving the exact output target.
--verify, require a successful HEAD or ranged GET response for every URL.Failures use this copyable form on stderr:
ERROR context_id=lov-upload-image-xxxxxxxx code=category: concise diagnosis
The script exits before Markdown writes when upload or verification fails. An upload can still have created remote objects before a later verification failure; report that possibility instead of claiming rollback.