self-diagnosing-resource-use

self-diagnosing-resource-use is a skill for Claude Code from yale-som-hpc/claude-code-marketplace. It costs 85 tokens per session (1,519 once invoked), scanned A, original, Unlicense.

Guidance for checking how many CPUs, how much memory, how many GPUs, and how much time a completed Slurm job actually used. Slurm is the cluster's job scheduler.

In plain words
What is it for?
Investigating slow, failed, waiting, or out-of-memory jobs and translating Slurm accounting results into better CPU, memory, GPU, and time requests.
Why use it?
It shows whether a job was under-resourced or requested more than necessary, so later jobs can be faster, safer, and less wasteful.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the hpc plugin — 23 skills, 3 commands shipped together

Good fit Investigating slow, failed, waiting, or out-of-memory jobs and translating Slurm accounting results into better CPU, memory, GPU, and time requests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yale-som-hpc/claude-code-marketplace/self-diagnosing-resource-use
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.

Any agent
npx skills add yale-som-hpc/claude-code-marketplace --skill self-diagnosing-resource-use
Clone the repo
git clone --depth 1 https://github.com/yale-som-hpc/claude-code-marketplace

Made for: Claude Code.

Or install hpc, the plugin that ships this one along with the rest of its 23 skills, 3 commands.

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 self-diagnosing-resource-use

README.md
[![agentmods](https://agentmods.dev/badge/skills/yale-som-hpc/claude-code-marketplace/self-diagnosing-resource-use/github.svg)](https://agentmods.dev/skills/yale-som-hpc/claude-code-marketplace/self-diagnosing-resource-use)
Your own site
<a href="https://agentmods.dev/skills/yale-som-hpc/claude-code-marketplace/self-diagnosing-resource-use"><img src="https://agentmods.dev/badge/skills/yale-som-hpc/claude-code-marketplace/self-diagnosing-resource-use/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for self-diagnosing-resource-use

Your own site · 80×15
<a href="https://agentmods.dev/skills/yale-som-hpc/claude-code-marketplace/self-diagnosing-resource-use"><img src="https://agentmods.dev/badge/skills/yale-som-hpc/claude-code-marketplace/self-diagnosing-resource-use.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,519 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00085 $0.01519
Opus 5.5 $0.00034 $0.00608
Sonnet 5.5 $0.00017 $0.00304
Haiku 4.5 $0.00009 $0.00152

Measured 2mo ago against content hash b7dc3f2fb05a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

self-diagnosing-resource-use 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 2mo 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.

plugins/hpc/skills/self-diagnosing-resource-use/SKILL.md · 144 lines

How it starts

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

Self-Diagnosing Resource Use

Rule: after every serious job, check what you actually used and right-size the next job. Do this on your own initiative and report the result in plain language — the user is usually a researcher who will not think to ask "was that wasteful?" Translate the numbers ("used 6 of 64 GB; drop --mem to 12G next time"), don't just paste seff output.

Completed job accounting

sacct -j JOBID --format=JobID,JobName,Elapsed,AllocCPUS,TotalCPU,MaxRSS,State --units=G

Note: MaxRSS is blank on the parent job row — it only populates on the .batch and step (.0, .1, …) rows. Read the .batch line for actual peak memory, not the summary line.

For a friendlier summary:

seff JOBID

Caveat: seff samples coarsely and reports CPU Utilized: 00:00:00 / 0.00% for sub-minute jobs even when they did real work (verified on this cluster). Ignore the CPU-efficiency numbers on jobs shorter than ~1–2 minutes — they reflect the sampling miss, not waste. Trust them only on jobs long enough to be sampled.

Interpret CPU use

Approximate CPU efficiency:

TotalCPU / (Elapsed × AllocCPUS)

Rules of thumb:

  • 50%: reasonable for CPU-bound jobs.

  • 10–50%: maybe I/O-bound or over-requested.
  • <10%: probably wasteful; request fewer CPUs or parallelize correctly.

Interpret memory use

If MaxRSS is 4 GB and you requested 128 GB, lower --mem next time. Aim for ~1.5–2× the observed peak, not 10×.

Why this matters: Slurm reserves the full requested memory whether or not your job uses it. A user requesting 1 TB for a 10 GB job is removing 1 TB from everyone else's available pool until the job ends. There are no per-user caps enforcing this — it runs on courtesy — so right-sizing is simply good citizenship on a shared machine.

Check current jobs

squeue -u $USER -o "%.8i %.9P %.20j %.2t %.10M %.6D %.4C %.10m %R"

GPU diagnosis

Inside a GPU allocation:

watch -n 1 nvidia-smi

Read the full file on GitHub · 144 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. 2mo ago First seen · 144 lines · 85 tokens per session scan A b7dc3f2fb05a

Subscribe to this mod's changes

self-diagnosing-resource-use is a skill published in the GitHub repository yale-som-hpc/claude-code-marketplace (5 stars, last pushed 3mo ago), licensed Unlicense. It adds 85 tokens to every session and 1,519 once invoked, about $0.0003 per session on Opus 5.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.

Related

self-diagnosing-resource-use compared with skills from other repositories

self-diagnosing-resource-use next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
self-diagnosing-resource-useyale-som-hpc/claude-code-marketplaceSkill53mo agoUnlicenseA85Claude Code
instrument-data-to-allotropeanthropics/knowledge-work-pluginsSkill35k2d agoApache-2.0A123Claude Code
exploratory-data-analysisK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA83Claude Code
matlabK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA44Claude Code
phylogeneticsK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA71Claude Code, Codex
research-engineerdavila7/claude-code-templatesSkill33kyesterdayMITA43Claude Code, Codex
mapping-to-snomedmaziyarpanahi/openmedSkill5.8kyesterdayApache-2.0A205Claude Code