workspace-setup
Register or create the user's image operations workspace — a folder on disk where they keep image projects. Use when running for the first time, or when the user says "set up my image workspace", "register my image workspace", "change my image workspace path", or similar. Persists the path so other skills (open-workspace, new-project) can reference it.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- workspace-setup
- description
- Register or create the user's image operations workspace — a folder on disk where they keep image projects. Use when running for the first time, or when the user says "set up my image workspace", "register my image workspace", "change my image workspace path", or similar. Persists the path so other skills (open-workspace, new-project) can reference it.
- allowed-tools
- Bash(mkdir *), Bash(test *), Bash(echo *), Bash(realpath *), Bash(date *), Bash(git init:*), Read, Write
03 SKILL.md 正文
Image Workspace Setup
Register the folder the user treats as their image operations workspace. Individual projects live as sub-folders inside it.
Data store
${CLAUDE_USER_DATA:-${XDG_DATA_HOME:-$HOME/.local/share}/claude-plugins}/image-ops/workspace.json
Do not write under a coding tool's config directory (~/.claude/, ~/.codex/, ~/.config/opencode/, and the like).
Procedure
1. Check for existing config
DATA_DIR="${CLAUDE_USER_DATA:-${XDG_DATA_HOME:-$HOME/.local/share}/claude-plugins}/image-ops"
CONFIG="$DATA_DIR/workspace.json"
test -f "$CONFIG" && echo "$CONFIG"
If the file exists, open it with the file-reading tool rather than cat, which keeps shell use down to the commands that actually do work.
If one exists, show the path and ask whether to keep or change it.
2. Ask the user
- Existing or new? — do they already have an image workspace, or should one be created?
- Path?
- Existing: ask for absolute path; verify with
test -d. - New: propose
~/media-workspaces/imagesas the default. Don't auto-create until the user confirms.
- Existing: ask for absolute path; verify with
3. (New only) Version control
Ask whether to git init the workspace. Default no — image libraries can be large. Only git init is in scope; this skill never commits, adds a remote, or pushes.
4. Create + persist
mkdir -p "$DATA_DIR" \
|| { echo "cannot create $DATA_DIR — check permissions" >&2; exit 1; }
# Only if new:
mkdir -p "$CHOSEN_PATH" \
|| { echo "cannot create $CHOSEN_PATH — check the path and permissions" >&2; exit 1; }
WS_PATH=$(realpath "$CHOSEN_PATH")
CREATED=$(date -u +%Y-%m-%dT%H:%M:%SZ)
Stop on either failure — persisting a config that points at a directory that does not exist just moves the error to the next skill that reads it.
Write workspace.json with the file-writing tool, substituting the two values above:
{
"path": "<WS_PATH>",
"created": "<CREATED>",
"version_controlled": false,
"type": "image"
}
realpath canonicalises the path so open-workspace and new-project resolve the same directory regardless of how the user typed it.
5. Confirm
Print the registered path. Remind the user they can now say "open my image workspace" or "create a new image project".
04 同仓库更多 Skills
no-description
暂无简介
good-skill
Fixture skill that satisfies every rule.
broken-link
Links to a reference file that does not exist.
Bad_Name
Name violates the kebab-case rule and does not match the directory.
skill-authoring
Write, review, and validate portable agent skills in SKILL.md format. Use when creating a new skill, editing an existing one, or asked whether a skill follows the Agent Skills spec.
weigh-bags
Record scale readings for each bag — empty (tare), outbound, current, final — and reconcile them against the itemised inventory to find unaccounted weight. Use when the user gives a bag weight, says how heavy something is, weighs their luggage, or asks how close to the limit they are. Appends to bags.yaml and runs scripts/reconcile.py.