Skip to content

Commit f7e47db

Browse files
ldoguinona-agent
andcommitted
work on skill routing
Co-authored-by: Ona <no-reply@ona.com>
1 parent 181ce39 commit f7e47db

8 files changed

Lines changed: 101 additions & 4 deletions

File tree

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ A collection of Couchbase agent skills for use in agentic workflows. Each skill
1010

1111
## Skill Index
1212

13+
### Entry Point
14+
15+
| Skill | Description |
16+
|---|---|
17+
| [`couchbase`](skills/couchbase/) | Router skill — entry point for all Couchbase questions, reads `discovery.yaml` and routes to the right skill |
18+
1319
### Getting Started
1420

1521
| Skill | Description |

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ codex
3232

3333
Once installed, skills activate in two ways:
3434

35-
**Implicit**just describe what you need and Codex picks the right skill:
36-
> "How do I connect to Couchbase from Go?"
37-
> "How do I encrypt a field before storing it?"
35+
**Implicit**any mention of "Couchbase" loads the `$couchbase` router skill first. It reads `discovery.yaml` and routes to the right skill based on your question:
36+
> "How do I connect to Couchbase from Go?" → routes to `server-connection-go`
37+
> "How do I encrypt a field before storing it?" → routes to `fle``fle-<lang>`
3838
39-
**Explicit** — type `$` in the Codex composer to invoke a skill by name:
39+
**Explicit** — type `$` in the Codex composer to invoke a skill directly by name:
4040
```
4141
$server-connection-python
4242
$fle-go

discovery.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@
2323

2424
skills:
2525

26+
# ── Router (Codex / implicit invocation entry point) ─────────────
27+
28+
- skill: couchbase
29+
priority: primary
30+
use_when: the user asks any Couchbase question and no more specific skill has been loaded yet
31+
triggers:
32+
- "Couchbase"
33+
- "Couchbase SDK"
34+
- "Couchbase question"
35+
- "help with Couchbase"
36+
- "Couchbase help"
37+
2638
# ── Getting Started ───────────────────────────────────────────────
2739

2840
- skill: getting-started

routing.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ routes:
121121

122122
# ── Getting Started ───────────────────────────────────────────────
123123

124+
- from: couchbase
125+
to: getting-started
126+
condition: user is new to Couchbase or asks a general question
127+
type: topic
128+
129+
- from: getting-started
130+
to: couchbase
131+
condition: user asks a general Couchbase question and needs skill routing
132+
type: topic
133+
124134
- from: getting-started
125135
to: local-dev-setup
126136
condition: user wants to run Couchbase locally with Docker

scripts/validate-skills.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ server-querying-php|transactions-php
435435
server-querying-python|transactions-python
436436
server-querying-scala|transactions-scala
437437
analytics-rust|server-connection-rust
438+
couchbase|getting-started
438439
fle|fle-python
439440
fle|security
440441
fle-dotnet|server-connection-dotnet

skills/couchbase/SKILL.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: couchbase
3+
summary: Entry point for all Couchbase questions — routes to the right skill based on topic and language
4+
description: Entry point for all Couchbase questions — routes to the right skill based on topic and language. Use for any question about Couchbase SDK connection, querying, search, transactions, analytics, field-level encryption, testing, mobile, caching, eventing, Kafka, XDCR, backup, security, or data modeling.
5+
metadata:
6+
last_verified: "2026-05"
7+
handoff: # generated from routing.yaml — do not edit manually
8+
- condition: "user is new to Couchbase or asks a general question"
9+
skill: getting-started
10+
---
11+
12+
# Couchbase — Skill Router
13+
14+
This skill is the entry point for all Couchbase questions. Read `discovery.yaml` to find the right skill for the user's question, then load and follow that skill.
15+
16+
## Routing instructions
17+
18+
1. Read `discovery.yaml` from the root of this skills collection.
19+
2. Match the user's question against the `triggers` and `use_when` fields.
20+
3. Load the matching skill's `SKILL.md` and follow its instructions.
21+
4. If the user specifies a programming language, prefer the language-specific skill (e.g. `server-connection-go` over `server-connection-python`).
22+
5. If no skill matches, load `getting-started`.
23+
24+
## Quick reference
25+
26+
| Topic | Skill |
27+
|---|---|
28+
| New to Couchbase | `getting-started` |
29+
| Local Docker setup | `local-dev-setup` |
30+
| Capella (cloud) | `capella-quickstart` |
31+
| Connect from code | `server-connection-<lang>` |
32+
| SQL++ queries | `server-querying-<lang>` |
33+
| KV ops, CAS, bulk | `sdk-patterns-<lang>` |
34+
| Full-text / vector search | `search-<lang>` |
35+
| Transactions | `transactions-<lang>` |
36+
| Analytics / OLAP | `analytics-<lang>` |
37+
| Field-level encryption | `fle``fle-<lang>` |
38+
| Testing | `testing-patterns-<lang>` |
39+
| Caching / TTL | `caching-patterns` |
40+
| Data modeling | `server-data-modeling` |
41+
| Security / RBAC | `security` |
42+
| Eventing | `eventing` |
43+
| Kafka / DCP | `kafka` |
44+
| XDCR | `xdcr` |
45+
| Backup / restore | `backup` |
46+
| Disaster recovery | `disaster-recovery` |
47+
| Monitoring | `monitoring` |
48+
| Mobile (Android) | `mobile-android` |
49+
| Mobile (iOS) | `mobile-ios` |
50+
51+
Replace `<lang>` with: `python`, `java`, `go`, `dotnet`, `nodejs`, `php`, `ruby`, `rust`, or `scala`.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
skill: couchbase
3+
cases:
4+
5+
- id: couchbase-router-connection
6+
input: "How do I connect to Couchbase from Python?"
7+
expect:
8+
- server-connection-python
9+
code_block: python
10+
11+
- id: couchbase-router-transactions
12+
input: "How do I run transactions in Go?"
13+
expect:
14+
- transactions-go
15+
code_block: go

skills/getting-started/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: Introduction to Couchbase for new developers — mental model, core
55
metadata:
66
last_verified: "2026-05"
77
handoff: # generated from routing.yaml — do not edit manually
8+
- condition: "user asks a general Couchbase question and needs skill routing"
9+
skill: couchbase
810
- condition: "user wants to run Couchbase locally with Docker"
911
skill: local-dev-setup
1012
- condition: "user wants to use Couchbase Capella (cloud)"

0 commit comments

Comments
 (0)