agentleFS
MicrosoftKnown publishermicrosoft/bobsql/.github/skills/tempdb-growth/SKILL.md

tempdb-growth

Skill1 starsChanged 12 days agoMITView on GitHub

Diagnose unexpected tempdb data-file or transaction-log growth on SQL Server and Azure SQL Managed Instance. Use for tempdb filling up, space pressure, temporary object allocation, spills, version-store retention, long transactions, or growth during slow workloads, using troubleshoot/tempdb.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the diagnostic guide.

    line 10
  2. Distinctive:

    Use the existing SQL connection/tool or SSMS/sqlcmd.

    line 16
  3. Distinctive:

    Run space and IO first. Separate allocated file size, occupied categories, reusable extent space, and log occupancy.

    line 19
  4. Distinctive:

    Stop on errors and report the failing script and permission/platform issue.

    line 38
  5. Distinctive:

    Do not present partial or permission-limited results as a clean bill of health.

    line 39
  6. Distinctive:

    If no approved connection is available, provide the execution order and request redacted results rather than claiming a diagnosis.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Diagnose unexpected tempdb growth

Procedure

  1. Read the diagnostic guide. Confirm SQL Server 2019+ or Azure SQL Managed Instance, the intended instance, permissions, incident timeline, and whether data or log growth is reported. This kit does not support Azure SQL Database, Synapse, or Fabric. Do not run these scripts against those products or improvise around a platform guard.
  2. Obtain an approved connection to tempdb. Read scripts before execution. Use the existing SQL connection/tool or SSMS/sqlcmd; never invent credentials, targets, or results. All diagnostics are read-only, but may require elevated monitoring permissions and add some load.
  3. Run space and IO first. Separate allocated file size, occupied categories, reusable extent space, and log occupancy. Free extents do not measure free disk capacity.
  4. Run consumers to identify session allocations, active requests, and blocking. Keep SQL text disabled unless explicitly approved for a private capture. Session and request results overlap; never add those result sets together.
  5. For log pressure, run log transactions. Examine reuse waits, transaction age, used/reserved log bytes, and owners. A sleeping session with an open transaction can matter; the biggest writer is not necessarily the oldest transaction preventing reuse.
  6. For version retention, run version stores. Distinguish traditional tempdb versions from ADR persistent versions. PVS in a user database is not tempdb occupancy; SQL Server 2025 can also enable ADR/PVS in tempdb. Long-lived snapshot transactions are candidates, not proven blockers of cleanup. Account for database visibility and readable-secondary retention.
  7. Repeat relevant scripts at a modest interval (for example 30-60 seconds) and compare timestamps, file sizes, allocations, progress, and IO counter deltas. Discard deltas across restarts or counter resets; session IDs can be reused. Stop on errors and report the failing script and permission/platform issue. Do not present partial or permission-limited results as a clean bill of health.
  8. Report observed data/log growth, dominant category, likely owners, progress or waits, measured evidence, remaining hypotheses, and a safe next action. Request approval before shrink, restart, kill, configuration changes, or workload replay. Recommend one evidence-supported change and verify it with comparable samples; successful space reuse does not require file shrink.

If no approved connection is available, provide the execution order and request redacted results rather than claiming a diagnosis. Do not save raw query text, production captures, or credentials in this public repository. Follow secret handling.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.