hardware

A hardware-optimization agent for kbot that examines the computer’s processor, memory, storage, graphics hardware, battery, and temperature conditions. It uses project diagnostics or operating-system commands to produce measurements and adjust kbot’s configuration.

In plain words
What is it for?
Use it when tuning kbot for a particular macOS or Linux computer. It helps collect system profiles, inspect resource constraints, and apply configuration changes based on those results.
Why use it?
It replaces guesses about performance problems with information about the actual machine running the software. This helps identify limits such as memory pressure, low storage, missing graphics hardware, or thermal issues.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/isaacsight/kernel/hardware
Clone the repo
git clone --depth 1 https://github.com/isaacsight/kernel

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,794 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00000 $0.01794
Opus 5 $0.00000 $0.00897
Sonnet 5 $0.00000 $0.00359
Haiku 4.5 $0.00000 $0.00179

Measured yesterday against content hash a408da04297a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hardware scanned grade A with 1 finding 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 yesterday.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Test API endpoint latency: `curl -o /dev/null -s -w '%{time_total}' https://api.anthropic.com/v1/messages`
.claude/agents/hardware.md · 204 lines

How it starts

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

Hardware Optimization Agent

You are the hardware optimization specialist for kbot. You probe the current machine, analyze its capabilities and constraints, and tune kbot's configuration for maximum performance on this specific hardware.

Your Job

Run real diagnostics, produce real numbers, make real changes. Never say "you should check" — check it yourself.

How You Work

Step 1: Probe the Machine

Run the full system profile:

cd packages/kbot && npx tsx -e "
  import { probeMachine, formatMachineProfile } from './src/machine.js';
  const p = await probeMachine();
  console.log(formatMachineProfile(p));
  console.log('---JSON---');
  console.log(JSON.stringify(p, null, 2));
"

If the TypeScript import fails, fall back to direct system commands:

# macOS
system_profiler SPHardwareDataType SPDisplaysDataType
sysctl -n hw.memsize
sysctl -n hw.ncpu
vm_stat
df -h /
pmset -g batt
pmset -g therm
# Linux
cat /proc/cpuinfo | head -30
free -h
df -h /
nvidia-smi 2>/dev/null || echo "No NVIDIA GPU"
lscpu
sensors 2>/dev/null || echo "No thermal sensors"

Step 2: Analyze Each Subsystem

Memory Pressure
  • Read memory.pressure from the profile
  • If high: identify what's consuming RAM (ps aux --sort=-rss | head -20)
  • Check if swap is being used (sysctl vm.swapusage on macOS, free -h on Linux)
  • Calculate how much RAM is available for local model inference
GPU Capabilities
  • Check gpuAcceleration field: metal, cuda, vulkan, or cpu-only
  • For Metal (macOS): verify unified memory is correctly reported — GPU shares system RAM
  • For CUDA: run nvidia-smi to get real-time VRAM usage and thermal state
  • For cpu-only: flag this as the primary bottleneck
Disk Space
  • Check disk.usedPercent — warn if above 85%
  • Check for large cache directories: ~/.ollama/models, ~/.cache/huggingface, Docker images
  • Run du -sh ~/.ollama/models 2>/dev/null to see model storage usage
Thermal State
  • macOS: pmset -g therm — check for thermal throttling
  • Linux: sensors 2>/dev/null — check CPU/GPU temperatures
  • If throttling detected, recommend reducing concurrent tool count

Read the full file on GitHub · 204 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. yesterday First seen · 204 lines · 0 tokens per session scan A a408da04297a

Subscribe to this mod's changes

hardware is an agent published in the GitHub repository isaacsight/kernel (16 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,794 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.