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.
npx skills add yale-som-hpc/claude-code-marketplace --skill self-diagnosing-resource-usegit clone --depth 1 https://github.com/yale-som-hpc/claude-code-marketplaceWrote 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.
[](https://agentmods.dev/skills/yale-som-hpc/claude-code-marketplace/self-diagnosing-resource-use)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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
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.
- 2mo ago First seen · 144 lines · 85 tokens per session scan A b7dc3f2fb05a
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.
self-diagnosing-resource-use compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| self-diagnosing-resource-useyale-som-hpc/claude-code-marketplace | Skill | 5 | 3mo ago | Unlicense | A | 85 | Claude Code |
| instrument-data-to-allotropeanthropics/knowledge-work-plugins | Skill | 35k | 2d ago | Apache-2.0 | A | 123 | Claude Code |
| exploratory-data-analysisK-Dense-AI/scientific-agent-skills | Skill | 56k | 4d ago | MIT | A | 83 | Claude Code |
| matlabK-Dense-AI/scientific-agent-skills | Skill | 56k | 4d ago | MIT | A | 44 | Claude Code |
| phylogeneticsK-Dense-AI/scientific-agent-skills | Skill | 56k | 4d ago | MIT | A | 71 | Claude Code, Codex |
| research-engineerdavila7/claude-code-templates | Skill | 33k | yesterday | MIT | A | 43 | Claude Code, Codex |
| mapping-to-snomedmaziyarpanahi/openmed | Skill | 5.8k | yesterday | Apache-2.0 | A | 205 | Claude Code |