opencode-knowledge-convention

opencode-knowledge-convention is a skill for Claude Code, Codex from humanerd-drew/opencode-drewgent. It costs 0 tokens per session (623 once invoked), scanned A, original, MIT.

A convention for managing persistent knowledge when an OpenCode knowledge plugin provides tools such as remember(), recall(), and memory-stats(). It defines when to retrieve context, save decisions, and avoid storing secrets.

In plain words
What is it for?
Use it to recall recent context at the start of a session, save explicit decisions and recurring preferences, check saved memory at session end, and handle knowledge stored in the plugin’s database.
Why use it?
It helps the agent retain useful decisions and preferences across sessions without saving passwords, tokens, or other sensitive information.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit Use it to recall recent context at the start of a session, save explicit decisions and recurring preferences, check saved memory at session end, and handle knowledge stored in the plugin’s database.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/humanerd-drew/opencode-drewgent/opencode-knowledge-convention
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.

Any agent
npx skills add humanerd-drew/opencode-drewgent --skill opencode-knowledge-convention
Clone the repo
git clone --depth 1 https://github.com/humanerd-drew/opencode-drewgent

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for opencode-knowledge-convention

README.md
[![agentmods](https://agentmods.dev/badge/skills/humanerd-drew/opencode-drewgent/opencode-knowledge-convention/github.svg)](https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/opencode-knowledge-convention)
Your own site
<a href="https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/opencode-knowledge-convention"><img src="https://agentmods.dev/badge/skills/humanerd-drew/opencode-drewgent/opencode-knowledge-convention/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for opencode-knowledge-convention

Your own site · 80×15
<a href="https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/opencode-knowledge-convention"><img src="https://agentmods.dev/badge/skills/humanerd-drew/opencode-drewgent/opencode-knowledge-convention.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 623 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00623
Opus 5.5 $0.00000 $0.00249
Sonnet 5.5 $0.00000 $0.00125
Haiku 4.5 $0.00000 $0.00062

Measured 3mo ago against content hash a962cfaf8a8f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

opencode-knowledge-convention 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 3mo 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.

skills/brain/opencode-knowledge-convention/SKILL.md · 67 lines

What it actually says

Knowledge Management Convention

이 convention은 @{{AGENT_NAME_LOWER}}/opencode-knowledge 플러그인 설치 시 적용된다. remember(), recall(), memory-stats() 툴이 제공될 때 반드시 따라야 할 규칙.

Rules (Tier 1 — Autonomous)

R1: 세션 시작 시 자동 recall

세션 시작 직후, 무조건 recall("recent decisions|active context") 호출
결과가 있으면 system context에 통합하여 응답 품질 향상

R2: 과거 맥락 언급 시 즉시 검색

사용자가 "저번에", "아까", "전에", "그때", "예전에" 등 과거 맥락 언급
→ 지체 없이 recall() 호출 후 응답

R3: 결정/선호/패턴 발견 시 즉시 저장

다음 패턴 발견 시 remember()로 즉시 저장:
- 명시적 결정 ("이걸로 하자", "X 선택")
- 사용자 선호 ("나는 Y 방식이 좋아")
- 반복 작업 패턴 ("이건 항상 Z로 해결")
- 아키텍처 결정 ("이유 때문에 X 선택")
- 금지/규칙 ("절대 하지마")

R4: 세션 종료 시 저장 확인

세션이 자연스럽게 종료될 때:
- memory-stats() 호출
- 오늘 저장된 사실이 0이면, 놓친 게 없는지 확인

R5: Secrets 절대 저장 금지

API key, 토큰, 비밀번호, 개인정보는 절대 remember()로 저장하지 않음
→ vault_cli가 canonical path
→ 실수로 들어갔으면 즉시 remove (수동)

Storage

  • 파일 위치: ~/.{{AGENT_NAME_LOWER}}/.opencode/knowledge.db
  • 엔진: SQLite + FTS5 (built-in full-text search)
  • FTS5 기능: stemming, ranking, phrase matching, boolean operators
  • types: fact, decision, preference, pattern, session
  • 세션 저장: sessions 테이블 (id, title, message_count)
  • 보안: 평문. secrets 저장 금지.

의존성

  • opencode 1.17.10+
  • tools/ 디렉토리 자동 발견 기능
  • 별도 서버/DB/API key 불필요
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. 3mo ago First seen · 67 lines · 0 tokens per session scan A a962cfaf8a8f

Subscribe to this mod's changes

opencode-knowledge-convention is a skill published in the GitHub repository humanerd-drew/opencode-drewgent (3 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 623 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.

Related

opencode-knowledge-convention compared with skills from other repositories

opencode-knowledge-convention next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
opencode-knowledge-conventionhumanerd-drew/opencode-drewgentSkill34mo agoMITA0Claude Code, Codex
knowledge-ingestopenclaw/openclawSkill396ktodayMITA80Claude Code, Codex
forgetasgeirtj/system_prompts_leaksSkill74ktodayCC0-1.0A0Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill70k7d agoApache-2.0A217Claude Code, Codex
Cortexdanielmiessler/LifeOSSkill21k16d agoMITA184Claude Code
ha-data-storesshiwenwen/hope-agentSkill1.9kyesterdayMITA115Claude Code, Codex
memoryopensquilla/opensquillaSkill7.2k8d agoApache-2.0A44Claude Code, Codex