cb-analytics-admin
Use this skill when the user wants to inspect or manage the Analytics service's runtime — checking ingestion health, killing…
Design, deploy, and troubleshoot Couchbase Eventing functions. Use whenever the user asks about Eventing, eventing functions, JavaScript functions on document mutations, source bucket, metadata bucket, source keyspace, metadata keyspace, OnUpdate, OnDelete, cron triggers, curl()
Claude Code
$ npx -y skills add celticht32/Couchbase-Skills-for-Claude.ai --skill couchbase-eventing --agent claude-code
Codex
$ npx skills add celticht32/Couchbase-Skills-for-Claude.ai --skill couchbase-eventing -a codex -y
Cursor
$ npx skills add celticht32/Couchbase-Skills-for-Claude.ai --skill couchbase-eventing -a cursor -y
Gemini CLI
$ npx skills add celticht32/Couchbase-Skills-for-Claude.ai --skill couchbase-eventing -a gemini-cli -y
GitHub Copilot
$ npx skills add celticht32/Couchbase-Skills-for-Claude.ai --skill couchbase-eventing -a github-copilot -y
OpenCode
$ npx skills add celticht32/Couchbase-Skills-for-Claude.ai --skill couchbase-eventing -a opencode -y
Windsurf
$ npx skills add celticht32/Couchbase-Skills-for-Claude.ai --skill couchbase-eventing -a windsurf -y
name: couchbase-eventing description: "Design, deploy, and troubleshoot Couchbase Eventing functions. Use whenever the user asks about Eventing, eventing functions, JavaScript functions on document mutations, source bucket, metadata bucket, source keyspace, metadata keyspace, OnUpdate, OnDelete, cron triggers, curl() in eventing, N1QL in eventing, eventing deployment state (deployed / undeployed / paused), eventing worker count, DCP feed, Eventing service, admin_eventing_* tools, or 'how do I run code when a document changes.' Distinct from couchbase-mcp (calling the tools) and couchbase-app-integration (SDK-based change notification via DCP/Kafka). Use proactively when the user has a change-driven processing need: cache warming, audit logging, cross-collection sync, event publishing, or derived document generation." license: MIT
A skill for *designing and operating* Couchbase Eventing functions — JavaScript that runs in response to document mutations in a source collection.
Distinct from:
If the conversation is "I want to run code when a document changes," this is the right skill.
| Question | Read | |---|---| | "How do I write the JavaScript? OnUpdate, OnDelete, cron, curl, N1QL?" | `references/function-authoring.md` | | "How do I configure and deploy a function — source, metadata, workers, bindings?" | `references/deployment.md` | | "Function isn't triggering / processing slowly / throwing errors — what's wrong?" | `references/troubleshooting.md` |
**Principle 1 — Eventing is exactly-once delivery from the DCP feed, not exactly-once execution.** The Eventing service reads from Couchbase's internal DCP (Database Change Protocol) feed. Each mutation triggers `OnUpdate` or `OnDelete` once *in the steady state*. But during node failures, rebalances, or function redeploys, a mutation can be delivered more than once. Write your handlers to be idempotent — running the same function against the same document twice should produce the same result.
**Principle 2 — The metadata keyspace is reserved; never store application data there.** The Eventing service uses the metadata keyspace internally to track which mutations have been processed (checkpointing), manage timers, and store function state. Writing application documents into it causes unpredictable behaviour. Create a dedicated bucket/scope/collection for metadata, separate from your application data.
**Principle 3 — Eventing is not a general compute layer.** Eventing handlers run synchronously per-mutation on the Eventing service nodes. Heavy computation, large curl() loops, or long-running N1QL queries inside handlers will queue mutations and cause the DCP feed to lag. For complex processing, emit a lightweight "work order" document to a queue collection and process it separately.
| Task | Tool | |---|---| | List all functions | `admin_eventing_list_functions` | | Get one function's definition | `admin_eventing_get_function` | | Create or update a function | `admin_eventing_upsert_function` | | Delete a function | `admin_eventing_delete_function` | | Deploy a function | `admin_eventing_deploy_function` | | Undeploy a function | `admin_eventing_undeploy_function` | | Pause a function (keeps state) | `admin_eventing_pause_function` | | Resume a paused function | `admin_eventing_resume_function` | | Get function stats (processing rate, backlogs) | `admin_eventing_get_function_stats` |
Undeployed ──deploy──► Deployed ──undeploy──► Undeployed
│
pause
│
▼
Paused ──resume──► DeployedRedeploying an undeployed function by default processes all existing documents in the source collection (a "from beginning" deployment). Use `deployment_config.from_now: true` to process only new mutations from the deployment point.
Claude skill files for working with Couchbase — covering every major service and deployment pattern from application integration through AI applications, Kubernetes operations, mobile sync, security hardening, and analytics.
Use this skill when the user wants to inspect or manage the Analytics service's runtime — checking ingestion health, killing…
Use this skill when the user wants to manage Couchbase Capella resources through the Cloud Management API — listing organisations…
Use this skill when the user wants to inspect or configure the Couchbase cluster itself — node membership, memory quotas,…
Use this skill when the user is managing Analytics data-source links — S3, Azure Blob, GCS, or remote Couchbase links — including…
Use this skill when the user is setting up cb-analytics-mcp from scratch or troubleshooting an existing install — generating…
Use this skill when the user wants to write or improve SQL++ queries against Couchbase Analytics through cb-analytics-mcp.…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.