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 agentmods add commands/joncovington/meicagent/set-risk-profilegit clone --depth 1 https://github.com/joncovington/MEICAgentWrote 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/commands/joncovington/meicagent/set-risk-profile)<a href="https://agentmods.dev/commands/joncovington/meicagent/set-risk-profile"><img src="https://agentmods.dev/badge/commands/joncovington/meicagent/set-risk-profile.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.01145 |
| Opus 5 | $0.00000 | $0.00573 |
| Sonnet 5 | $0.00000 | $0.00229 |
| Haiku 4.5 | $0.00000 | $0.00114 |
Grade A, and why
set-risk-profile 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 4d 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 — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Switch to a named risk profile (conservative/moderate/aggressive/very-aggressive), automatically backing up and updating config.json.
Overview
Risk profiles bundle entry-gate thresholds with offsetting position-cap and stop-management constraints. Running /set-risk-profile moderate (for example) reads the named profile from config.risk.json, backs up your current config.json, overwrites the relevant keys, and reports what changed — without restarting the loop. The new settings take effect on the next iteration.
See docs/risk-profiles.md for the full rationale, trade-offs, and when to use each profile.
Step 1 — Check valid profile names
List available profiles:
python -c "import json; cfg = json.load(open('config.risk.json')); print('Available profiles:', ', '.join(cfg['profiles'].keys())); print('Current active profile:', cfg['active_profile'])"
Expected output:
Available profiles: conservative, moderate, aggressive, very-aggressive
Current active profile: conservative
If you get an error, check that config.risk.json exists in the project root and is valid JSON.
Step 2 — Back up current config
Before making any changes, your current config.json is automatically backed up to config.json.bak:
copy config.json config.json.bak
(This happens automatically in Step 3's Python script; shown here for transparency.)
Step 3 — Apply the profile
Replace <profile_name> with one of: conservative, moderate, aggressive, or very-aggressive.
import json
import shutil
from pathlib import Path
# Load profiles and current config
with open('config.risk.json') as f:
risk_profiles = json.load(f)
profile_name = '<profile_name>' # e.g., 'moderate'
if profile_name not in risk_profiles['profiles']:
print(f"ERROR: Profile '{profile_name}' not found.")
print(f"Valid profiles: {', '.join(risk_profiles['profiles'].keys())}")
exit(1)
profile = risk_profiles['profiles'][profile_name]
profile_note = profile.pop('_note', '(no description)')
# Back up current config
shutil.copy('config.json', 'config.json.bak')
print(f"✓ Backed up current config.json → config.json.bak")
# Load current config
with open('config.json') as f:
current_config = json.load(f)
# Track changes for reporting
changes = {}
for key, value in profile.items():
if key in current_config and current_config[key] != value:
old_val = current_config[key]
changes[key] = (old_val, value)
current_config[key] = value
# Write updated config back
with open('config.json', 'w') as f:
json.dump(current_config, f, indent=2)
# Update active_profile in config.risk.json
risk_profiles['active_profile'] = profile_name
with open('config.risk.json', 'w') as f:
json.dump(risk_profiles, f, indent=2)
print(f"\n✓ Applied profile: {profile_name}")
print(f"\nProfile description:\n {profile_note}\n")
if changes:
print("Keys changed:")
print("\n| Key | Old Value | New Value |")
print("|---|---|---|")
for key, (old, new) in sorted(changes.items()):
print(f"| `{key}` | {old} | {new} |")
else:
print("(No keys changed — already at this profile.)")
print(f"\n✓ Next loop iteration will pick up the new settings (no restart needed).")
print(f"✓ To revert, run: /set-risk-profile conservative")
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.
- 4d ago First seen · 138 lines · 0 tokens per session scan A f7ea6ff60ae0
set-risk-profile is a command published in the GitHub repository joncovington/MEICAgent (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,145 tokens. 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.
Other commands, from other repositories
scan
Universal scan — auto-detects asset class (stock / crypto / index / FX / commodity) and runs the matching protocol. With no args, regenerates scanned/INDEX.md.
scan-flow
Partial scan — refresh ONLY the asset-class flow & positioning section of an existing current.md (Flow & Squeeze for stocks, Crypto/Index/FX/Commodity Flow for non-stocks). Does not re-run charts, 6-pillar, or earnings.
rescan
Refresh existing scan, rotating prior snapshot to archive/. Args: or "macro.
scan-earnings
Earnings setup analysis for ticker. 8-point checklist + pre-print read.
discover
Run a Finviz screener aligned with the framework + current macro regime. Saves a dated candidate list to scanned/SCREENS/.
scan-fundamentals
6-pillar fundamental scorecard for ticker. Updates fundamentals section in scanned/stocks/ /current.md.