Skip to content
Conduit

mcp server

prompt-lib

prompt library for use with mcp

dwcy/prompt-libcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "prompt-lib": {
      "command": "uvx",
      "args": [
        "cabal"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 25, 2026

Cabal

Agentic development configuration in one place. Cabal is the local control panel for managing a machine's Claude Code and Codex setup. It gives you one terminal UI for deploying global agent configuration, checking setup drift, restoring backups, managing MCP connections, initializing environment variables, scaffolding local project configuration, installing companion CLIs, and browsing the agent/skill knowledge map.

This repository is the versioned source Cabal deploys: agents, slash-command skills, hooks, rules, output styles, MCP server templates, project templates, Codex-compatible assets, OKF catalog data, and the supporting services that make multi-agent workflows easier to run across projects.

Visual tour: open docs/infographic.html in a browser — single A4 landscape sheet, no scrolling, every feature at a glance. The longer scrollable variant is at docs/infographic-v1.html.

What Cabal Is Used For

NeedHow Cabal handles it
Domain expertise on demand29 specialist subagents (@dotnet-architect, @python-tester, @react-architect, @tanstack-architect, @frontend-css, @frontend-designer, @ux-analyst, @unity-architect, @requirements-analyst, @api-designer, @db-architect, @data-analyst, @website-content-analyst, @git-repo-analyst, @code-plan-verifier, @gitignore-auditor, @secret-auditor, @owasp-security-reviewer, @code-cleaner, @init-project, @load-project, …) auto-invoked when the task matches their description
Repetitive workflows (commit, PR, review, scaffold)29 slash-command skills under global/skills/ — /git, /pr, /react-init, /react-review, /react-test, /react-perf, /react-safe, /css, /css-guide, /lovable-cleanup, /skill-create, /executing-plans, /finishing-a-development-branch, /using-git-worktrees, /systematic-debugging, /design, /ui-component, /orchestrate, /tui, /cli-llm-app, /add-mcp, /dependency-audit, /docs, /git-restore-identity, /github-audit, /github-scaffold, /infographics-design, /change-summary, /dotnet-codegen
Loading project context on session startSessionStart hook detects whether the cwd has a CLAUDE.md; if yes, invokes @load-project; if no, offers to scaffold one from a template (.NET, Python, frontend, monorepo, Unity, generic)
Always-on context bloatConditional rules in global/rules/ (csharp.md, typescript.md, react.md, tests.md) load only when Claude touches a matching file; rules without a paths: filter (communication.md) are always on
Response-mode switchingFour output styles — concise, technical, review, architect — picked per session via /output-style
External tool integrationsEight pre-wired MCP servers: context7, github, figma, playwright, azure-devops, supabase, obsidian, docker (env vars resolved via ${VAR} substitution)
Multi-machine setup / deploymentCabal, an interactive local agent control panel via the root launcher (./run on POSIX, .\run.cmd on Windows) — deploy, init env vars, show inline drift markers, restore from backup, local project scaffold, optional companion tools. The supported graphical workspace lives in apps/cabal-desktop/.
Install without cloning/plugin marketplace add dwcy/prompt-lib + /plugin install prompt-lib@prompt-lib ships skills, agents, hooks, MCP servers, and output styles as a Claude Code plugin. The apply-script path remains the way to get the full setup (global CLAUDE.md, rules, permissions, theme). See docs/plugin-install.md.
Cross-agent delegation (Claude ↔ Gemini)services/a2a-bridge — A2A protocol v1.0.0 implementation, Python 3.14 + FastAPI, 199 tests passing
Autonomous PR reviewservices/orchestrator — daemon that watches a GitHub repo, dispatches each PR to a peer Claude agent over the A2A bridge, posts the review back via gh, persists state to SQLite, pushes phone notifications via ntfy.sh, ships with a Textual dashboard
Spec-driven feature workspecs/ holds spec-kit feature trees (spec, plan, research, data-model, contracts, tasks, quickstart) — 001-a2a-bridge, 002-agent-orchestrator, 003-issue-triage, 004-github-plugin
Agent ecosystem knowledge graphOKF (Open Knowledge Format) exports agents, skills, hooks, rules, templates, Codex assets, and specs into a portable catalog plus graph.json, so AI tools and reviewers can inspect routing, overlaps, unused concepts, and skill-agent connections. See docs/okf/README.md.
Tool-call safetyPreToolUse hooks (command_guard.py, file_write_guard.py, pretool_branch_guard.py, pretool_inflight_guard.py) and PostToolUse audit (write_audit.py) intercept risky operations — including editing a file that another session left uncommitted. See docs/hooks.md.
Authoring new skills/skill-create — scaffolds, tests, and refines new slash commands

Statusline

The "tile bar" Claude Code renders at the bottom of the terminal. Script: global/statusline.py. Wired up via statusLine in global/settings.json. Two rows — row 1 is session state from the stdin JSON snapshot Claude Code passes per turn, row 2 is workspace state from cheap git + filesystem probes.

Codex uses its native TUI statusline rather than this script. Cabal's Statusline screen exposes all native Codex items from global/codex/statusline-segments.json, supports individual and enable-all/disable-all toggles, preserves ordering, and updates only [tui].status_line plus [tui].status_line_use_colors in ~/.codex/config.toml.

✦ Opus 4.7  │  ⬆ 2.1.158  │  ◐ 34%  │  💰 $0.42 · 12m  │  Δ +142 -38  │  📝 explanatory  │  ⏳ 5h:78%  │  ⊙ C:/projects/prompt-lib
⎇ 005-cabal-tools-polish  │  ↑3 ↓1  │  ±5f  │  ⚑ 2  │  🐳 docker  │  ✓ 47  │  🎯 P3 8/14  │  🤖 3 · 🛠 14

Row 1 — session state (from stdin JSON, zero I/O)

SegmentSourceWhat it showsHides whenColor logic
✦ <model>model.display_nameActive model name (e.g. Opus 4.7)nevercyan
⬆ <version>~/.claude/.update_state.json (populated by hooks/check_claude_update.py — npm registry GET, 6-hour TTL cache)Latest available Claude Code version on npm — shown only when a newer release existsrunning version matches npm latest, or cache file not yet populatedorange
💰 $<usd> · <duration>total_cost_usd, total_duration_msSession cost so far + wall-clock durationcost field missinggreen <$1 → yellow <$3 → orange <$10 → red ≥$10
Δ +<a> -<r>total_lines_added, total_lines_removedLines added / removed across all edits this sessionboth counters 0adds green, removes red
📝 <style>output_style.nameActive output style — reminds you a non-default style is biasing responsesstyle is defaultcyan
⏳ 5h:<%> 7d:<%>five_hour, seven_day% quota remaining before 5-hour / 7-day rate limits hitboth quotas have >90% headroom (nothing to worry about)green >50% → yellow >25% → red ≤25%
⊙ <cwd>workspace.current_dirProject path rendered as a clickable VS Code link (OSC 8 hyperlink → vscode://file/<path>). Ctrl+Click to open in Windows Terminalcwd missingviolet

Row 2 — workspace state (git + filesystem, 1s timeout-guarded)

SegmentSourceWhat it showsHides whenColor logic
⎇ <branch> (with 🌳 worktree: prefix)git branch --show-current + git rev-parse --git-dir --git-common-dirCurrent branch; worktree prefix appears when this checkout is a git worktree (not the main checkout)not a git repogold; worktree prefix green
↑<a> ↓<b> or ↕ syncgit rev-list --count --left-right @{u}...HEADCommits ahead of / behind upstream — ↕ sync when both are 0branch has no upstreamahead green, behind orange
±<n>fgit status --porcelainNumber of dirty files (staged + unstaged)working tree is cleanyellow
⚑ <n>git stash listStash countzero stashesviolet
🐳 dockerfilesystem probe — Dockerfile, docker-compose.{yml,yaml}, compose.{yml,yaml}Whether the project is dockerizednever (shows 🐳 N/A when absent)bright cyan when present, gray when absent
✓ <n> / ✗ <f>/<n> / ◑ <pct>%covFirst detector that matches: .NET TestResults/*.trx → pytest .pytest_cache/v/cache/lastfailed+nodeids → Jest/Vitest coverage/coverage-summary.json → Playwright test-results/results.json or playwright-report/results.jsonPass count, failure ratio, or coverage % from the most recent test runno detector matches (shows ✓ N/A)green pass, red fail, yellow low coverage
🎯 P<n> <m>/<t> or 🎯 ✓ allParses specs/<branch>/tasks.md for the first non-✅ **Status**: …(M/N — T###–T###) lineActive speckit phase + M/N task progress; ✓ all when every phase is completenot on a NNN-feature-name branch, or no tasks.mdgold mid-flow, green when complete
🤖 <a> · 🛠 <t>~/.claude/.session_state.json written by the PostToolUse hookAgents dispatched · tools called this session — proves work is happening even when output is quiethook hasn't fired yet, or session_id doesn't matchagents violet, tools gray

How it works

  • Snapshot, not live. Claude Code invokes the statusline command once per turn boundary and passes session state on stdin per the statusline contract. There is no streaming or refresh — segments update on the next turn.
  • Multi-row layout. Every \n printed becomes a new row; vertical spacing comes from settings.json → padding.
  • Cheap reads only. Every git / filesystem call is timeout-guarded (1s) and falls back silently on error — the statusline never blocks the prompt.
  • Activity counters. The 🤖 · 🛠 segment is driven by global/hooks/post_tool_use.py, a PostToolUse hook that increments per-session counters in ~/.claude/.session_state.json. Counters reset automatically when session_id changes.
  • Update check. The ⬆ segment reads ~/.claude/.update_state.json, populated by global/hooks/check_claude_update.py. The statusline fire-and-forgets that script (detached subprocess, no console flash on Windows) whenever the cache is older than 6 hours, so the next render picks up a fresh result. Network call hits the public npm registry only — no Claude API traffic, no rate-limit cost.
  • OSC 8 hyperlink. The cwd segment uses an ANSI OSC 8 escape with the SGR color codes wrapping the hyperlink (not nested inside it) so Windows Terminal hit-tests the link region correctly. If clicking does nothing, verify the URI handler with start vscode://file/C:/projects/prompt-lib in PowerShell.

Customize / disable

  • Disable entirely: delete the statusLine block from global/settings.json and reapply.
  • Configure interactively: open Cabal → StatusLine, choose Codex or Claude Code, toggle/reorder items, and save.
  • Change Claude defaults: edit global/statusline-segments.json.
  • Change Codex defaults/catalog: edit global/codex/statusline-segments.json.
  • Add a segment: write a seg_* function returning a colored string (or None to hide), and append to row1 / row2. Falsy returns are filtered before the SEP.join.
  • Change colors: every segment passes RGB tuples through the rgb() helper — no theme indirection, just edit the literal tuples.
  • Change thresholds: color bands live in ctx_color(), cost_color(), headroom_color() near the top of the file.

Slash commands

Every command available in this project, grouped by purpose. Source links point at the SKILL/command file; docs links point at the relevant section in docs/.

Git workflow

CommandWhen to useLinks
/gitFull git workflow — branch safety, conventional commits, agent authorship, push guardsrc · docs
/commitQuick conventional commit without the full safety machinery — fixups inside a feature branchsrc · docs
/prDraft a PR title + description from branch diffs, then create it with gh pr createsrc · docs
/reviewStructured branch review against main — Critical / Warning / Suggestion findingssrc · docs
/finishing-a-development-branchEnd-of-feature checklist — runs tests, builds, commits, offers PR/pushsrc · docs
/using-git-worktreesCreate/list/remove/prune git worktrees for parallel Claude Code sessionssrc · docs
/standupGenerate a standup summary from recent git logsrc · docs
/git-restore-identityClear a stuck --local agent git identity after a crashed commitsrc · docs
/github-auditRead-only audit of a repo's GitHub hygiene — settings, protections, workflowssrc
/github-scaffoldScaffold .github/ — CodeQL, CI, Dependabot, CODEOWNERSsrc

Planning & implementation

CommandWhen to useLinks
/planPlan a non-trivial feature — classify, scope, contract (full-stack), task breakdown, spawn parallel agents with worktree isolationsrc · docs
/executing-plansExecute a written tasks.md plan with review checkpoints between phasessrc · docs
/systematic-debuggingRoot-cause-first debugging — reproduce, pattern, hypothesis, verified fix; three failed fixes stops and questions the designsrc · docs
/adrCreate a numbered Architecture Decision Record under docs/adr/src · docs
/cli-llm-appIntegrate Claude Code / Codex into an app via the CLI (subscription auth, no API key) — persistent-subprocess pattern, flag gotchas, stream-json schemasrc
/orchestrateAutomatic subagent routing — analyse the task, dispatch specialists with worktree isolation, aggregate resultssrc · docs
/tuiTextual TUI lessons learned from the cabal wizard — Ctrl+C-is-copy, clipboard, Pilot tests, child-process lifecyclesrc

Spec-kit feature flow

CommandWhen to useLinks
/speckit-constitutionCreate or amend .specify/memory/constitution.md (principles, gates)docs
/speckit-specifyGenerate spec.md from a natural-language feature descriptiondocs
/speckit-clarifyResolve NEEDS CLARIFICATION markers in spec.md via up-to-5 targeted questionsdocs
/speckit-planProduce plan.md + Phase 0 design artifacts; must clear Constitution Check gatesdocs
/speckit-tasksGenerate tasks.md with Owner: @<agent> + Phase Status + Parallel: yes markersdocs
/speckit-analyzeNon-destructive cross-artifact consistency check across spec/plan/tasksdocs
/speckit-checklistGenerate a feature-specific QA checklistdocs
/speckit-implementExecute tasks.md task-by-task, dispatching to named owners (with worktree isolation for Parallel: yes)docs
/speckit-taskstoissuesConvert tasks.md into ordered GitHub issues via ghdocs
/speckit-git-*Do not use — these auto-execute git commands without the /git safety machinery. Driven from the /git skill instead per global rulesdocs

Frontend / React

CommandWhen to useLinks
/react-initScaffold a full current-stable React project — Vite + TS + Zustand + TanStack + Biome + Tailwind + Zod + MUI Iconssrc · docs
/react-reviewCode-quality review of a React file/feature — Critical / Warning / Suggestionsrc · docs
/react-testScaffold or review Vitest + RTL tests for a component, hook, or featuresrc · docs
/react-safeAudit a React file for async correctness, error handling, security gapssrc · docs
/react-perfPerformance audit — re-renders, memoisation, bundle size, lazy-load opportunitiessrc · docs
/cssscaffold for globals.css, or <ComponentName> for <Name>.module.css next to the componentsrc · docs
/ui-componentBuild a UI component on demand — design-language compliance, Preview, semantic HTML, Zustand+Zod formssrc · docs
/designLoad the Premium Digital Agency 2.0 design system into context before styling decisionssrc · docs
/lovable-cleanupStrip all Lovable / GPTEngineer scaffolding from a projectsrc · docs
/css-guideCSS-first techniques & animations — prefer CSS over JS for hover/scroll/reveal effects, layout, state togglessrc
/infographics-designSingle-file HTML infographic or printable A4 visual overview with CSS-only data vizsrc

.NET

CommandWhen to useLinks
/dotnet-classCreate or refactor a .NET class following Clean Architecture conventionssrc · docs
/dotnet-testCreate or refactor a .NET integration test with TestContainerssrc · docs

Documentation & memory

CommandWhen to useLinks
/docsGenerate a /docs folder for a project — index + architecture + per-component reference + workflows + learning pathsrc · docs
/readmeDrift-check the top-level README against the live repo state (skills, agents, hooks, MCP servers, statusline segments) and propose surgical patchessrc
/self-improvementMaintain project memory (lessons / mistakes / preferences / evals); stale-detect and remove obsolete entriessrc · docs
/skill-createDesign, write, test, and refine a new skill — scaffolds the Agent Skill folder with scripts/, references/, assets/src · docs

Meta / safety

CommandWhen to useLinks
/review-conflictsDetect overlapping agent / skill descriptions that would cause routing collisionssrc · docs
/prompt-injection-guardScan staged content for prompt-injection patterns before commitsrc · docs
/dependency-auditAudit project dependencies for known vulnerabilities — read-only, reports by severity with upgrade pathssrc
/add-mcpRegister an MCP server the right way — scope precedence, Windows .cmd wrapping, env-var handlingsrc · docs
/xlsxRead, edit, and recalculate Excel workbooks via LibreOffice + python-openpyxlsrc · docs

Layout

prompt-lib/
├── run                  ← POSIX root launcher for the setup wizard, web UI, and Tauri app
├── run.cmd              ← Windows root launcher for the setup wizard, web UI, and Tauri app
├── global/              ← deploy target: ~/.claude/
│   ├── settings.json    ← MCP servers, hooks, theme, model
│   ├── CLAUDE.md        ← always-loaded global behaviour
│   ├── agents/          ← @-invocable specialist subagents
│   ├── skills/          ← /-invocable slash commands
│   ├── hooks/           ← SessionStart / PreToolUse / Stop scripts
│   ├── rules/           ← rules: path-conditional (`paths:`) or always-on
│   ├── output-styles/   ← response formatting profiles
│   └── project-templates/  ← templates used by @init-project
├── setup/               ← TUI installer (settings-configurator-ui.py)
├── services/
│   ├── a2a-bridge/      ← A2A protocol bridge
│   └── orchestrator/    ← PR-review daemon
└── specs/               ← spec-kit feature trees

Apply changes

# macOS / Linux / POSIX shells
./run

# Windows
.\run.cmd

The root launcher delegates to the platform-specific setup bootstrapper, which finds Python or offers to install it where supported. After applying, restart Claude Code.

Direct source fallback: python setup/settings-configurator-ui.py.

Fallback (non-interactive): bash setup/tools/apply-global-claude-settings.sh.

Web UI

The active overhaul is the Cabal desktop workspace: a Vite + React frontend, a local FastAPI backend, and a Tauri shell that spawns or adopts the backend as a sidecar. It covers the full 22-module control surface rather than the legacy read-only dashboard.

# Fast browser loop (backend + Vite with hot reload)
./run web                 # POSIX
.\run.cmd web             # Windows

# Desktop shell
./run tauri               # POSIX
.\run.cmd tauri           # Windows

# Production shape
uv run --with pyinstaller python setup/build/build_backend.py
cd apps/cabal-desktop
pnpm tauri build

The production bundle expects the sidecar at setup/build/dist/cabal-backend-<target-triple>[.exe]; Tauri launches it as cabal-backend and injects the per-launch bearer token into the webview.

Development validation

Run all test suites that are available on the current machine:

python scripts/test-all.py

For release readiness, require every suite runner to be present:

python scripts/test-all.py --strict-missing

Service integration tests that need real CLIs, GitHub auth, or live local daemons stay opt-in:

python scripts/test-all.py --include-integration --strict-missing

Alternative: install as a Claude Code plugin

You can install skills/agents/hooks/MCP servers without cloning the repo:

/plugin marketplace add dwcy/prompt-lib
/plugin install prompt-lib@prompt-lib

Plugin install ships the shareable surface (skills become /prompt-lib:*, agents become prompt-lib:*). Items the plugin model can't carry — global CLAUDE.md, global/rules/, global/project-templates/, permissions, theme, statusLine — stay on the apply path. Both paths coexist. Full guide at docs/plugin-install.md; design at specs/004-github-plugin/.

Further reading

Deep documentation (docs/)

  • docs/README.md — index + reading order
  • docs/architecture.md — 5-step session boot; how agents, skills, MCP tools, hooks, and rules fit together
  • docs/settings.md — every field in global/settings.json explained (model, permissions, MCP servers, hooks)
  • docs/agents.md — every subagent: purpose, tools, when triggered, composition partners
  • docs/skills.md — every slash command: trigger, behaviour, allowed tools
  • docs/hooks.md — SessionStart, PreToolUse, PostToolUse, Stop scripts and what they protect
  • docs/rules-output-styles.md — file-pattern conditional rules, response styles, project-init templates
  • docs/workflows.md — multi-agent recipes: spec-kit → worktree → plan → implement → verify → review → PR
  • docs/parallel-isolation.md — when concurrent subagents must run in isolated git worktrees, why, and how
  • docs/speckit.md — spec-kit configuration in this repo: constitution, gates, slash commands, templates, delegation roster, phase-status rule, git-extension override
  • docs/services.md — a2a-bridge and orchestrator daemons in detail
  • docs/plugin-install.md — install prompt-lib as a Claude Code plugin (no clone), scope split with the apply path
  • docs/release-readiness.md — package-publishing prerequisites and release checklist
  • docs/learning.md — 5-day learning path, mental shortcuts, debugging surprises

Other references

↑↓ navigate openesc close