/database-operations-skills:elasticsearch-opensearch-configuration-validationfrom database-operations-skills
Validates Elasticsearch/OpenSearch index mappings, shard counts, replica allocation, and ILM/ISM policies before production indexing. Checks primary shard count against data volume and node count, field types against query patterns, and allocation-awareness against failure domains.
Ships in database-operations-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
An Elasticsearch/OpenSearch index's most consequential decisions —
primary shard count and field mapping types — are effectively fixed at
creation time: primary shard count cannot be changed without a reindex
or _split/_shrink operation, and most mapping field-type changes
require a full reindex rather than an in-place update. That makes
pre-production validation disproportionately valuable here compared to
databases where a config mistake is a quick ALTER. This skill is the
validation gate — checking a proposed mapping, shard count, replica
setting, or ILM/ISM policy against real data volume, query patterns,
and failure-domain topology before an index goes live — complementing
the day-2 operational and reindexing guidance in
elasticsearch-opensearch-cluster-operations.
keyword vs. text, whether a
field needs to be searchable at all) since most mapping changes later
require a full reindex.number_of_replicas or allocation-awareness
attributes, to validate the change actually improves the fault
tolerance it's intended to.monitor and manage_index_templates privileges (read-level) for
validation queries; write/manage privileges only needed to apply a
validated change.number_of_shards moved from 5 to 1 in
7.0 — validate the actual configured default on the cluster/template
in question rather than assuming a version-specific default applies)._cat/allocation), to validate a
proposed shard count against real capacity rather than in isolation.curl -s "http://<HOST>:9200/_cat/nodes?v&h=name,heap.max,disk.avail"
curl -s "http://<HOST>:9200/_cat/allocation?v"
_split (increase) or _shrink (decrease) operation, both of which
have their own constraints (_split requires the original shard count
to evenly divide into the new one), or a full reindex. Validate the
proposed count against a real estimate of total data size ÷ target
per-shard size (a commonly cited healthy range is roughly 10–50GB per
shard, but validate against your actual node heap/disk rather than
treating that as a hard rule), not a default carried over from an
unrelated index.GET /<index>/_mapping
text fields are analyzed (tokenized) for full-text search but cannot
be used for exact-match filtering, sorting, or aggregation without a
keyword sub-field or a separate keyword-typed field — validate
that any field intended for exact match/filter/sort/aggregation
(status codes, IDs, categorical tags) is mapped keyword, not text,
from the start.
"status": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }
integer vs. long, float vs.
double) — oversized numeric types waste memory across every
document at scale with no query benefit if the value range never
needs it.dynamic mapping settings deliberately rather than leaving
the cluster/index default unexamined: fully dynamic mapping
("dynamic": true, the default) lets an unexpected or malformed field
in a single document silently create a new mapped field cluster-wide,
which can bloat cluster state or cause a mapping-type conflict later
if a differently-typed value for the "same" field name arrives from a
different source. Consider "dynamic": "strict" (reject unmapped
fields outright) or "dynamic": "false" (accept but don't index them)
for indices with a well-understood, stable schema."index": false on a field only ever retrieved via _source, not
searched/filtered/aggregated) — indexing costs write throughput and
disk for no query benefit if unused.curl -s "http://<HOST>:9200/_cluster/settings?pretty" | grep -A5 awareness
number_of_replicas should be validated against the actual number of
nodes in the target failure domain(s), not just "at least 1 for
safety" — a replica configured but with no eligible node available in
a different failure domain than the primary provides no real fault
tolerance even though the cluster reports the shard as assigned.cluster.routing.allocation.awareness.attributes (e.g. zone) is
configured, validate every relevant node actually carries the
corresponding node.attr.zone setting — a node missing the attribute
is treated as its own implicit group by the allocator, which can
produce lopsided shard distribution that isn't obvious from
_cluster/health alone. Cross-check with:
curl -s "http://<HOST>:9200/_cat/nodeattrs?v"
number_of_replicas doesn't exceed the number of eligible
nodes available to host them under the awareness constraints in
place — this produces a perpetually yellow index that will never
resolve to green without either adding nodes or reducing the
replica count, a common false alarm that wastes on-call time if not
caught during review.GET _ilm/policy/<policy-name>
rollover conditions (max_primary_shard_size, max_age,
max_docs) actually align with expected ingest rate — a rollover
max_age set far longer than the realistic time to reach the size
threshold means rollover is effectively size-only in practice (not
wrong, but validate that's the intended behavior, not an unexamined
default).delete.min_age against the actual, current rollover
cadence, not a value computed under an earlier or assumed cadence — a
common source of unintended early deletion is a retention window
computed as "N rollover periods" when the real rollover interval later
changed (e.g. from daily to weekly) without updating the ILM policy's
age-based thresholds to match.shrink/forcemerge action in a warm/cold phase is
scheduled with realistic min_age relative to real query patterns —
forcemerge is I/O-intensive and should only run once an index is
genuinely done receiving writes, and a shrink action reduces shard
count (must evenly divide the current count) which affects the same
per-shard-size considerations validated in step 1.Apply the proposed mapping or shard count to a staging index seeded with data of the real expected shape and volume (not just row count — field cardinality and value-length distribution matter for both mapping memory footprint and shard-size projections), and confirm actual resulting shard sizes and query latency before committing to the same config in production, since a reindex to correct a bad choice after data has accumulated is exactly the expensive operation this validation step is meant to avoid.
dynamic: "strict" (or at minimum "false")
unless there's a specific, understood reason to allow fully dynamic
mapping — an uncontrolled dynamic mapping is a common source of
cluster-state bloat and silent mapping-type conflicts.number_of_replicas against real, current node/failure-
domain availability at review time, not against a static "always set
to 1" policy that might not actually be achievable given the current
cluster shape.delete.min_age any time the rollover cadence
changes — treat a cadence change as requiring a retention-math review,
not an independent, unrelated setting.Symptom: An index created with a single primary shard grows far beyond a healthy shard size within weeks, and query/indexing latency degrades steadily with no way to fix it without a full reindex. Fix: Shard count wasn't validated against realistic growth projections, and no ILM/ISM rollover policy was in place to create new backing indices as it grew. Validate shard count (or rollover policy presence) against expected total lifetime volume at review time, not just initial/day-one volume.
Symptom: A field intended for filtering/aggregation
(status, region, an ID field) throws an "illegal_argument" /
"fielddata" error when the application tries to sort or aggregate on
it, or aggregation results look wrong (split by tokenized terms
instead of exact values).
Fix: The field was mapped text (analyzed/tokenized) instead of
keyword. Since mapping type changes aren't in-place, this requires a
full reindex to a corrected mapping — validate every field's intended
query usage (full-text search vs. exact match/filter/sort/aggregate)
against its mapping type before the index goes live, to avoid this
reindex.
Symptom: An index stays yellow indefinitely no matter how long
it's given, and _cluster/allocation/explain shows a replica simply
has no eligible node to allocate to.
Fix: number_of_replicas was set without validating it against
the real number of nodes available under the current allocation-
awareness constraints (e.g. zone awareness configured with replicas
requested across more zones than actually exist). Validate replica
count against actual eligible-node availability at review time, not a
blanket policy value.
Symptom: An ILM policy's delete phase removes data noticeably
earlier than the team's intended retention period.
Fix: delete.min_age was computed assuming a rollover cadence
that has since changed (e.g. rollover now happens weekly instead of
daily, but the delete-phase age threshold was never recalculated).
Validate delete.min_age against the current rollover cadence
every time either setting changes, and treat any retention-window
computation error as effectively irreversible once the delete phase
has fired, since there's typically no in-cluster restore path.
Symptom: A reviewer approves a new index template with fully
dynamic mapping ("dynamic": true, unexamined default) for a
high-volume, externally-fed data source, and a malformed upstream
field later causes a mapping-type conflict that blocks indexing for
an entire index.
Fix: Fully dynamic mapping let an unexpected field auto-create a
mapping that a later document's differently-typed value for the "same"
field name then conflicts with, rejecting those documents outright.
Validate dynamic mapping setting deliberately for any externally-fed
or loosely-controlled data source — prefer "strict" or "false" with
an explicit, reviewed mapping for expected fields, treating an
unreviewed fully-dynamic mapping as a finding, not an acceptable
default.
Scenario: A team requests review of a new index template for a
customer-events data source, expected to ingest ~50M documents/day, with
a proposed mapping and a 5-primary-shard, 1-replica configuration, no
ILM policy attached yet, and dynamic: true left at default.
max_primary_shard_size: 40gb / max_age: 1d rollover instead of
relying on shard count alone to absorb the full expected volume.customer_id, event_type, and
region were mapped text by the (unexamined) dynamic default.
Flag as blocking — the team confirms all three are always used for
exact filtering/aggregation, never full-text search. Corrected
mapping specifies keyword explicitly for these fields.dynamic setting: default true risks a malformed upstream
field (a known-unreliable third-party event source feeds this index)
creating an unreviewed mapped field or a later type conflict. Flag
and recommend dynamic: "strict" with all expected fields explicitly
mapped, since the event schema is well-documented and stable.keyword mappings for filter/aggregate
fields, dynamic: "strict", ILM rollover policy attached at index-
template creation time (not added retroactively after data has
already accumulated in an unmanaged single index), number_of_replicas: 1 confirmed safe under existing zone topology — validated against a
staging index seeded with a day's worth of representative sample data
before the production template is applied.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
elasticsearch, opensearch, index-mapping, shard-validation, ilm-policy, ism-policy
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin database-operations-skills23 skills in this plugin
/arangodb-multi-model-database-operationsCovers operating ArangoDB, a multi-model database combining document, graph, and key-value collections in a single engine with a unified query language (AQL): collection type selection, graph traversal via AQL, and cluster configuration (coordinators, DB-servers, agency). Use when the user asks to "write an AQL query," "should I use a document or edge collection in ArangoDB," "set up an ArangoDB cluster," "why is this AQL graph traversal slow," or "choose between ArangoDB and a single-purpose database for a mixed graph/document workload."
/cassandra-wide-column-database-operationsCovers Apache Cassandra ring topology and token/partition design, tunable consistency levels (ONE, QUORUM, ALL, LOCAL_QUORUM), compaction strategy selection (SizeTiered, Leveled, TimeWindow), and tombstone/GC-grace management. Use when the user asks to "design a Cassandra partition key," "choose a Cassandra consistency level," "why is this Cassandra query slow," "pick a compaction strategy," "Cassandra tombstone warnings in logs," or "add/remove a node from a Cassandra ring."
/clickhouse-analytical-database-operationsCovers operating ClickHouse, the leading open-source OLAP columnar database: MergeTree engine family selection (MergeTree, ReplacingMergeTree, AggregatingMergeTree, SummingMergeTree), sharding and replication topology via ReplicatedMergeTree and Distributed tables, and materialized views for streaming aggregation. Use when the user asks to "set up a ClickHouse cluster," "pick a MergeTree engine," "why are my ClickHouse queries slow," "shard and replicate ClickHouse tables," "deduplicate rows in ClickHouse," or "build a ClickHouse materialized view for rollups."
/cloud-data-warehouse-operations-snowflake-bigquery-redshiftComparative operations guide for the three dominant managed cloud data warehouses: Snowflake virtual warehouse sizing and multi-cluster scaling, BigQuery slot allocation and on-demand vs. capacity pricing, and Redshift cluster/RA3 node sizing and workload management (WLM) — plus cost-control and query-performance practices common to all three. Use when the user asks to "size a Snowflake warehouse," "control BigQuery query costs," "tune Redshift WLM queues," "why is this warehouse query slow," "reduce our data warehouse bill," or "choose between Snowflake, BigQuery, and Redshift."
/database-backup-and-restore-strategiesCross-database backup tooling and restore-testing discipline: pg_dump/pg_basebackup for PostgreSQL, mysqldump/Percona XtraBackup for MySQL/MariaDB, and mongodump/mongorestore for MongoDB — logical vs. physical backup trade-offs, point-in-time recovery, and why an untested restore is not a real backup. Use when the user asks to "set up database backups," "restore from a pg_basebackup," "why did our mysqldump restore fail," "test our backup/restore process," "set up point-in-time recovery," or "design a backup retention policy."
/database-connection-pooling-strategiesCross-database connection pooling patterns and tooling: PgBouncer for PostgreSQL, ProxySQL for MySQL/MariaDB, and the shared design questions (transaction vs. session vs. statement pooling modes, backend pool sizing, failover-aware routing) that apply regardless of the underlying database engine. Use when the user asks to "size a connection pool," "choose between transaction and session pooling," "set up ProxySQL for MySQL," "why do prepared statements break under pooling," or "route reads/writes through a proxy during failover."
Other plugins' skills for the same job