| name | new-workspace |
| description | Provision a new media-library workspace on disk. Use when the user wants to start cataloging, tagging, or organising a mixed-media library (photos, videos, audio). Scaffolds the workspace, personalises CLAUDE.md from the user's global memory, and (by default) creates a GitHub repo. |
| disable-model-invocation | true |
| allowed-tools | Bash(mkdir *), Bash(cp *), Bash(cat *), Bash(git init *), Bash(git add *), Bash(git commit *), Bash(gh repo create *), Bash(gh auth status), Bash(git push *), Read |
Provision Media-Library Workspace
Creates a new workspace for cataloging and organising a mixed-media library. This plugin's commands (/media-library:catalog, /media-library:tag, /media-library:search-library, etc.) are globally available once installed — this skill only provisions the data scaffold (CLAUDE.md, inputs/, working/, metadata/, etc.) that those commands read from and write to.
Arguments
$ARGUMENTS is parsed as:
- First positional: workspace name (kebab-case, used as directory and GitHub repo name). Required.
- Second positional (optional): target parent path. Defaults to
~/repos/github/my-repos.
--local-only (optional): skip GitHub repo creation and push. Default: create a public GitHub repo and push.
--private (optional): create the GitHub repo as private. Default: public.
Examples
/media-library:new-workspace family-photo-archive
/media-library:new-workspace camera-roll-dump ~/Projects
/media-library:new-workspace sensitive-library --private --local-only
Procedure
1. Parse arguments
Extract workspace name, target parent path, and flags from $ARGUMENTS. If workspace name is missing, ask the user for it before proceeding.
2. Resolve the scaffold path
The bundled scaffold lives at ${CLAUDE_SKILL_DIR}/../../template/. Confirm it exists before copying.
3. Read ambient facts
Read ~/.claude/CLAUDE.md if it exists. Extract OS, locale, timezone, and user identity facts. These will personalise the workspace's CLAUDE.md at step 5.
4. Create the workspace directory
mkdir -p <target-parent>/<workspace-name>
cp -r ${CLAUDE_SKILL_DIR}/../../template/. <target-parent>/<workspace-name>/
Do not copy any .claude/ tree — the plugin's primitives are global. The scaffold deliberately contains no .claude/ directory.
5. Personalise CLAUDE.md
Open the new workspace's CLAUDE.md and:
- Replace the
{Replace this text ...} project-context placeholder with a short description the user provides (ask if not given).
- Add a short header noting the workspace name.
- If ambient facts include OS/locale/timezone, embed them so downstream commands can skip re-asking.
6. Prompt for workspace-specific facts
Ask the user only for facts this plugin can't infer:
- Source path — the directory they want to catalog (write into
CLAUDE.md as LIBRARY_SOURCE). Can be inside inputs/ (repo mode) or an external path (e.g. /mnt/backup/photos/).
- Scope note — one-line description of the library (e.g. "iPhone camera roll 2020–2024", "family photo archive"). Written into the
Project Context section of CLAUDE.md.
- Controlled tag vocabulary (optional) — if the user already knows how they want to tag, capture it now into
metadata/vocabulary.txt.
7. Initialise git and (optionally) publish
cd <target-parent>/<workspace-name>
git init
git add .
git commit -m "Initial workspace from media-library plugin"
Unless --local-only is set:
gh repo create <workspace-name> --<public|private> --source=. --push
Use --public by default, --private if flag was passed.
8. Print next steps
Tell the user:
- Workspace path.
- Suggested first command:
/media-library:catalog against the source path.
- After cataloging, try
/media-library:sort-by-type → /media-library:group-by-date → /media-library:dedupe-media.
/media-library:tag once they have a subset to annotate; /media-library:search-library to query it back.
- Reminder that the workspace is data — they can delete/move it freely without losing the plugin's commands.
Notes
- The scaffold path must be resolved via
${CLAUDE_SKILL_DIR}/../../template/ (not ${CLAUDE_PLUGIN_ROOT} — that variable isn't exported in skill bash injection, only in hooks/MCP).
- Never copy
.claude/commands/, .claude/agents/, or .claude/skills/ into the new workspace. If the user wants workspace-local overrides, they can add them manually later.
- Don't hard-code any personal paths or identifiers here — everything comes from user memory or prompts.
- No sub-variants in this plugin — a single flat template covers the cataloging / tag / search use case.