CtrlK
BlogDocsLog inGet started
Tessl Logo

auditing-table-statistics

Audits optimizer table statistics for staleness, missing coverage, and data quality issues using SHOW STATISTICS. Use when diagnosing poor query performance, unexpected plan changes, or after bulk data changes to identify stale statistics requiring refresh via CREATE STATISTICS.

84

Quality

81%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

Quality

Discovery

100%

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

This is an excellent skill description that clearly defines a narrow, specific domain (optimizer statistics auditing), lists concrete actions and tools (SHOW STATISTICS, CREATE STATISTICS), and provides explicit trigger conditions covering multiple realistic scenarios. The description is concise, uses third person voice, and would be easily distinguishable from other database-related skills.

DimensionReasoningScore

Specificity

Lists multiple specific concrete actions: audits optimizer table statistics for staleness, missing coverage, and data quality issues using SHOW STATISTICS. Also mentions identifying stale statistics requiring refresh via CREATE STATISTICS.

3 / 3

Completeness

Clearly answers both what ('Audits optimizer table statistics for staleness, missing coverage, and data quality issues using SHOW STATISTICS') and when ('Use when diagnosing poor query performance, unexpected plan changes, or after bulk data changes').

3 / 3

Trigger Term Quality

Includes strong natural trigger terms users would say: 'poor query performance', 'unexpected plan changes', 'bulk data changes', 'stale statistics', 'SHOW STATISTICS', 'CREATE STATISTICS', 'optimizer table statistics'. These cover the natural language a DBA or developer would use.

3 / 3

Distinctiveness Conflict Risk

Highly distinctive niche focusing specifically on optimizer statistics auditing with SHOW STATISTICS and CREATE STATISTICS. Unlikely to conflict with general query tuning or database administration skills due to the precise scope.

3 / 3

Total

12

/

12

Passed

Implementation

62%

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The skill provides highly actionable, executable SQL queries with excellent workflow structure and validation checkpoints. However, it is severely bloated—easily 2-3x longer than necessary—with extensive explanations of database concepts Claude already understands (what histograms are, what statistics do, basic optimizer behavior). The core diagnostic queries and workflows are strong, but they're buried in unnecessary educational content that should either be removed or moved to reference files.

Suggestions

Remove or drastically condense the 'Core Concepts' section—Claude understands optimizer statistics, histograms, and cardinality estimation. Keep only CockroachDB-specific behaviors (e.g., the 20% auto-collection threshold, multi-column stats requiring manual creation).

Move the 'Key Considerations' section to a reference file; most of it repeats information from earlier sections or explains concepts Claude already knows.

Consolidate the staleness indicator table, statistics lifecycle explanation, and threshold tuning into a single concise section or reference file rather than spreading across multiple sections.

Remove explanatory tables like 'What Are Table Statistics?' and 'Staleness Indicators'—these explain basic database concepts. Replace with a brief note on CockroachDB-specific defaults only.

DimensionReasoningScore

Conciseness

Extremely verbose at ~400+ lines. Extensive explanations of concepts Claude already knows (what table statistics are, what histograms optimize, basic SQL concepts). The 'Core Concepts' section alone is unnecessary padding—Claude understands optimizer statistics. Tables explaining statistic types, staleness indicators, and collection schedules could be dramatically condensed. The 'Key Considerations' section rehashes information already covered earlier.

1 / 3

Actionability

All queries are fully executable SQL with clear customization points marked by comments. The bash script for batch collection is copy-paste ready. Each query includes interpretation guidance and key column explanations. The troubleshooting table maps issues to concrete fixes with actual SQL commands.

3 / 3

Workflow Clarity

Three well-defined workflows with numbered steps, explicit validation checkpoints (e.g., 'Verify refresh' step, 'Expected outcome' statements), and clear sequencing. The post-bulk-load workflow includes monitoring job progress before verification. Safety considerations include cancellation procedures and batch best practices with explicit resource monitoring.

3 / 3

Progressive Disclosure

References to supplementary files (references/statistics-thresholds.md, references/create-statistics-examples.md) and related skills are well-signaled and one-level deep. However, the main SKILL.md contains far too much inline content that should be in reference files—the Core Concepts section, Key Considerations section, and detailed histogram/multi-column explanations would be better as referenced material. No bundle files were provided to verify references exist.

2 / 3

Total

9

/

12

Passed

Validation

90%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation10 / 11 Passed

Validation for skill structure

CriteriaDescriptionResult

skill_md_line_count

SKILL.md is long (701 lines); consider splitting into references/ and linking

Warning

Total

10

/

11

Passed

Repository
cockroachlabs/cockroachdb-skills
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.