Awesome Cohub
中文
Conceptscohub.concept.dot-cohub-layers3 min

.cohub/ is platform-facing Space config (presentation, hooks, published models/generations, and installed-App state). Slash prompt templates live under .agents/prompts/, not under .cohub/. Both participate in layered merge — and priority is intentional.

Two trees (do not confuse)

TreeTypical jobPublish on config/platform Save?
.cohub/Space presentation, hooks, models/generations catalogs, installed AppsYes (whitelist with AGENTS.md, .agents/)
.agents/Skills, prompt templates (slash /name), agent extrasYes

Config / platform Save whitelist:

AGENTS.md
CLAUDE.md
.agents/
.cohub/

Where each capability lives

Platform layer (PLATFORM_SPACE_ID Save → /configs/platform)

PathEffect
.cohub/models.jsonEnvironment model catalog (Redis cache)
.cohub/generations/Generation declarations
.cohub/model-tasks.jsonAuxiliary task models such as session titles and image-to-text
.cohub/decisions.jsonDecision models and providers (space.decision())
.cohub/explore.json (etc.)Other platform readers
.agents/skills/Platform skills
.agents/prompts/*.mdPlatform slash templates

User layer (Home Space or name === "config" Save → /configs/user)

PathEffect
.cohub/models.jsonOwner model overrides / catalog merge
.cohub/generations/User generation declarations
.cohub/model-tasks.jsonUser overrides for auxiliary task models
.cohub/decisions.jsonUser view of decision models (name/hidden only)
.cohub/theme.cssPersonal theme applied across the app
.agents/skills/Personal skills (owner path)
.agents/prompts/*.mdPersonal slash templates
AGENTS.mdUser Rules

Project / ordinary Space (/workspace — no user-config publish)

PathEffect
.cohub/space.jsonSpace presentation, e.g. new chat background payloads
.cohub/theme.cssSpace custom theme CSS
.cohub/apps.jsonValidated installed-App manifest for this Space
.cohub/hooks/*Space Hooks automation
.cohub/system/…Platform bookkeeping (e.g. checkpoint meta) — not for hand-editing
.agents/skills/Project skills
.agents/prompts/*.mdProject slash templates

Putting models.json only in a random project Space does not publish account-wide models. Models that follow you require a Home Space or name=config Save (or platform Save).

Since v2.66 the Home Space publishes the same personal config through the normal Save pipeline. An existing name === "config" Space keeps working as an ordinary Space; there is no automatic migration or fallback.

Priority (merge order)

Shared pattern for catalogs that merge by name: later wins.

Skills (/skill:)

platform → mods → user config → project workspace

Slash prompt templates (/name, not /skill:)

Same order (worker fetchPromptTemplates):

platform → mods → user → project
  • Files: .agents/prompts/<name>.md
  • Expansion: leading /foo (not /skill:…) loads template foo
  • Body supports $1, $@ / $ARGUMENTS style arg substitution
  • quick-action: true can expose a template as a button above the Chat composer; button-label, argument-hint, and order control its presentation

Prompt context variables and auxiliary model tasks

Prompt templates can use the system variables {{cohub.session.id}}, {{cohub.space.id}}, and {{cohub.user.uuid}}. They are rendered by the shared prompt-template path across API and worker.

Auxiliary model tasks are declared in .cohub/model-tasks.json. Platform and user definitions merge in the same config flow; user settings can disable a task or override its model. The built-in imageToText task must use a vision-capable model.

Models

platform (.cohub/models.json) → user (.cohub/models.json)

mergeModelsConfigs(platform, user) — user layer overrides / extends platform. No project-workspace models path in this catalog loader.

Presentation (theme / new chat background)

Per Space, from that Space’s workspace (not the merge stack above):

  • .cohub/space.json — backgrounds and related presentation payloads
  • .cohub/theme.css — custom theme CSS

These do not replace the account appearance theme picker; they style this Space.

Hooks

  • .cohub/hooks/* on the current Space
  • FS match ignores .cohub/** to avoid self-trigger loops

Mental model

                    ┌─ platform  ── .cohub/models.json + .agents/*
 merge catalogs ───┼─ mods       ── mounted .agents/* (skills/prompts)
                    ├─ user      ── Home (or config) Space Save → /configs/user
                    └─ project   ── /workspace .agents/* (+ .cohub presentation)

 ordinary Space only (no global publish):
   .cohub/space.json   → new chat background, etc.
   .cohub/theme.css    → space theme
   .cohub/hooks/*      → automation

Practice

  1. Personal models / default prompts / skills / theme → Home Space (or a name=config Space) → edit → Save.
  2. This product’s slash recipes → project .agents/prompts/*.md.
  3. This product’s look → project .cohub/space.json / theme.css.
  4. Team shared tooling → Mod mount, not copy-paste into every config.
  5. For prompt templates that need request identity, use the {{cohub.*}} variables instead of copying IDs into files.
  6. Treat .cohub/apps.json as current-Space installed state, not a published App registry.
  7. Never “fix” live mounts under /configs/user or /configs/platform; edit source Space + Save.

See also