saved-object

saved-object is a command for coding agents from ch-bas/kibana-plugin-helper. It costs 24 tokens per session (992 once invoked), scanned A, original, MIT.

A generator for Kibana Saved Objects, which are plugin data records that Kibana can store, organize by workspace, import, export, and migrate between versions.

In plain words
What is it for?
Use it to add plugin data such as dashboards or settings, define their fields and workspace scope, and support create, read, update, delete, migration, and import/export operations.
Why use it?
It removes the need to manually create the data definition, storage registration, upgrade steps, and management-page integration.

Command

Part of the kibana-plugin-helper plugin — 1 skill, 8 commands, 5 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ch-bas/kibana-plugin-helper/saved-object
Clone the repo
git clone --depth 1 https://github.com/ch-bas/kibana-plugin-helper

Or install kibana-plugin-helper, the plugin that ships this one along with the rest of its 1 skill, 8 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for saved-object

README.md
[![agentmods](https://agentmods.dev/badge/commands/ch-bas/kibana-plugin-helper/saved-object.svg)](https://agentmods.dev/commands/ch-bas/kibana-plugin-helper/saved-object)
Your own site
<a href="https://agentmods.dev/commands/ch-bas/kibana-plugin-helper/saved-object"><img src="https://agentmods.dev/badge/commands/ch-bas/kibana-plugin-helper/saved-object.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 992 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00024 $0.00992
Opus 5 $0.00012 $0.00496
Sonnet 5 $0.00005 $0.00198
Haiku 4.5 $0.00002 $0.00099

Measured 4d ago against content hash 1732a6a9e7cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

saved-object scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/saved-object.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate Kibana Saved Object Type

Create a complete custom Saved Object type for a Kibana plugin. Ask the user for:

  1. Saved Object type name (snake_case, e.g. my_plugin_dashboard)
  2. Attributes/fields (name, type, required/optional for each)
  3. Namespace type: single (space-scoped), multiple (shareable across spaces), or agnostic (global)
  4. Hidden? (default: false — hidden types are only accessible via the internal API)
  5. Needs migrations? (if upgrading from a previous version, describe schema changes)
  6. Needs management integration? (visible in Kibana's Saved Objects management page)
  7. Needs references to other saved objects? (e.g. references to dashboards, index patterns)
  8. Needs import/export support? (default: yes for non-hidden types)

Generation Steps

  1. Create the saved object type definition in server/saved_objects/ directory
  2. Generate the type registration file with:
    • Type name constant in common/index.ts
    • Attribute mappings (keyword, text, boolean, integer, long, date, object, nested, etc.)
    • namespaceType setting
    • hidden flag
    • management section (importableAndExportable, icon, defaultSearchField, getTitle, getInAppUrl)
    • mappings with all properties correctly typed
  3. Generate migrations if needed:
    • Create server/saved_objects/migrations/ directory
    • Create versioned migration functions (e.g. 7.14.0, 8.0.0)
    • Each migration transforms the document from one version to the next
    • Use SavedObjectMigrationFn type signature
  4. Generate a CRUD service class in server/services/:
    • create() — creates a new saved object
    • get() — retrieves by ID
    • find() — searches with filters, pagination, sorting
    • update() — partial update
    • delete() — removes the saved object
    • bulkCreate() / bulkGet() — batch operations
    • Proper error handling with SavedObjectsErrorHelpers
  5. Register the type in the server plugin's setup() method using core.savedObjects.registerType()
  6. Generate server routes that use the CRUD service
  7. If management integration is needed, configure management properties in the type definition

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 92 lines · 24 tokens per session scan A 1732a6a9e7cd

Subscribe to this mod's changes

saved-object is a command published in the GitHub repository ch-bas/kibana-plugin-helper (3 stars, last pushed 6mo ago), licensed MIT. It adds 24 tokens to every session and 992 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.