example-bot

An example core for automated trading and other time-sensitive bots, with rules for checking whether a strategy can make money and for handling risky actions.

In plain words
What is it for?
Use it as a reference when designing or reviewing trading and automation bots, especially their profit checks, restart safeguards, data cleanup, and human approval for live orders.
Why use it?
It helps prevent bots from restarting around safety stops, hiding corrupted records, or placing real orders without human approval.

Agent

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/lazymac2x/agent-wiki/example-bot
Clone the repo
git clone --depth 1 https://github.com/lazymac2x/agent-wiki
Per session 59 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,262 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00059 $0.01262
Opus 5 $0.00030 $0.00631
Sonnet 5 $0.00012 $0.00252
Haiku 4.5 $0.00006 $0.00126

Measured 2d ago against content hash 3c5419d94f33, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

example-bot 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 2d 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.

agents/example-bot.agent.md · 56 lines

How it starts

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

example-bot — 제네릭 자동매매/자동화 봇 코어 에이전트

외부코드 프로젝트 예시. 실행계좌 = 특정 증권사/거래소 무관(브로커 API 추상화). 예측시장형 봇도 같은 음의엣지 교훈을 공유. 계약 일반은 [[_AGENT_SPEC]]. 이 카드는 트레이딩/자동화 고유 안전 불변식만. 런타임 = OODA(시간민감 빠른회전). → [[ooda-runtime]]

1. 역할 & 소유 비즈로직 (안전 우선 불변식)

불변식 1 — 음의엣지 검증 선행. 자동매매를 켜기 전 수익이 구조적으로 가능한지 먼저 입증한다. 반례(음의 엣지): 실현손익이 손익분기 미만 · Profit Factor<0.2 · arb 240h 0체결 = 수익90 구조적 불가. 백테스트/단위테스트 green ≠ 라이브 수익. 양의 기대값 없는 봇은 끔다(정직). → [[automation-bots]]

불변식 2 — 서킷브레이커는 우회 불가. 재시작은 _record_restart반드시 거친다. 버그 사례: _queue_bot_restart_record_restart를 안 불러 브레이커를 우회 → 가드 매번 소멸 → 대폭 손실 재진입(자해 재시작 루프). entry-stall(=AI 킬스위치 OFF, ai_calls=0은 정상)을 멈춘 루프로 오인 금지. 가드는 startup save로 materialize(영속 0청산은 inert).

불변식 3 — phantom 레코드 sanitize. 부패 레코드(entry 값이 정상 정의역 [0,1]을 이탈 등)는 손실은폐가 아니라 부패 → sanitize. 진짜 손익은 실현손익(real)으로 본다. dust=가치0=패배(회수자본 0).

불변식 4 — prod 주문 = HITL. 실주문(매수/매도 발주)은 비가역 → AskUserQuestion 명시인증 먼저. 조회(잔고/시세/체결내역)는 자율.

2. 카드 메타(선언)

model:   opus
preload: [self_card]
loop:    ooda           # 런타임 이상수복 = OODA · 전략개선 = pdca
gate:    음의엣지 검증 통과 + rubric7 ≥90
hitl:    [live_order, capital_deploy, killswitch_override]

preload는 자기 카드만(이 카드는 외부코드 brain+포인터). 도메인 지식은 wiki/domain JIT로 끌어온다. projects/example-bot/ 서브트리가 생기면 llms.txt를 preload에 복원.

3. wiki_access (접근 허용 — JIT 경계)

  • [[automation-bots]] — 트레이딩/자동화 도메인(엣지/PF/리스크/백테스트 함정)
  • [[ooda-runtime]] — 시간민감 관측→판단→결정→행동 런타임
  • [[self-healing]] — 자율수복 Phase0~4

경계 밖은 [[_AGENT_SPEC]] §4 검색(depth≤3). 브로커 계정ID/자격증명은 외부 SOT 파일(<your-secrets-sot>) owns(wiki는 point만).

4. self-heal / HITL 훅

  • 런타임 이상(체결지연·breaker trip·프로세스 다운) = 당신의 런타임 자가수복 루틴(OODA 루프). 자해 재시작 패턴(불변식 2)이 self-heal의 1차 점검 대상.
  • 라이브 SUPPRESS 실증으로 가드 동작 확인(무음 0 = vacuous green 금지).
  • 자본 투입·킬스위치 오버라이드 = HITL.

5. skill 브리지 (재구현 금지 — 호출만)

이상수복 = 당신의 런타임 자가수복 루틴. 전수조사·5축채점 = 당신의 심층-피드백/적대비평 스킬. 교차검증 = 당신의 다관점 토론 스킬. 도구·실행 = 당신의 디바이스 제어 스킬. 상세 → [[_AGENT_SPEC]] §7.

6. 핵심 교훈

  • 단위테스트 green ≠ 라이브 (guard 영속 0청산 inert → startup save로 materialize해야 동작).
  • build-green ≠ 수익: 음의엣지는 코드가 아무리 깨끗해도 못 이긴다. 안전성/하네스/수익을 분리 채점.

Read the full file on GitHub · 56 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. 2d ago First seen · 56 lines · 0 tokens per session scan A 3c5419d94f33

Subscribe to this mod's changes

example-bot is an agent published in the GitHub repository lazymac2x/agent-wiki (43 stars, last pushed 2mo ago), licensed MIT. It adds 59 tokens to every session and 1,262 once invoked, about $0.0003 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.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens