manan4641

Agentcap — Productivity skill for Claude Code

Productivity community

A hard, real-time dollar cap on Claude Code sessions — so a runaway agent can't burn an unexpected bill.

How to install Agentcap

This entry records only its repository, not the path inside it, so there is no exact command to give. Open manan4641/agentcap and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agentcap does

**A hard, real-time dollar cap on Claude Code sessions — so a runaway agent can't burn an unexpected bill.**

Alternatives in Productivity

  • Tradingview MCP — Real-time crypto & stock screening, advanced technical indicators, Bollinger Bands intelligence, candlestick p 2.6k ★
  • GrokSearch — Integrate Grok's powerful real-time search capabilities into Claude via the MCP protocol 1.8k ★
  • Claude Code Hooks Multi Agent Observability — Real-time monitoring for multi-agent Claude Code sessions via hook event tracking 1.3k ★

README

AgentCap

**A hard, real-time dollar cap on Claude Code sessions — so a runaway agent can't burn an unexpected bill.**

Free for individuals on their own personal work, source-available, and entirely local. No account, no signup, no telemetry, no network calls. Company and team use needs a [commercial licence](#licence).

agentcap run --cap 5.00 -- claude

Warns you at 80% of the cap. Terminates the session at 100%. Logs every session to a local SQLite file you own.


Install

npm install -g @oneclickera/agentcap

Or run it without installing:

npx @oneclickera/agentcap run --cap 5.00 -- claude

Requires Node 20 or newer.

If you get `agentcap: command not found` after installing

This almost always means npm's global bin directory isn't on your shell's `PATH`. It's common with nvm, whose setup usually lives in `.zshrc` — so if your login shell is **bash** (or you have no bash dotfiles), the shell never loads nvm and never sees `agentcap`, `npm`, or even `node`.

Check where npm installed it and whether your shell can see that directory:

npm prefix -g              # npm's global bin lives in /bin
echo $PATH

The most reliable fix is a small launcher in a directory that's always on `PATH`, which calls node by absolute path instead of relying on `#!/usr/bin/env node`:

printf '#!/bin/sh\nexec "%s" "%s" "$@"\n' "$(command -v node)" "$(npm prefix -g)/lib/node_modules/@oneclickera/agentcap/bin/agentcap.js" \
  > /usr/local/bin/agentcap && chmod +x /usr/local/bin/agentcap

AgentCap also resolves the *agent* binary the same way — it checks `~/.local/bin`, `~/bin`, `~/.claude/local`, `/usr/local/bin`, and `/opt/homebrew/bin` before giving up, so `-- claude` keeps working even when Claude Code isn't on your `PATH`.

Usage

# Wrap a normal interactive Claude Code session with a $5 cap
agentcap run --cap 5.00 -- claude

# `claude` is the default, so this is the same thing
agentcap run