mastermind-workspaces

mastermind-workspaces is a skill for Claude Code, Codex from monoes/monomind. It costs 45 tokens per session (2,578 once invoked), scanned A, original, Apache-2.0.

A tool for managing isolated Git worktree workspaces for projects. A Git worktree is a separate working directory connected to the same repository, and each workspace can be linked to an agent and running services.

In plain words
What is it for?
List workspace status, attach an agent to a worktree, detach or stop it, and remove unused workspaces.
Why use it?
It keeps concurrent tasks separated so changes and services from one task do not interfere with another. It also makes it easier to see, attach, stop, or remove workspaces.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit List workspace status, attach an agent to a worktree, detach or stop it, and remove unused workspaces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/monoes/monomind/mastermind-workspaces
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add monoes/monomind --skill mastermind-workspaces
Clone the repo
git clone --depth 1 https://github.com/monoes/monomind

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mastermind-workspaces

README.md
[![agentmods](https://agentmods.dev/badge/skills/monoes/monomind/mastermind-workspaces/github.svg)](https://agentmods.dev/skills/monoes/monomind/mastermind-workspaces)
Your own site
<a href="https://agentmods.dev/skills/monoes/monomind/mastermind-workspaces"><img src="https://agentmods.dev/badge/skills/monoes/monomind/mastermind-workspaces/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mastermind-workspaces

Your own site · 80×15
<a href="https://agentmods.dev/skills/monoes/monomind/mastermind-workspaces"><img src="https://agentmods.dev/badge/skills/monoes/monomind/mastermind-workspaces.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,578 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.02578
Opus 5.5 $0.00018 $0.01031
Sonnet 5.5 $0.00009 $0.00516
Haiku 4.5 $0.00005 $0.00258

Measured 2d ago against content hash 9a4d519dd27d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mastermind-workspaces scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/mastermind-workspaces/SKILL.md · 263 lines

How it starts

The opening of the file, as written. The whole thing — 263 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mastermind Workspaces

This skill is invoked directly via /mastermind-workspaces.


Inputs

  • brain_context: BRAIN CONTEXT block (injected by command, or loaded below if standalone)
  • org_name: org to manage workspaces for (required)
  • action: list | status | attach | detach | stop | prune
  • workspace_id: workspace id (required for status/detach/stop)
  • project_id: project to filter by (optional for list)
  • agent_id: agent to assign to workspace (required for attach)
  • worktree_path: filesystem path of the worktree (required for attach)
  • caller: command | master

Workspace Model

A workspace is a git worktree assigned to a project, optionally running services and assigned to an agent.

{
  "id": "ws-abc123",
  "project_id": "project-slug",
  "agent_id": "backend-dev",
  "worktree_path": "/tmp/monomind/worktrees/project-slug-abc123",
  "branch": "feat/my-feature",
  "status": "active",
  "services": ["dev-server", "db-watcher"],
  "createdAt": "2026-01-01T00:00:00Z",
  "lastActiveAt": "2026-01-02T00:00:00Z"
}

Step 0 — Brain Load (standalone only)

If caller is not "command", load brain context following mastermind-protocol/SKILL.md Brain Load Procedure with namespace: ops.


Step 1 — Load Workspace Data

orgFile=".monomind/orgs/${org_name}.json"
[ ! -f "$orgFile" ] && { echo "ERROR: Org '${org_name}' not found."; exit 1; }

wsFile=".monomind/orgs/${org_name}-workspaces.json"
[ ! -f "$wsFile" ] && echo '{"workspaces":[]}' > "$wsFile"

projectsFile=".monomind/orgs/${org_name}-projects.json"
worktreeRegistry=".monomind/orgs/${org_name}-worktrees.json"

Step 2 — Execute Action

list (default)

echo "WORKSPACES — org: $org_name"
[ -n "$project_id" ] && echo "(filtered by project: $project_id)"
echo "────────────────────────────────────────────────────────"

total=$(jq '.workspaces | length' "$wsFile")

if [ "$total" -eq 0 ]; then
  echo "  No workspaces. Use --action attach to register one."
else
  # Group by project
  projects=$(jq -r --arg pid "${project_id:-}" '
    .workspaces |
    if $pid != "" then map(select(.project_id == $pid)) else . end |
    [.[].project_id] | unique[]
  ' "$wsFile")

  while IFS= read -r proj; do
    [ -z "$proj" ] && continue
    projName=$([ -f "$projectsFile" ] && jq -r --arg pid "$proj" '(.projects // [])[] | select(.id == $pid) | .name // $pid' "$projectsFile" || echo "$proj")
    echo ""
    echo "  PROJECT: $projName"
    echo "  ──────────────────────────────────────────────────"
    printf "  %-18s %-14s %-18s %-12s %-6s %s\n" "ID" "STATUS" "AGENT" "BRANCH" "SVCS" "PATH"

    jq -r --arg pid "$proj" '(.workspaces // [])[] | select(.project_id == $pid) |
      [.id, (.status // "unknown"), (.agent_id // "(none)"),
       (.branch // "?"), ((.services // []) | length | tostring),
       (.worktree_path // "-")]
      | @tsv' "$wsFile" | while IFS=$'\t' read -r id st ag br svc path; do
      printf "  %-18s %-14s %-18s %-12s %-6s %s\n" "$id" "$st" "$ag" "$br" "$svc" "$path"
    done
  done <<< "$projects"
fi

echo ""
echo "Total: $total workspace(s)"

Read the full file on GitHub · 263 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 263 lines · 45 tokens per session scan A 9a4d519dd27d

Subscribe to this mod's changes

mastermind-workspaces is a skill published in the GitHub repository monoes/monomind (23 stars, last pushed 2d ago), licensed Apache-2.0. It adds 45 tokens to every session and 2,578 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-26.