You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
spec: skills and workflows — discovery, installation, and usage (#1117)
Defines the architecture for how skills, workflows, and agents work in
ACP.
**Core insight**: A workflow is just a prompt + a list of skill source
references. Skills are the atomic reusable unit. The manifest format is
the contract — ACP and local tooling are just consumers.
- **Workflows don't contain skills** — they reference them by Git URL +
path
- **Skills are always fetched from canonical sources** at load time, not
embedded copies
- **Workspace library != auto-inject** — installing to workspace makes
items available, not active. Users select what loads per session.
- **Same manifest works everywhere** — ACP runner, local `--add-dir`, a
`/load-workflow` meta-skill, or a Claude Code plugin
- **Layered loading** — workflow dependencies + user-selected extras +
live imports, all fed into `add_dirs`
1. **Core Concepts** — Skill, Workflow, Agent, Manifest Format
2. **Discovery** — Marketplace, scanning, catalog format
3. **Installation & Configuration** — Workspace level, session level,
workflow builder, selection model
4. **Usage in Sessions** — Loading order, runtime management, metadata
5. **Local Usage** — Manual, load-workflow skill, Claude Code plugin
6. **Manifest Format** — Proposed YAML schema
7. **Open Questions** — Format, versioning, plugin compat, RHAI
alignment, security
Looking for feedback on:
- The manifest format (extend ambient.json vs new workflow.yaml?)
- The selection model (workspace library vs auto-inject)
- The Agent concept (persona + workflows + skills)
- RHAI alignment (RHAIRFE-1370)
---------
Co-authored-by: Ambient Code Bot <bot@ambient-code.local>
Copy file name to clipboardExpand all lines: specs/skills-and-workflows.md
+63-71Lines changed: 63 additions & 71 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Summary
4
4
5
-
A workflow is a `CLAUDE.md` prompt plus a list of sources in `ambient.json`. Skills are the atomic reusable unit. Everything installed is a source reference — the runner auto-detects what's inside. ACP automates the cloning and wiring. Locally, a `/load-workflow` skill or manual `--add-dir` does the same thing. The marketplace feature is behind a feature flag.
5
+
A workflow is a `CLAUDE.md` prompt plus a list of sources in `ambient.json`. Skills are the atomic reusable unit. ACP automates the cloning and wiring. Locally, a `/load-workflow` skill or manual `--add-dir` does the same thing.
6
6
7
7
---
8
8
@@ -64,7 +64,7 @@ You are a systematic bug fixer. Follow these phases:
64
64
```
65
65
66
66
Sources support two formats:
67
-
-**Structured object**: `{"url": "...", "branch": "...", "path": "..."}` — works with any Git host, branch is explicit. Supports optional `tag` or `sha` field for pinning.
67
+
-**Structured object**: `{"url": "...", "branch": "...", "path": "..."}` — works with any Git host, branch is explicit
68
68
-**Single URL string**: `"https://github.com/org/repo/tree/main/path"` — auto-parsed, convenient for sharing
69
69
70
70
Skills are the reusable atoms. Workflows are recipes. The same skill can appear in multiple workflows.
A way to browse and find skills, workflows, and plugins from curated sources.
93
91
94
-
### Discovery vs Runtime
95
-
96
-
Plugins are a **discovery format only** — the marketplace reads `plugin.json` and `marketplace.json` to display what's available. But at runtime, there is no plugin concept. When a user installs something, it becomes a source reference. The runner clones it as a regular source and adds it to `add_dirs`. Claude finds the skills inside. No plugin hooks, MCP servers, or LSP servers from plugins at runtime.
97
-
98
-
### Source Types (for discovery/browsing)
99
-
100
-
The marketplace scanner must read these formats to display available items:
92
+
### Source Types
101
93
102
-
1.**Claude Code marketplace catalogs** — `marketplace.json` files listing plugins with their sources. The scanner reads plugin metadata to extract skills, commands, and agents for display.
94
+
The scanner must support three types of sources:
103
95
104
-
2.**Claude Code plugins** — directories with `.claude-plugin/plugin.json` containing `skills/`, `commands/`, `agents/`. The scanner reads `plugin.json` for metadata and scans the plugin's directories to list its contents. Plugin-specific features (hooks, MCP, LSP) are shown as metadata but not loaded at runtime.
96
+
1.**Claude Code plugins** — directories with `.claude-plugin/plugin.json` containing `skills/`, `commands/`, `agents/`, `hooks/`, `.mcp.json`. This is the primary format to follow and expect. Skills are namespaced as `plugin-name:skill-name`.
105
97
106
-
3.**Standalone repos with `.claude/`** — any Git repo containing `.claude/skills/`, `.claude/commands/`, `.claude/agents/`. Also supports root-level `skills/`, `commands/`, `agents/` (registry layout).
98
+
2.**Claude Code marketplace catalogs** — `marketplace.json` files listing plugins with their sources. Users could add the same marketplace from local Claude Code via `/plugin marketplace add`.
107
99
108
-
4.**Catalog JSON** — `data.json` files (like ai-helpers) listing items with metadata. Normalized to the same display format.
100
+
3.**Standalone repos with `.claude/`** — any Git repo containing `.claude/skills/`, `.claude/commands/`, `.claude/agents/`. Also supports root-level `skills/`, `commands/`, `agents/` (registry layout like ai-helpers).
109
101
110
102
### How
111
103
112
104
A cluster-level ConfigMap (`marketplace-sources`) holds available registry sources. The Marketplace page in the ACP UI shows:
113
105
114
106
- Browsable catalogs from each source with search and type filters
115
107
- Compact card tiles with name, description, type badge
116
-
- Detail panel on click showing extracted skills, commands, and agents inside the source — rendered readably, not as a raw file viewer
108
+
- Detail panel on click with full description, source repo link
117
109
- "Import Custom" to scan any Git URL and discover items
118
110
- Direct one-click install to workspace
119
111
@@ -133,76 +125,58 @@ When given a Git URL (from marketplace or custom), the backend:
133
125
134
126
### Format Alignment
135
127
136
-
We follow Claude Code's plugin and skill formats as the standard. The [Agent Skills](https://agentskills.io) open standard that Claude Code implements is the closest cross-tool specification.
128
+
We follow Claude Code's plugin and skill formats as the standard. The [Agent Skills](https://agentskills.io) open standard that Claude Code implements is the closest cross-tool specification. Our catalog format normalizes to the same shape regardless of source type.
137
129
138
130
---
139
131
140
132
## Installation & Configuration
141
133
142
-
### Everything is a Source Reference
143
-
144
-
All installed items are source references — Git URLs pointing to repos containing skills or workflows. There is no type distinction in the data model. Whether the source is a plugin repo, a standalone skills repo, or a workflow — at runtime, the runner clones it and adds it to `add_dirs`. Claude discovers the skills inside. The plugin format is only relevant for marketplace browsing, not for runtime loading.
145
-
146
134
### Workspace Level
147
135
148
-
Source references installed at the workspace level are stored in the ProjectSettings CR. These represent the workspace's **registry** — what's available to sessions.
149
-
150
-
The registry is NOT auto-injected into every session. At session creation, users select which sources to load from the registry. The workflow they choose also pulls in its own dependencies from the `sources` array in `ambient.json`.
136
+
Items installed at the workspace level are stored in the ProjectSettings CR (`spec.installedItems`). These represent the workspace's **library** — what's available, not what's auto-loaded into every session.
151
137
152
-
Items can optionally be marked as "always add" — these load into every session by default. This is useful for org-wide standards or team-shared skills. (Needs further design discussion.)
138
+
When creating a session, users select which installed items to include. The workflow they choose pulls in its own skill dependencies from the `sources` array in `ambient.json`.
153
139
154
140
### Session Level
155
141
156
-
Sources can be added to a running session via the context panel:
142
+
Skills can be added to a running session via the context panel:
157
143
158
144
- "Import Skills" in the Add Context dropdown
159
145
- Provide a Git URL + optional branch + path
160
-
- Backend clones, scans, loads skills into discoverable locations
161
-
- Claude discovers them via live change detection
146
+
- Backend clones, scans, writes skill files to `/workspace/file-uploads/.claude/`
147
+
- Claude discovers them via live change detection (already in `add_dirs`)
162
148
- Persisted via S3 state-sync on session suspend/resume
163
149
164
-
### Skill Storage in the Runner
165
-
166
-
Each source gets its own directory at `/workspace/sources/{name}/`, added to the Claude Agent SDK as a separate `--add-dir`. Claude Code discovers `.claude/skills/`, `.claude/commands/`, `.claude/agents/` inside each add_dir automatically via its standard discovery mechanism.
167
-
168
-
This mirrors how repos work (`/workspace/repos/{name}/`). Benefits:
169
-
170
-
-**Clean separation** — each source is isolated, easy to see what came from where
171
-
-**No conflicts** — two sources with a skill named `review` coexist in separate add_dirs
172
-
-**Simple removal** — removing a source is `rm -rf /workspace/sources/{name}/`
173
-
-**Standard mechanism** — `add_dirs` is exactly what Claude Code designed for external skill loading
174
-
-**Persistence** — `/workspace/sources/` is backed up by state-sync alongside repos and file-uploads
175
-
176
-
Writing into the project's `.claude/` directory would pollute the working directory and create ownership ambiguity (which source owns which skill?). Separate add_dirs avoids this entirely.
177
-
178
-
The workspace's active workflow remains the `cwd`. Additional sources are supplementary add_dirs. Repos, sources, artifacts, and file-uploads each get their own add_dir — Claude discovers from all of them.
179
-
180
-
Items marked "always add" in the workspace registry are pre-selected at session creation. Users can uncheck them. No magic auto-injection — explicit, visible, reversible.
150
+
### Workflow Builder
181
151
182
-
### Versioning
152
+
A UI for composing workflows from standalone skills:
183
153
184
-
Sources reference branches by default, which means sessions always get the latest version — providing auto-update behavior. For pinning, sources support optional `tag` or `sha` fields:
154
+
- Select skills from the workspace library or browse marketplace
155
+
- Each skill is a reference (source URL + path), not a copy
156
+
- Write the workflow prompt as `CLAUDE.md`
157
+
- Configure metadata in `ambient.json` (name, description, rubric)
158
+
- The `sources` array is built from selected skills
When a SHA is specified, the runner checks out that exact commit. When only a branch is specified, the runner clones the latest. This gives users the choice: use `branch` for auto-update, use `sha` or `tag` for stability.
164
+
The key constraint: skills are never copied into the workflow. The `ambient.json` holds source references. At load time, the runner resolves dependencies and clones each source.
191
165
192
166
### How Selection Works
193
167
194
-
The workspace registry is not auto-injected. Selection happens at session creation:
168
+
The workspace library is not auto-injected. Selection happens at session creation:
195
169
196
170
1. User picks a workflow (or "General chat" for none)
197
171
2. The workflow's `ambient.json``sources` array declares dependencies — those are auto-loaded
198
-
3. User can add any number of additional sources from the workspace registry
199
-
4. The session stores the workflow reference + any additional source references
172
+
3. User can optionally add standalone skills from the workspace library
173
+
4. The session CRD stores the workflow reference + any additional skill sources
200
174
201
175
This means:
202
-
- Installing 50 sources to the workspace doesn't bloat every session
176
+
- Installing 50 skills to the workspace doesn't bloat every session
203
177
- The workflow controls its own dependencies
204
178
- Users can augment with extras per session
205
-
-"Always add" items provide workspace-level defaults (needs further design)
179
+
-Workspace-level "always-on" skills could be supported via a flag but are not the default
206
180
207
181
---
208
182
@@ -212,27 +186,37 @@ This means:
212
186
213
187
When a session starts, sources are loaded in layers:
214
188
215
-
1.**Workflow sources** — skills from the workflow's `ambient.json``sources` array, cloned to `/workspace/sources/{name}/`and added to `add_dirs`
216
-
2.**Additional sources** — extra sources the user selected at session creation, same mechanism
217
-
3.**Live additions** — sources imported during the session via the context panel, cloned to `/workspace/sources/` on the fly
189
+
1.**Workflow sources** — skills from the workflow's `ambient.json``sources` array, cloned and added to `add_dirs`
190
+
2.**Additional standalone sources** — extra skills the user selected at session creation
191
+
3.**Live additions** — skills imported during the session via the context panel
218
192
219
-
Each source directory contains `.claude/skills/`, `.claude/commands/`, `.claude/agents/`as appropriate. Claude Code discovers from all `add_dirs` automatically.
193
+
All layers produce directories with `.claude/skills/`, `.claude/commands/`, `.claude/agents/`structure. Each directory is passed to the Claude Agent SDK as an `--add-dir`. Claude Code handles discovery from there.
220
194
221
-
### Visualization
195
+
The `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` env var is set so that `CLAUDE.md` files from add-dirs are also loaded.
222
196
223
-
Users should be able to see what's loaded in a session — not as raw files, but as extracted, readable metadata:
197
+
### Authentication for Sources
224
198
225
-
**In the session context panel**: A dedicated Skills section shows all loaded skills, commands, and agents across all sources. Each item displays its name, type badge, and source. Expandable per source to see what came from where. Items can be removed individually.
199
+
Private repos and authenticated services (MCP servers) use the existing workspace credential system. If the workspace has GitHub/GitLab integrations configured, private source repos are cloned using those credentials via the git credential helper. MCP sources that require auth and TLS are handled through workspace integration configuration. No new auth fields in the manifest.
226
200
227
-
**In the marketplace**: Clicking a source shows a detail panel with all the skills, commands, and agents it contains — rendered with descriptions and metadata, not as a file tree.
201
+
### Runtime Management
228
202
229
-
### Authentication for Sources
203
+
The session context panel shows:
230
204
231
-
Private repos and authenticated services (MCP servers) use the existing workspace credential system. If the workspace has GitHub/GitLab integrations configured, private source repos are cloned using those credentials via the git credential helper. MCP sources that require auth and TLS are handled through workspace integration configuration. No new auth fields in the manifest.
205
+
-**Repositories** — Git repos cloned as working directories (existing)
206
+
-**Skills** — imported skills/commands/agents with type badges and source links
207
+
-**Uploads** — uploaded files (existing)
208
+
209
+
Users can add skill sources live (Import Skills button). The backend clones the source, writes files to `/workspace/file-uploads/.claude/`, and Claude picks them up immediately. Users can remove individual skills — the file is deleted and Claude stops seeing it.
232
210
233
211
### Workflow Metadata
234
212
235
-
The runner's `/content/workflow-metadata` endpoint returns all discovered skills, commands, and agents across all loaded sources and built-in Claude Code skills. The frontend uses this to populate the Skills toolbar button and `/` autocomplete in the chat input.
213
+
The runner's `/content/workflow-metadata` endpoint returns all discovered skills, commands, and agents from:
- Built-in Claude Code skills (batch, simplify, debug, claude-api, loop)
218
+
219
+
The frontend uses this to populate the Skills toolbar button and `/` autocomplete in the chat input.
236
220
237
221
---
238
222
@@ -251,7 +235,7 @@ claude \
251
235
252
236
### 2. Load-workflow skill
253
237
254
-
A meta-skill that reads a workflow's `ambient.json`, clones each source, and sets them up for Claude:
238
+
A meta-skill that reads a workflow's `ambient.json`, clones each source, and passes them as `--add-dir`:
255
239
256
240
```
257
241
~/.claude/skills/load-workflow/SKILL.md
@@ -265,7 +249,7 @@ Usage:
265
249
The skill instructs Claude to:
266
250
1. Fetch the workflow's `ambient.json`
267
251
2. Clone each source to temp directories
268
-
3.Set up `.claude/` structures so skills are discoverable
252
+
3.Symlink `.claude/` structures into the project
269
253
4. The workflow's `CLAUDE.md` is loaded automatically
270
254
271
255
This makes ACP workflows portable — anyone with Claude Code can use them without ACP.
@@ -274,4 +258,12 @@ This makes ACP workflows portable — anyone with Claude Code can use them witho
274
258
275
259
## Open Questions
276
260
277
-
1.**"Always add" defaults**: Should some workspace-level sources be auto-loaded into every session? Current proposal: a `default` flag on installed items — pre-selected at session creation, user can uncheck. Needs further discussion.
261
+
1.**Skill versioning**: Sources reference branches today. Should we support tags or SHAs for pinning? What happens when a skill source updates — do sessions get the latest on next start?
262
+
263
+
2.**Plugin format**: Should workflow export produce a Claude Code plugin (`plugin.json`)? Pros: portable, namespaced, versioned. Cons: plugins cache/copy files which breaks the dynamic reference model.
264
+
265
+
3.**RHAI alignment**: How does this map to RHAIRFE-1370 (Skills Registry)? Our `sources` format and marketplace could inform the product's in-cluster registry design.
266
+
267
+
4.**Security**: How do we verify skill sources haven't been tampered with? Git commit SHAs provide content-addressable verification. Enterprise customers may need signed manifests.
268
+
269
+
5.**Workspace defaults**: Should some workspace-level items be "always-on" (loaded in every session regardless of workflow)? Or should this be handled via org-level Claude Code managed settings?
0 commit comments