Install
$ agentstack add skill-daviddme-claude-skills-risk-guard ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ● Shell / process execution Used
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
risk-guard
Stateful session tracker. Records every trade, enforces the per-trade risk cap and daily drawdown limit, and acts as a veto gate for bybit-trade.
When to use
- "Initialize my trading session at $500 equity"
- "What's my P&L today?"
- "Am I allowed to risk $30 on this?"
- Called as a subprocess by
bybit-tradebefore every order (not by the user)
How to run
All subcommands accept --state-file PATH (default: ~/.claude/skills/risk-guard/state.json).
# Start a session (overwrites existing state after confirmation)
python risk-guard/guard.py init --equity 500 \
[--per-trade-risk-cap 25] [--daily-drawdown-limit 150]
# Veto gate — exit 0 if allowed, exit 2 if blocked
python risk-guard/guard.py check --risk-usd 25
# Record an opened position (called by bybit-trade after a successful order)
python risk-guard/guard.py open \
--order-link-id clive-SOLUSDT-1719000000000 \
--symbol SOLUSDT --side long \
--qty 11.2 --entry 148.20 --sl 145.97 --tp 151.16 --risk-usd 25
# Close it
python risk-guard/guard.py close \
--order-link-id clive-SOLUSDT-1719000000000 \
--exit 151.16 --realized-pnl 33.15
# Human-readable or JSON status
python risk-guard/guard.py status [--json]
Block conditions (exit 2)
check exits 2 with an explanation in stderr if ANY of:
- state file missing (you must run
initfirst) realized_pnl per_trade_risk_cap(this trade would breach the per-trade cap)
There is no override flag. This is intentional — bybit-trade invokes check as a subprocess and treats any non-zero exit as a hard veto.
Exit codes
- 0 — allowed / success
- 1 — argument error (missing required fields, invalid state)
- 2 — veto (cap or drawdown tripped, or state missing)
State file shape
Human-readable JSON. Open it. Read it. Don't trust.
{
"session_id": "2026-04-22T15:00:00Z",
"started_at": "2026-04-22T15:00:00Z",
"equity_start": 500.0,
"realized_pnl": 0.0,
"per_trade_risk_cap": 25.0,
"daily_drawdown_limit": 150.0,
"trades": [],
"open_positions": []
}
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: daviddme
- Source: daviddme/claude-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.