alloydb-omni-performance
Use these skills when you need to analyze query performance, generate execution plans, check table/column statistics, and monitor overall database activity.
What this skill does
## Usage
All scripts can be executed using Node.js. Replace `<param_name>` and `<param_value>` with actual values.
**Bash:**
`node <skill_dir>/scripts/<script_name>.js '{"<param_name>": "<param_value>"}'`
**PowerShell:**
`node <skill_dir>/scripts/<script_name>.js '{\"<param_name>\": \"<param_value>\"}'`
Note: The scripts automatically load the environment variables from various .env files. Do not ask the user to set vars unless skill executions fails due to env var absence.
## Scripts
### execute_sql
Use this skill to execute a single SQL statement.
#### Parameters
| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| sql | string | The sql to execute. | Yes | |
---
### get_column_cardinality
Estimates the number of unique values (cardinality) quickly for one or all columns in a specific PostgreSQL table by using the database's internal statistics, returning the results in descending order of estimated cardinality. Please run ANALYZE on the table before using this skill to get accurate results. The skill returns the column_name and the estimated_cardinality. If the column_name is not provided, the skill returns all columns along with their estimated cardinality.
#### Parameters
| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| schema_name | string | Optional: The schema name in which the table is present. | No | `public` |
| table_name | string | Required: The table name in which the column is present. | Yes | |
| column_name | string | Optional: The column name for which the cardinality is to be found. If not provided, cardinality for all columns will be returned. | No | |
---
### get_query_plan
Generate a PostgreSQL EXPLAIN plan in JSON format for a single SQL statement—without executing it. This returns the optimizer's estimated plan, costs, and rows (no ANALYZE, no extra options). Use in production safely for plan inspection, regression checks, and query tuning workflows.
#### Parameters
| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| query | string | The SQL statement for which you want to generate plan (omit the EXPLAIN keyword). | Yes | |
---
### list_active_queries
List the top N (default 50) currently running queries (state='active') from pg_stat_activity, ordered by longest-running first. Returns pid, user, database, application_name, client_addr, state, wait_event_type/wait_event, backend/xact/query start times, computed query_duration, and the SQL text.
#### Parameters
| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| min_duration | string | Optional: Only show queries running at least this long (e.g., '1 minute', '1 second', '2 seconds'). | No | `1 minute` |
| exclude_application_names | string | Optional: A comma-separated list of application names to exclude from the query results. This is useful for filtering out queries from specific applications (e.g., 'psql', 'pgAdmin', 'DBeaver'). The match is case-sensitive. Whitespace around commas and names is automatically handled. If this parameter is omitted, no applications are excluded. | No | |
| limit | integer | Optional: The maximum number of rows to return. | No | `50` |
---
### list_database_stats
#### Parameters
| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| database_name | string | Optional: A specific database name pattern to search for. | No | |
| include_templates | boolean | Optional: Whether to include template databases in the results. | No | `false` |
| database_owner | string | Optional: A specific database owner name pattern to search for. | No | |
| default_tablespace | string | Optional: A specific default tablespace name pattern to search for. | No | |
| order_by | string | Optional: The field to order the results by. Valid values are 'size' and 'commit'. | No | |
| limit | integer | Optional: The maximum number of rows to return. | No | `10` |
---
### list_query_stats
Lists performance statistics for executed queries ordered by total time, filtering by database name pattern if provided. This skill requires the pg_stat_statements extension to be installed. The skill returns the database name, query text, execution count, timing metrics (total, min, max, mean), rows affected, and buffer cache I/O statistics (hits and reads).
#### Parameters
| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| database_name | string | Optional: The database name to list query stats for. | No | |
| limit | integer | Optional: The maximum number of results to return. Defaults to 50. | No | `50` |
---
### list_table_stats
Lists the user table statistics in the database ordered by number of
sequential scans with a default limit of 50 rows. Returns the following
columns: schema name, table name, table size in bytes, number of
sequential scans, number of index scans, idx_scan_ratio_percent (showing
the percentage of total scans that utilized an index, where a low ratio
indicates missing or ineffective indexes), number of live rows, number
of dead rows, dead_row_ratio_percent (indicating potential table bloat),
total number of rows inserted, updated, and deleted, the timestamps
for the last_vacuum, last_autovacuum, and last_autoanalyze operations.
#### Parameters
| Name | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| schema_name | string | Optional: A specific schema name to filter by | No | `public` |
| table_name | string | Optional: A specific table name to filter by | No | |
| owner | string | Optional: A specific owner to filter by | No | |
| sort_by | string | Optional: The column to sort by | No | |
| limit | integer | Optional: The maximum number of results to return | No | `50` |
---
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.