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 instructions/magiccloudflash/opencode-skill-hallucination-prevention/agents-mdgit clone --depth 1 https://github.com/magiccloudflash/opencode-skill-hallucination-preventionWhat 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.01143 | $0.01143 |
| Opus 5 | $0.00571 | $0.00571 |
| Sonnet 5 | $0.00229 | $0.00229 |
| Haiku 4.5 | $0.00114 | $0.00114 |
Grade A, and why
opencode-skill-hallucination-prevention 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 yesterday.
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 — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Anti-Hallucination & Security Rules (v3.0 — memory·accuracy·efficiency)
Memory protocol
- After each file edit: re-read to verify
- After 5+ tool calls: re-read all modified files, verify accumulated state
- Before answering about something you saw earlier: re-read the source
- Trust only re-read data. Memory is unreliable.
Reality check — execute before claiming
Any claim about command/test/lint output MUST be backed by actual execution:
- "Tests pass" → run tests, show output
- "Lint is clean" → run lint, show output
- "Error was X" → reproduce, show actual error
- "Fixed it" → re-run, show new output proving fix
Hallucination types × prevention
A-Factual: verify source; B-Structural: ls/glob; C-Behavioral: execute; D-External: check docs; E-Outcome: run tests; F-Temporal: check ver; G-Authority: actually do it; H-Reference: visit URL or "unverified"
Tool rules (no exceptions)
read: verify exists→read→re-read after edit | write: re-read after | edit: read first→match indent→re-read | bash: execute→show output→re-run for fix→ask before destructive | grep/glob: confirm before reference | question: ambiguous→ask
10-point pre-response audit (every answer)
1.Read file? 2.Ran cmd? 3.Verified API? 4.Error real? 5.Re-read edit? 6.Guessing dir? 7.Guessing sig? 8.Fix untested? 9.Fake flags? 10.Fabricated output? If any fail→fix NOW, don't answer until verified.
Context anchoring
Before major ops→re-read relevant files | After 5+calls→re-read modified | Returning to task→re-read ALL relevant
Git/URL (zero tolerance)
No fake commits(git log), msgs(git log --oneline), PR#s, issues, URLs, branches(git branch -a). After commit: git status+git log -1. URLs: visit or "unverified".
Language presets
JS/TS: pkg.json→import | tsconfig→settings | Python: req.txt/pyproject→import | python --version | Rust: Cargo.toml→deps | Go: go.mod | Shell: test first
Core 5
1.Verify→state(read→run→grep→docs) 2.Admit uncertainty("I don't know"/"likely"/"probably") 3.Don't invent(errors/APIs/output/tests) 4.Evidence(file:line+quotes+diffs) 5.Validate(ls→read→check pkg→read config→re-read)
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.
- yesterday First seen · 61 lines · 1,143 tokens per session scan A 4e66f75dc8ee
opencode-skill-hallucination-prevention AGENTS.md is an instructions file published in the GitHub repository magiccloudflash/opencode-skill-hallucination-prevention (2 stars, last pushed 4mo ago), licensed MIT. It adds 1,143 tokens to every session, about $0.0057 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-31.
Other instructions, from other repositories
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.