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
Copy file name to clipboardExpand all lines: AGENTS.md
+17-19Lines changed: 17 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
> **Registry Architecture**: Commands are defined as `Resource` + `Operation` structs in `internal/resources/`, NOT as raw Cobra commands in `cmd/`. When adding a new command, implement the `Resource` interface and register it in `register.go`. Do NOT add `cobra.Command` definitions directly.
9
9
10
10
> [!IMPORTANT]
11
-
> **Embedded Skills**: Skill documents live in `internal/resources/skills/*.md`and are compiled into the binary via `//go:embed`. Do not create external skill files or reference paths outside this directory.
11
+
> **Skills**: Per-command agent skill documents live at `skills/<command>/SKILL.md`(top-level `skills/` directory), each with YAML frontmatter (`name`, `description`, `command`). They are not embedded in the binary — they are distributed separately for agent harnesses to consume.
12
12
13
13
> [!NOTE]
14
14
> **Minimal Dependencies**: The CLI has only 2 external dependencies (Cobra + pflag). Everything else is stdlib. Do not add new dependencies without strong justification.
@@ -40,7 +40,8 @@ The CLI uses a **resource-registry** pattern:
|`skills.go`|`skills list\|show` -- embedded skill document access via `//go:embed`|
68
68
69
69
### Client (`internal/client/`)
70
70
@@ -94,8 +94,6 @@ The CLI uses a **resource-registry** pattern:
94
94
|`connectors`|`execute`| Execute a connector action |`name`+`workspace` or `--id`, `entity`, `action`, `params`|
95
95
|`connectors`|`create`| Interactive credential flow |`workspace`, `template_name` or `template_id`|
96
96
|`connectors`|`delete`| Delete a connector |`name`+`workspace` or `--id`|
97
-
|`skills`|`list`| List available skill docs | -- |
98
-
|`skills`|`show`| Show skill document content |`name` (required) |
99
97
100
98
### Global Flags
101
99
@@ -196,24 +194,24 @@ When adding a new resource or operation:
196
194
3. Add tests in `internal/resources/<name>_test.go` using `newTestTokenServer()` and `newTestClient()` helpers
197
195
4. If the resource uses name-based lookup, add a `PreRun` hook for server-side ID resolution
198
196
5. Update the **Command Surface** table in this file
199
-
6. If the resource needs usage guidance, add a skill document in `internal/resources/skills/<name>.md`
197
+
6. If the resource adds a new leaf command, add a corresponding `skills/<command>/SKILL.md` with frontmatter (`name`, `description`, `command`) and task-oriented agent guidance
200
198
201
199
### Adding New Skills
202
200
203
-
Skill documents auto-register via Go's `//go:embed` directive. To add a new skill:
201
+
Skills are plain markdown files at `skills/<command>/SKILL.md`. To add one:
204
202
205
-
1. Create `internal/resources/skills/<name>.md` with a `# Title` heading followed by a one-line description
206
-
2. The skill will automatically appear in `airbyte skills list` and be readable via `airbyte skills show --json '{"name": "<name>"}'`
207
-
3. No code changes required -- the embed FS picks up all `.md` files in the directory
203
+
1. Create the folder: `skills/<resource>-<operation>/`
204
+
2. Add `SKILL.md` with YAML frontmatter:
205
+
```
206
+
---
207
+
name: <resource>-<operation>
208
+
description: <one-line summary used by listing tools>
209
+
command: airbyte <resource> <operation>
210
+
---
211
+
```
212
+
3. Follow with task-oriented body content (when to use, usage examples, error recovery, "do NOT" guidance).
213
+
4. No Go changes required — skills are not embedded in the binary.
208
214
209
215
## Skills Reference
210
216
211
-
| Skill | Purpose |
212
-
| --- | --- |
213
-
|`getting-started`| Auth setup, first commands, schema discovery, error handling |
Copy file name to clipboardExpand all lines: README.md
+4-11Lines changed: 4 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The CLI exposes Airbyte's resources (organizations, workspaces, connectors, etc.
9
9
-**Resource-driven**: commands aren't hand-written Cobra trees. Resources are declared as Go structs in `internal/resources/`, registered into a global registry, and dynamically materialized into Cobra commands at startup.
10
10
-**Self-describing**: any command will print its full parameter schema with `--describe`, so callers (especially LLMs) can discover required fields without guessing.
11
11
-**Minimal**: only two external dependencies (Cobra + pflag). Everything else is stdlib.
12
-
-**Embedded skills**: usage guidance for common workflows (auth, connectors, workspaces, discovery) is compiled into the binary and accessible via `airbyte skills`.
12
+
-**Distributable skills**: per-command agent skill documents live in `skills/<command>/SKILL.md` for downstream tooling (e.g. Claude Code) to consume directly.
13
13
14
14
See `AGENTS.md` for the full architecture reference and `CONTEXT.md` for the agent-facing usage guide.
15
15
@@ -30,7 +30,8 @@ main.go
30
30
| --- | --- |
31
31
|`cmd/`| Root Cobra command, persistent flags, version |
@@ -184,14 +184,7 @@ When you see a validation error, re-run the command with `--describe` to inspect
184
184
185
185
## Skills
186
186
187
-
Skill documents are markdown files compiled into the binary via `//go:embed`. They provide task-oriented guidance for agents.
188
-
189
-
```bash
190
-
airbyte skills list
191
-
airbyte skills show --json '{"name": "connectors"}'
192
-
```
193
-
194
-
Available skills: `getting-started`, `connectors`, `workspaces`, `discovery`.
187
+
Per-command agent skill documents live under `skills/<command>/SKILL.md`, each with YAML frontmatter (`name`, `description`, `command`) and task-oriented guidance. They are designed to be consumed by agent harnesses (e.g. Claude Code) — copy or symlink the directory into the harness's skill location, or distribute via your own tooling.
0 commit comments