Imports instincts from YAML files, GitHub URLs, or skill creator repos into Claude homunculus storage, resolving duplicates/conflicts via confidence-based merging.
How this command is triggered — by the user, by Claude, or both
Slash command
/everything-claude-code:instinct-importThe summary Claude sees in its command listing — used to decide when to auto-load this command
# 直觉导入命令(Instinct Import Command) ## 实现 使用插件根路径运行直觉 CLI: 如果未设置 `CLAUDE_PLUGIN_ROOT`(手动安装): 可以从以下来源导入直觉: - 团队成员的导出文件 - 技能创建者(Skill Creator)(仓库分析) - 社区集合 - 以前的机器备份 ## 用法 ## 核心流程 1. 获取直觉文件(本地路径或 URL) 2. 解析并验证格式 3. 检查与现有直觉是否重复 4. 合并或添加新直觉 5. 保存至 `~/.claude/homunculus/instincts/inherited/` ## 导入过程示例 ## 合并策略(Merge Strategies) ### 处理重复项 当导入的直觉与现有直觉匹配时: - **高置信度优先**:保留置信度较高的版本 - **合并证据**:合并观察计数(observation counts) - **更新时间戳**:标记为最近已验证 ### 处理冲突 当导入的直觉与现有直觉相矛盾时: - **默认跳过**:不导入冲突的直觉 - **标记待评审**:将两者都标记为需要关注 - **手动解决**:由用户决定保留哪一个 ## 来源追踪 导入的直觉会带有以下标记: ## 技能创建者(Skill Creator)集成 从技...
使用插件根路径运行直觉 CLI:
python3 "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/scripts/instinct-cli.py" import <file-or-url> [--dry-run] [--force] [--min-confidence 0.7]
如果未设置 CLAUDE_PLUGIN_ROOT(手动安装):
python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py import <file-or-url>
可以从以下来源导入直觉:
/instinct-import team-instincts.yaml
/instinct-import https://github.com/org/repo/instincts.yaml
/instinct-import --from-skill-creator acme/webapp
~/.claude/homunculus/instincts/inherited/📥 正在从以下路径导入直觉:team-instincts.yaml
================================================
发现 12 条待导入的直觉。
正在分析冲突...
## 新直觉 (8)
以下内容将被添加:
✓ use-zod-validation (置信度: 0.7)
✓ prefer-named-exports (置信度: 0.65)
✓ test-async-functions (置信度: 0.8)
...
## 重复直觉 (3)
已存在类似的直觉:
⚠️ prefer-functional-style
本地: 0.8 置信度, 12 次观察
导入: 0.7 置信度
→ 保留本地版本(置信度更高)
⚠️ test-first-workflow
本地: 0.75 置信度
导入: 0.9 置信度
→ 更新为导入版本(置信度更高)
## 冲突直觉 (1)
这些直觉与本地直觉冲突:
❌ use-classes-for-services
冲突项:avoid-classes
→ 跳过(需要手动解决)
---
导入 8 条新直觉,更新 1 条,跳过 3 条?
当导入的直觉与现有直觉匹配时:
当导入的直觉与现有直觉相矛盾时:
导入的直觉会带有以下标记:
source: "inherited"
imported_from: "team-instincts.yaml"
imported_at: "2025-01-22T10:30:00Z"
original_source: "session-observation" # 或 "repo-analysis"
从技能创建者导入时:
/instinct-import --from-skill-creator acme/webapp
这将获取通过仓库分析生成的直觉:
repo-analysis--dry-run:预览而不执行导入--force:即使存在冲突也执行导入--merge-strategy <higher|local|import>:如何处理重复项--from-skill-creator <owner/repo>:从技能创建者分析中导入--min-confidence <n>:仅导入高于阈值的直觉导入完成后:
✅ 导入完成!
添加:8 条直觉
更新:1 条直觉
跳过:3 条直觉 (2 条重复,1 条冲突)
新直觉已保存至:~/.claude/homunculus/instincts/inherited/
运行 /instinct-status 以查看所有直觉。
npx claudepluginhub codelably/harmony-claude-code/instinct-importImports coding instincts from files, URLs, teammates, Skill Creator repos, or backups. Previews new/duplicate/conflicting instincts by confidence, merges/updates/skips, and saves to inherited directory.
/instinct-importImports instincts from local file or HTTP(S) URL into project or global scope. Previews changes, resolves duplicates by confidence, prompts for confirmation unless --force. Supports --dry-run, --min-confidence, --scope flags.
/instinct-importImports a YAML instinct pack, merging its rules into the local instinct engine with confidence-gated conflict resolution.
/instinct-promotePromotes an instinct file from project scope to global scope at ~/.claude/.bot/learned-skills/, annotating promoted_from and promoted_at in the frontmatter.
/instinct-importImports instincts from a JSON file, merging with existing instincts while maintaining confidence scores and deduplicating similar patterns.
/instinct-importImports instincts from local file or HTTP(S) URL into project or global scope. Previews changes, resolves duplicates by confidence, prompts for confirmation unless --force. Supports --dry-run, --min-confidence, --scope flags.