instinct-export

A command that exports learned project or personal coding preferences to a YAML file, a readable text format used for configuration and sharing.

In plain words
What is it for?
Use it to export all preferences or filter them by project scope, topic, or confidence level.
Why use it?
It makes these preferences easier to back up, share with teammates, or move to another machine.

Command

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 commands/zhmxiaowo/opencode-simple/instinct-export
Clone the repo
git clone --depth 1 https://github.com/zhmxiaowo/opencode-simple
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 397 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 95% copy Near-identical to another mod 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.00014 $0.00397
Opus 5 $0.00007 $0.00198
Sonnet 5 $0.00003 $0.00079
Haiku 4.5 $0.00001 $0.00040

Measured yesterday against content hash 6153ef42431f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

instinct-export 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.

Origin

This is a copy

95% identical to instinct-export — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.opencode/commands/instinct-export.md · 65 lines

What it actually says

Instinct Export Command

Exports instincts to a shareable format. Perfect for:

  • Sharing with teammates
  • Transferring to a new machine
  • Contributing to project conventions

Usage

/instinct-export                           # Export all personal instincts
/instinct-export --domain testing          # Export only testing instincts
/instinct-export --min-confidence 0.7      # Only export high-confidence instincts
/instinct-export --output team-instincts.yaml
/instinct-export --scope project --output project-instincts.yaml

What to Do

  1. Detect current project context
  2. Load instincts by selected scope:
    • project: current project only
    • global: global only
    • all: project + global merged (default)
  3. Apply filters (--domain, --min-confidence)
  4. Write YAML-style export to file (or stdout if no output path provided)

Output Format

Creates a YAML file:

# Instincts Export
# Generated: 2025-01-22
# Source: personal
# Count: 12 instincts

---
id: prefer-functional-style
trigger: "when writing new functions"
confidence: 0.8
domain: code-style
source: session-observation
scope: project
project_id: a1b2c3d4e5f6
project_name: my-app
---

# Prefer Functional Style

## Action
Use functional patterns over classes.

Flags

  • --domain <name>: Export only specified domain
  • --min-confidence <n>: Minimum confidence threshold
  • --output <file>: Output file path (prints to stdout when omitted)
  • --scope <project|global|all>: Export scope (default: all)
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. yesterday First seen · 65 lines · 14 tokens per session scan A 6153ef42431f

Subscribe to this mod's changes

instinct-export is a command published in the GitHub repository zhmxiaowo/opencode-simple (2 stars, last pushed 5mo ago), licensed MIT. It adds 14 tokens to every session and 397 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to instinct-export, differing in 4 lines, and is treated as a copy.