instinct-export

A command that exports learned coding habits, called instincts, into a shareable YAML file. YAML is a human-readable format often used for configuration and structured notes.

In plain words
What is it for?
Use it to export all instincts or filter them by topic and confidence, then save the result to a chosen file.
Why use it?
It makes personal project conventions easier to share with teammates, move to another computer, or contribute to project standards, while removing some identifying 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/codelably/harmony-claude-code/instinct-export
Clone the repo
git clone --depth 1 https://github.com/codelably/harmony-claude-code
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 723 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.00022 $0.00723
Opus 5 $0.00011 $0.00362
Sonnet 5 $0.00004 $0.00145
Haiku 4.5 $0.00002 $0.00072

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

commands/instinct-export.md · 92 lines

What it actually says

直觉导出(Instinct Export)命令

将直觉(Instincts)导出为可共享的格式。非常适用于:

  • 与团队成员共享
  • 迁移到新机器
  • 为项目规范(Conventions)贡献内容

用法

/instinct-export                           # 导出所有个人直觉
/instinct-export --domain testing          # 仅导出测试相关的直觉
/instinct-export --min-confidence 0.7      # 仅导出高置信度的直觉
/instinct-export --output team-instincts.yaml

执行流程

  1. ~/.claude/homunculus/instincts/personal/ 读取直觉
  2. 根据标志位(Flags)进行过滤
  3. 脱敏处理(剥离敏感信息):
    • 移除会话 ID(Session IDs)
    • 移除文件路径(仅保留模式匹配符 Pattern)
    • 移除早于“上周”的时间戳
  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

隐私考量

导出内容包括:

  • ✅ 触发模式(Trigger patterns)
  • ✅ 动作(Actions)
  • ✅ 置信度分数(Confidence scores)
  • ✅ 域(Domains)
  • ✅ 观察次数(Observation counts)

导出内容 不包括

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

标志位(Flags)

  • --domain <name>: 仅导出指定的域(Domain)
  • --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 · 92 lines · 22 tokens per session scan A 4534cb21f72c

Subscribe to this mod's changes

instinct-export is a command published in the GitHub repository codelably/harmony-claude-code (42 stars, last pushed 6mo ago), licensed MIT. It adds 22 tokens to every session and 723 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.