instinct-export

A command that exports learned coding habits and patterns into a shareable YAML file, with filters for areas such as testing or confidence.

In plain words
What is it for?
Use it to export all learned patterns or only selected ones by topic, confidence level, or output file.
Why use it?
It makes personal lessons easier to move between machines, share with teammates, or turn into project conventions while removing some sensitive details.

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/luohaothu/everything-codex/instinct-export
Clone the repo
git clone --depth 1 https://github.com/Luohaothu/everything-codex
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 640 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.00015 $0.00640
Opus 5 $0.00008 $0.00320
Sonnet 5 $0.00003 $0.00128
Haiku 4.5 $0.00002 $0.00064

Measured 2d ago against content hash 36044490b45c, 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 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.

docs/zh-CN/commands/instinct-export.md · 95 lines

What it actually says

本能导出命令

将本能导出为可共享的格式。非常适合:

  • 与团队成员分享
  • 转移到新机器
  • 贡献给项目约定

用法

/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

操作步骤

  1. ~/.claude/homunculus/instincts/personal/ 读取本能
  2. 根据标志进行筛选
  3. 剥离敏感信息:
    • 移除会话 ID
    • 移除文件路径(仅保留模式)
    • 移除早于“上周”的时间戳
  4. 生成导出文件

输出格式

创建一个 YAML 文件:

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

version: "2.0"
exported_by: "continuous-learning-v2"
export_date: "2025-01-22T10:30:00Z"

instincts:
  - id: prefer-functional-style
    trigger: "when writing new functions"
    action: "Use functional patterns over classes"
    confidence: 0.8
    domain: code-style
    observations: 8

  - id: test-first-workflow
    trigger: "when adding new functionality"
    action: "Write test first, then implementation"
    confidence: 0.9
    domain: testing
    observations: 12

  - id: grep-before-edit
    trigger: "when modifying code"
    action: "Search with Grep, confirm with Read, then Edit"
    confidence: 0.7
    domain: workflow
    observations: 6

隐私考虑

导出内容包括:

  • ✅ 触发模式
  • ✅ 操作
  • ✅ 置信度分数
  • ✅ 领域
  • ✅ 观察计数

导出内容不包括:

  • ❌ 实际代码片段
  • ❌ 文件路径
  • ❌ 会话记录
  • ❌ 个人标识符

标志

  • --domain <name>:仅导出指定领域
  • --min-confidence <n>:最低置信度阈值(默认:0.3)
  • --output <file>:输出文件路径(默认:instincts-export-YYYYMMDD.yaml)
  • --format <yaml|json|md>:输出格式(默认:yaml)
  • --include-evidence:包含证据文本(默认:排除)
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 · 95 lines · 15 tokens per session scan A 36044490b45c

Subscribe to this mod's changes

instinct-export is a command published in the GitHub repository Luohaothu/everything-codex (24 stars, last pushed 21d ago), licensed MIT. It adds 15 tokens to every session and 640 once invoked, about $0.0001 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.