elastic/kibana/create-connector
Claude Code and agent skill by elastic/kibana
- community
Checking that the SKILL.md file is still in the repository.
Creates a new connector spec for Kibana. Use when asked to create (or add) a new connector, integration, or data source.
Install
npx vskill@latest install elastic/kibana/create-connectorSKILL.md
The same SKILL.md was published earlier as elastic/kibana/create-connector.
Create a Connector
We're going to create a new connector spec for $0. The connector will enable Kibana to interact with the third-party service and expose operations as tools for AI agents.
Reference Materials
- [reference/connector-patterns.md](reference/connector-patterns.md) — Directory structure, file templates, and registration patterns
- [reference/pr-validation-table.md](reference/pr-validation-table.md) — Format for the
## Validatedaction-by-action table required in every connector PR description
Step 1: Determine the Connector Strategy
Check if $0 has an official hosted MCP server. If so, creating an MCP-native connector is preferred.
MCP server available? → Read reference/mcp-connector-setup.md and follow its steps.
No MCP server available? → Read reference/custom-connector-setup.md and follow its steps.
Follow only the steps for the chosen path. Do not mix them.
Choose the actions
Decide which vendor operations become actions before researching any one of them. If the invocation lists actions after the service name (build-connector passes the list the user confirmed), build those. Otherwise propose a set yourself. For a custom connector, list what the spec offers after scaffolding with node scripts/connector_vendor_api --inspect --connector <id> --source v1=<url> --grep <area>; for an MCP connector, the server's tools are the candidates (listTools and callTool reach the rest).
Choose from the questions a user is likely to ask an agent about $0, not from the breadth of the API:
- at least one discovery action (the current user, the projects, spaces or accounts it can see), so the
IDs other actions take can be found;
- for every search or list, a way to open a result; for every write, a way to read the state back;
- one action with a
typeenum where the vendor has the same operation for several entity types; - writes only where a use case needs them; destructive and admin operations left out, or
isTool: false
with the reason;
- no deprecated operations (the listing marks them).
These are the "Tool Design" checks in review-connector, applied before the code exists. A given list is only extended where it fails them, and each addition is reported as such.
Record the result in the PR description's ## Actions section (see reference/pr-validation-table.md), and start your report with it, so the user can change the set before the connector is tested.
Choose the inbound events
Decide this in the same pass as the actions, before writing handlers. Add events when the vendor can POST a webhook, subscription, or callback that should start a workflow, open or update a case, or raise an alert. The user asking for bi-directional sync, response-ops style, or "the same connector for cases and alerts" means a dual spec, not a second connector and not a classic ActionType.
If the invocation lists event keys, build those. Otherwise propose the set: one typed event per vendor occurrence a workflow, case, or alert will actually use (created, updated, resolved, a comment), and leave the rest of the vendor catalog out. Say which occurrences you are not modeling. A connector that only calls the vendor gets no events; say that explicitly in the report.
Do not declare events on the first PR that introduces the connector type. Record the agreed event keys in that PR's description as the required follow-up. Add events only in the follow-up that also adds 'workflows', once the type is registered in every Production-NonCanary version (Step 2).
getConnectorEventTriggerDefinitions() publishes a trigger for every definition without reading supportedFeatureIds, and getAvailableConnectors() includes event connector types even when 'workflows' is absent. Keeping ['agentBuilder'] and writing the docs as "not available yet" does not hide the triggers. A workflow saved against the new event id breaks on a rollout or rollback node that does not have the type.
An inbound-only connector uses the same split. The first PR registers the type with no events. The follow-up adds events and supportedFeatureIds: ['workflows'] (see .inboundWebhook). An existing connector that is already on every Production-NonCanary version can take events in the PR that adds them.
Research the vendor API before writing schemas or handlers
For a custom (non-MCP) connector, do this before Step 2. Start from the vendor's own machine-readable spec: find its URL, then list and describe the operations your actions will call with node scripts/connector_vendor_api --inspect --connector <id> --source v1=<url> [--grep <text> | --operation '<METHOD> <path>'], and write each action's method, parameter locations and zod bounds from that description. The first inspection adds the source to the connector's vendor_api/manifest.json; leave out --source after it. See "Start from the vendor's spec" in reference/custom-connector-setup.md. The connector is recorded and checked against the same spec in Step 4, so code written from it avoids most of what recording would report.
Then, for each action, find the vendor's real API docs and verify what the spec doesn't settle — don't assume: update semantics (partial vs. full-replace, including nested objects sent whole), the HTTP method and body shape of that exact route, how array query params are encoded, whether optional modifier params (scope, filters, flags) on POST/PATCH actions belong in the query string or the JSON body, the auth scope or cloud role (and the level it is granted at) each action needs, each identifier field's allowed format, the resource variants the vendor documents, and whether the service has regional/self-hosted domain variants. See "Research the Vendor API Before Writing Any Code" in reference/custom-connector-setup.md for the full checklist. Bugs found late (during manual testing or review) that trace back to skipping this step are expensive to fix one action at a time — verifying up front is cheaper.
If the vendor API is GraphQL, docs examples and general familiarity are not enough to get input type names and field selections right — verify every hardcoded type/field name against the real schema via introspection before writing the handler. See "Verify GraphQL Schemas via Introspection" in reference/custom-connector-setup.md.
Step 2: Create the Connector Spec
Create the connector spec in src/platform/packages/shared/kbn-connector-specs/src/specs/{connector_name}/.
Follow the patterns in reference/connector-patterns.md:
- `{connector_name}.ts` — ConnectorSpec definition with metadata, auth, schema, and actions
- `types.ts` — Zod input schemas and inferred TypeScript types for each action
- `{connector_name}.test.ts` — Unit tests
- `icon/index.tsx` — Brand icon component
- Helper files, when the spec file passes 500 lines — request plumbing, response shaping and
credential exchanges in sibling files, each with its own test file. Keep {connector_name}.ts under 500 lines and never over 1000; see Keep the spec file under 500 lines
Register in src/platform/packages/shared/kbn-connector-specs/src/all_specs.ts and connector_icons_map.ts.
supportedFeatureIds on a brand-new connector: two-step release
A new connector type must reach Production-NonCanary before it can declare user-facing features. Serverless rollouts and rollbacks leave nodes on different Kibana versions for a while, and a user action referencing a connector type that a node does not have breaks on that node. So the first PR ships supportedFeatureIds: ['agentBuilder'].
Do not put 'workflows' or any other user-facing feature ID in the first PR. Do not declare events either. Workflow triggers come from events.definitions with no supportedFeatureIds check, and the workflows connector list adds event connector types back in when 'workflows' is missing, so the feature id does not gate them. Both land in the follow-up PR once the connector is registered in every Production-NonCanary version.
Mention the required follow-up PR, including the agreed event keys, in the first PR's description so it is not forgotten. When this invocation is that follow-up, or the connector type is already on every Production-NonCanary version, add 'workflows' and events together.
MCP connectors: Use reference/mcp-connector-setup.md as the direct starting template for the spec — it has concrete, copy-ready examples with the correct lazySchema, callToolJson/callToolContent, and test-mock patterns already in place. Do not reverse-engineer from existing connectors.
Type every handler explicitly. Annotate each action's input parameter with its z.infer-derived type from types.ts (handler: async (ctx, input: SearchInput) => { ... }). Without the annotation it silently resolves to any — nothing fails to compile, but the handler gets zero type checking against its own Zod schema. Do this for every action as you write it, not as a later cleanup pass; with a dozen or more actions in one file it's easy to leave some untyped if you defer it.
Wrap every Zod schema in `lazySchema()`. Whenever a Zod schema is assigned to a variable, wrap it in lazySchema(() => ...) from @kbn/zod/v4. This covers the input schemas in types.ts and also module-level helpers, e.g. const IpAddressSchema = lazySchema(() => z.union([z.ipv4(), z.ipv6()]));. Wrap the spec's schema and any inline action input the same way. lazySchema defers building the schema until first use, so loading the connector registry does not build every connector's schemas at import time.
Keep `test.enabled: true` on a connector that calls the vendor. The scaffold generates test: { enabled: true, handler: ... } — don't drop enabled when you flesh out the handler body. An inbound-only spec (actions: {}) keeps enabled: false. Test is an outbound call.
Add inbound `events` when the vendor pushes them, on the rollout-safe PR. Bi-directional connectors — cases, alerting, and workflows that start from the vendor — use this same spec: outbound actions and inbound events. Follow Inbound events in the package README and Inbound events here. Omit events when the connector never receives a webhook, subscription, or callback.
On the first PR for a new connector type, do not add events, the allowlist entry, or the ingest section of the docs page. The event keys from Choose the inbound events go in the PR description as the follow-up. Build them when this invocation is that follow-up.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/platform/packages/shared/kbn-connector-specs/.claude/skills/create-connector/SKILL.md
Popularity
- Repository stars
- 21,172
- Repository forks
- 8,598
- 7-day trend score
- 50
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/elastic/kibana/create-connector)