clawock AGENTS.md

Workspace instructions for an OpenClaw project, covering required context files, communication preferences, investment research rules, and Git safeguards.

In plain words
What is it for?
Setting up a clone, preparing sessions, checking investment-related work, and enforcing automatic commit validation.
Why use it?
They make each session use the right personal context and help prevent invalid data, unsafe commits, or leaked credentials.

Instructions file for CodexOpenCode

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 instructions/kcnyu/clawock/agents-md
Clone the repo
git clone --depth 1 https://github.com/KCNyu/clawock

Made for: Codex, OpenCode.

Per session 2,140 This file is loaded in full into every session.
When invoked 2,140 The same file — it is already loaded in full.
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.02140 $0.02140
Opus 5 $0.01070 $0.01070
Sonnet 5 $0.00428 $0.00428
Haiku 4.5 $0.00214 $0.00214

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

Security

Grade A, and why

clawock AGENTS.md 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 3d 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.md · 154 lines

How it starts

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

AGENTS.md - Your Workspace

This folder is home.

Every Session

Before doing anything else:

  1. Read SOUL.md — who you are
  2. Read USER.md — who you're helping
  3. If in MAIN SESSION (direct chat with kcn): Also read MEMORY.md + TOOLS.md
  4. If the question is investment-related: also read INVESTMENT_SOP.md and route per the skill table below

Don't ask permission. Just do it.

kcn 偏好

详见 USER.md § 沟通偏好 + § 不要做的事。要点:表格、不 hedging、数据缺口必说、terse 风格、14:00 HKT 也盘中查。

Git hook (one-time setup per clone)

git config core.hooksPath .githooks

.githooks/pre-commit enforces on every commit (openclaw cron / GH Action / manual):

  • portfolio.json valid JSON + required structure
  • memory/*-plan.json schema (bucket enum, trigger_type enum, confidence ∈ [0,1])
  • the dashboard write set rebuilds when portfolio.json is staged, but is no longer staged with it: since #319 those four payloads live on the data-plane branch and git add on a now-ignored path fails the commit rather than skipping
  • paranoid scan for leaked API keys (sk-…, tp-…, FINNHUB_API_KEY=, etc.)

Override with --no-verify if false positive (rare).

Git Auto-Commit Rules

The workspace is a local git repo. origin is the public repo github.com/KCNyu/clawock — the contents (positions, plans, memory logs) are intentionally public per kcn's instruction. This table governs the live runtime workspace and its scheduled writers. Interactive Codex/Claude code changes follow the PR workflow in the next section. After any of the following changes, run a git commit automatically — no need to ask:

Change Commit
portfolio.json updated (price refresh / buy / sell) portfolio: <brief>
Harness produced new memory/{date}-pre-open.md + -plan.json memory: daily deep brief <date> (postflight auto-commits)
KCNyu harness/publisher refreshed dashboard outputs publish the complete semantic generation through the data plane; do not stage individual generated files ad hoc
assets/data/risk.json refreshed via clawock portfolio-risk bundled with brief commit
memory/decisions.jsonl execution status marked via clawock mark-followed decisions: mark execution
Package, profile or ops/ code changed refactor:/fix:/feat: <what changed> (via PR, never direct)
Workspace docs changed (SOUL/AGENTS/TOOLS/USER/CLAUDE/README) docs: <what changed>

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

Subscribe to this mod's changes

clawock AGENTS.md is an instructions file published in the GitHub repository KCNyu/clawock (14 stars, last pushed 3d ago), licensed MIT. It adds 2,140 tokens to every session, about $0.0107 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 instructions, from other repositories