Mods, Skills & Prompts
Reuse files, system instructions, skills, prompt templates, and model overrides across Spaces using read-only Space Mods, Home Space User Rules, SKILL.md packages, and slash-command templates.
This page explains how to share instructions, tools, and reusable workflows across Spaces without duplicating files: mount another Space read-only as a Mod, publish personal defaults from your Home Space, package task instructions as Skills (/skill:<name>), and define slash-command Prompt templates (/<name>).
Configuration layers and precedence
Cohub loads instructions, skills, and prompt templates from four scopes. When two scopes define the same skill name, prompt template name, or conflicting rule, later layers override earlier ones:
platform < mods < user (Home Space) < project (current Space /workspace)
| Scope | Source location | Sandbox path | How updates take effect |
|---|---|---|---|
platform |
Managed Cohub defaults | /configs/platform |
Platform-managed |
mods |
Latest Save of each enabled Mod Space | /mods/<mountSlug> (read-only) |
Mount/toggle restarts Sandbox; Mod updates follow latest Save |
user |
Published from your Home Space (home slug) |
/configs/user (read-only) |
Create a Save in your Home Space |
project |
Current Space workspace | /workspace |
Live in the current Space |
System prompt assembly
On each Agent turn, Cohub builds the system prompt from these workspace-relative and mounted files:
- Base
SYSTEM.md(first match wins):.agents/SYSTEM.mdin/workspace→/configs/user/.agents/SYSTEM.md→/configs/platform/agent/SYSTEM.md(fallback:"You are a helpful assistant."). APPEND_SYSTEM.md(concatenated in order): platform → each enabled Mod's.cohub/APPEND_SYSTEM.md→ user.agents/APPEND_SYSTEM.md→ project.agents/APPEND_SYSTEM.md.- Context files (
AGENTS.md,CLAUDE.md): loaded from/configs/user, each enabled Mod root (/mods/<mountSlug>), and/workspace, ordered byplatform < mods < user < project.
User Rules (Home Space)
Personal defaults live in your Home Space (the Space with slug home). When you create a Save in your Home Space, Cohub publishes a whitelisted set of paths to /configs/user across your Spaces:
AGENTS.mdCLAUDE.md.agents/(including.agents/SYSTEM.md,.agents/APPEND_SYSTEM.md,.agents/skills/,.agents/prompts/).cohub/
In the web app, Settings → User Rules displays a read-only preview of your published Home Space AGENTS.md and its last published timestamp, with a shortcut to open your Home Space.
# Publish updated personal rules, skills, or prompts from your Home Space
cohub -s home spaces checkpoints create "Update user rules and skills"
Space Mods
A Space Mod mounts the latest Save snapshot of another Space read-only inside your Space's Sandbox at /mods/<mountSlug>. A Mod Space is an ordinary Space—any Space you have read access to (file.view.filtered) can be mounted as a Mod.
What a Mod provides
When enabled on a Space, a Mod can contribute:
- Read-only files under
/mods/<mountSlug>(scripts, reference docs, templates, or binaries). - Instructions from
.cohub/APPEND_SYSTEM.md,AGENTS.md, andCLAUDE.md. - Skills from
.agents/skills/**/SKILL.md. - Prompt templates from
.agents/prompts/*.md. - Model overrides from
.cohub/models.json(loaded in mount order from each enabled Mod's latest Save; invalid JSON is ignored with a warning rather than failing the turn).
New Spaces can also include the default Cohub Base Mod (mountSlug: cohub_base).
Managing Mods in Web UI and CLI
- Web UI: Open Space Settings → Environment → Mounted spaces to view mounted Mods, copy Mod Space UUIDs, add a Mod by Space UUID, toggle enable/disable, or remove a Mod.
- CLI: Use
cohub spaces modsagainst your target Space:
# List mounted Mods and their /mods/<slug> paths
cohub -s <space> spaces mods ls
# Mount another Space as a Mod (optional display name and mount slug)
cohub -s <space> spaces mods add <modSpaceId> --name "Team Base" --slug team_base
# Enable, disable, or remove a mounted Mod (pass -y to skip the restart confirmation)
cohub -s <space> spaces mods disable <modId> -y
cohub -s <space> spaces mods enable <modId> -y
cohub -s <space> spaces mods rm <modId> -y
Permissions, slugs, and Sandbox restarts
- Permissions: Only a Space Host (
mod.manage) can add, enable, disable, or remove Mods; Builders (mod.view) can inspect mounted Mods; Guests cannot view or manage Mods. Mounting a Mod also requires read permission (file.view.filtered) on the target Mod Space. - Mount slugs: Must be 1–63 characters of lowercase letters, digits, hyphens, or underscores (
^[a-z0-9](?:[a-z0-9_-]{0,61}[a-z0-9])?$) and unique within the Space. If omitted, Cohub derives a unique slug from the Mod Space UUID. - Sandbox restart: Adding, enabling, disabling, or removing a Mod restarts the Space's Sandbox to apply mount changes and may interrupt running commands or Agent turns. Both the Web UI and CLI ask for confirmation first (
-y/--yesskips the CLI prompt).
Skills
A Skill is a directory containing a SKILL.md file (plus any helper scripts or references alongside it) under .agents/skills/. Cohub recursively scans .agents/skills/ (skipping directories whose names start with .) until it finds a SKILL.md root.
File format and frontmatter
---
name: release-notes
description: Draft user-facing release notes from merged pull requests.
disable-model-invocation: false
---
Inspect commits since the last tag, group user-visible changes, and omit internal refactors.
name(optional): defaults to the skill directory name; must match^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$.description(optional): shown to the Agent and in listings; defaults to the first non-empty line (up to 80 characters) or the skill name.disable-model-invocation(optional boolean, defaultfalse): whentrue, hides the skill from the Agent's automatic<available_skills>prompt list while keeping explicit/skill:<name>invocation enabled.- Size limit:
SKILL.mdcontent is capped at 100,000 characters (longer files are truncated).
Invoking and inspecting Skills
- Automatic discovery: Visible skills are listed in the Agent's system prompt with their description and file path; the Agent reads
SKILL.mdwhen a request matches. - Explicit slash command: Start a message with
/skill:<name> [args]to expand that skill's body directly into the turn with relative paths anchored to the skill's directory. - CLI listing:
# List all merged skills available in a Space (with scope or mod:<slug> source)
cohub skills ls --space <space>
cohub skills ls --space <space> --json
To install Cohub's CLI skills into an external coding agent on your machine:
npx skills add netaart/cohub
Execution environment reachability
- Cloud Sandboxes and Cohub Local Sandboxes mount all four scopes (
platform,mod,user,project). - Native external Harnesses (such as Pi or Codex running directly on a local machine) can reach only
projectskills in the workspace. Unreachable scopes are filtered out so they do not override a reachable skill or surface broken paths.
Prompt templates
A Prompt template is a Markdown file stored in .agents/prompts/<name>.md within any of the four scopes (platform, mods, user, project). The filename without .md becomes the slash command /<name>.
File format, frontmatter, and variables
---
description: Summarize changes in a path for a target audience
argument-hint: <path> <audience>
category: writing
quick-action: true
button-label: Summarize
order: 10
---
Space: {{cohub.space.id}}
Session: {{cohub.session.id}}
Read $1 and write a short summary for $2.
Additional notes: ${@:3}
Supported frontmatter fields:
description: shown in command autocomplete andcohub prompts ls(defaults to the first non-empty line up to 80 characters, or the template name).argument-hint: optional argument hint shown in the UI.category: optional category label.quick-action(orquickAction): whentrue, renders the template as a quick-action button above the chat composer in the web app.button-label(orbuttonLabel): optional label for the quick-action button.order: optional number controlling quick-action button sort order (ascending).
Supported template placeholders:
- System variables:
{{cohub.session.id}},{{cohub.space.id}},{{cohub.user.uuid}}. - Argument substitution:
$1,$2, ... for positional arguments (single- and double-quoted phrases stay intact),${@:N}and${@:N:L}for argument slices, and$ARGUMENTSor$@for the raw argument string.
Invoking and inspecting Prompt templates
- Type
/<name> [args]in a Chat to expand and send the template. Messages starting with/skill:bypass prompt template expansion and resolve as skills instead. - List available templates from the CLI:
cohub prompts ls --space <space>
cohub prompts ls --space <space> --json
Boundaries and common errors
Hard limits and caching
- Mod slugs & names:
mountSlugmust be 1–63 characters (^[a-z0-9](?:[a-z0-9_-]{0,61}[a-z0-9])?$); optional display name is trimmed to 255 characters. - Skill limits: Skill names must match
^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$;SKILL.mdcontent is capped at 100,000 characters. - Prompt template scan: Only top-level
.mdfiles directly inside.agents/prompts/are loaded (subdirectories are not walked). - Catalog caching: Platform, user, and Mod skill and prompt catalogs are cached in Redis for up to 24 hours, keyed by checkpoint/directory revision; workspace (
project) files are read from the Space workspace. Mod.cohub/models.jsonlayers are memoized for 15 seconds per Space.
Common errors
| Error / symptom | Cause | Fix |
|---|---|---|
space cannot mount itself as a mod |
modSpaceId matches the target Space ID. |
Mount a different Space as the Mod. |
mod space is already mounted / mountSlug is already used in this space |
Duplicate Mod Space or conflicting mount slug in the same Space. | Reuse the existing Mod entry or choose a different --slug. |
missing file.view.filtered permission for mod space / 403 |
You lack read access to the Mod Space, or you are not a Host (mod.manage) on the destination Space. |
Ensure you have read access to the Mod Space and Host role on the Space you are configuring. |
| Running command or Agent turn stops after changing Mods | Modifying Mods restarts the Sandbox (space_mods_changed) to remount /mods. |
Wait for active turns to finish before adding, toggling, or removing Mods. |
| Home Space edits do not appear in User Rules or other Spaces | Changes in the Home Space were not saved into a checkpoint, or were placed outside the publish whitelist. | Put files in AGENTS.md, CLAUDE.md, .agents/, or .cohub/ inside your home Space and create a Save. |
Skill missing from automatic prompt or /skill:<name> fails |
Invalid name, disable-model-invocation: true, or running inside a native external Harness that only reaches project skills. |
Verify SKILL.md naming, check cohub skills ls --space <space>, or place the skill in /workspace/.agents/skills/ for native Harnesses. |
/<command> does not expand |
File is not .md directly under .agents/prompts/, input starts with /skill:, or another higher-priority scope overrides the name. |
Check cohub prompts ls --space <space> to confirm the active scope and exact command name. |
Next steps
- Spaces — Space roles, settings, and Home Space configuration
- Files & Sandbox — how
/workspace,/mods, and Sandbox restarts work - Saves — create Saves to publish Mod snapshots and Home Space User Rules
- Local Runtime — mount behavior and skill reachability on local machines
- CLI — full
cohubcommand reference