predictive-resources

predictive-resources is a skill for Claude Code, Codex from bolivian-peru/os-moda. It costs 33 tokens per session (776 once invoked), scanned A, original, Apache-2.0.

A guide for predicting when disk, memory, or swap space may run out by examining measurements over time. Swap is disk space used when the computer needs more memory than its RAM provides.

In plain words
What is it for?
Use it to analyze resource trends, estimate when storage will reach a limit, monitor observations, and propose NixOS configuration changes before exhaustion.
Why use it?
It can reveal steadily growing usage before it causes a service or system failure.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to analyze resource trends, estimate when storage will reach a limit, monitor observations, and propose NixOS configuration changes before exhaustion.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bolivian-peru/os-moda/predictive-resources
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 bolivian-peru/os-moda --skill predictive-resources
Clone the repo
git clone --depth 1 https://github.com/bolivian-peru/os-moda

Made for: Claude Code, Codex.

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 predictive-resources

README.md
[![agentmods](https://agentmods.dev/badge/skills/bolivian-peru/os-moda/predictive-resources/github.svg)](https://agentmods.dev/skills/bolivian-peru/os-moda/predictive-resources)
Your own site
<a href="https://agentmods.dev/skills/bolivian-peru/os-moda/predictive-resources"><img src="https://agentmods.dev/badge/skills/bolivian-peru/os-moda/predictive-resources/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 predictive-resources

Your own site · 80×15
<a href="https://agentmods.dev/skills/bolivian-peru/os-moda/predictive-resources"><img src="https://agentmods.dev/badge/skills/bolivian-peru/os-moda/predictive-resources.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 776 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00033 $0.00776
Opus 5 $0.00016 $0.00388
Sonnet 5 $0.00007 $0.00155
Haiku 4.5 $0.00003 $0.00078

Measured 10d ago against content hash 39395461f6d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

predictive-resources 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 10d 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.

skills/predictive-resources/SKILL.md · 105 lines

How it starts

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

Predictive Resource Exhaustion

Don't wait for things to break. Predict when they will and fix proactively.

teachd Trend Data

Before collecting your own data points, check teachd — it has been observing CPU, memory, and services every 30 seconds since boot:

teach_patterns({ type: "trend", min_confidence: 0.3 })
teach_observations({ source: "memory", limit: 100 })

teachd automatically detects monotonic memory increases over 6+ data points. If it has already flagged a trend, use that instead of re-deriving manually.

Disk Growth Analysis

Collect data points over time and project forward:

shell_exec({ command: "df -h --output=target,used,avail,pcent / /var /nix/store /tmp 2>/dev/null || df -h" })

Track in memory — store periodic snapshots:

memory_store({
  summary: "Disk snapshot: / 38% used, /nix/store 12GB",
  detail: "Full df output...",
  category: "system.config",
  tags: "disk,snapshot,predictive"
})

When you have 2+ data points, calculate growth rate:

  • Growth per day = (current_used - previous_used) / days_between
  • Days until 95% = (capacity * 0.95 - current_used) / growth_per_day

Thresholds & Alerts

Metric Warning Critical Action
Disk fills in < 7 days Alert user Auto-clean nix-collect-garbage, logrotate
Memory avg > 80% for 1hr Alert user OOM risk Identify top consumers
Swap usage growing Monitor > 50% used Recommend more RAM or optimize
/nix/store > 30GB Suggest cleanup > 50GB Auto-GC old generations

Remediation (NixOS-native)

Disk: Nix garbage collection

shell_exec({ command: "nix-collect-garbage --delete-older-than 14d" })

Disk: Log rotation via NixOS config

Propose adding to configuration.nix:

services.journald.extraConfig = "SystemMaxUse=500M";

Memory: Identify and advise

shell_exec({ command: "ps aux --sort=-%mem | head -15" })

Don't kill processes without permission. Advise the user.

Read the full file on GitHub · 105 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. 10d ago First seen · 105 lines · 33 tokens per session scan A 39395461f6d8

Subscribe to this mod's changes

predictive-resources is a skill published in the GitHub repository bolivian-peru/os-moda (117 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 33 tokens to every session and 776 once invoked, about $0.0002 per session on Opus 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-30.