plugins/tools/cortex/skills/cortex-recall/SKILL.md
--- name: cortex-recall description: 记忆渐进披露召回 — 按 query 跨 L0-L3 检索, 仅返 brief + 子节点 (非全量)。触发: "记得" / "recall" / "想想" / 用户提问需历史上下文时自动触发。 disable-model-invocation: false allowed-tools: Read Glob mcp__obsidian__obsidian_simple_search mcp__obsidian__obsidian_get_file_contents --- # cortex-recall 按查询渐进披露召回相关记忆。默认只返父节点 brief + 子目录索引, 避免上下文爆炸。 ## 触发场景 - 用户提问命中 `recall_when` 关键词 (自动) - 显式 "想想之前的..." / "recall X" / "记得 X" - 其他 skill (cortex-search, cortex-reflect) 内部召回 ## 输入 - query: 自然语言或关键词 - top_k:
npx skillsauth add lazygophers/ccplugin plugins/tools/cortex/skills/cortex-recallInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
按查询渐进披露召回相关记忆。默认只返父节点 brief + 子目录索引, 避免上下文爆炸。
recall_when 关键词 (自动)[L0, L1, L2, L3] (L4 默认排除, 显式 --include-l4 才进)_meta/memory-policy.yaml 拿 recall.defaultmcp__obsidian__obsidian_simple_search query → 命中条目路径recall_when 字段模糊匹配 queryrecall_count += 1last_recalled = now (UTC ISO)[recall: "Go 并发"] top 3 hits
1. L2://semantic/go/goroutine (weight 0.7, recalled 12x)
brief: Go 并发用 goroutine + channel, GMP 调度模型
ref: 知识库/领域/技术/编程语言/Go/goroutine.md
parents: [L1://procedural/go-concurrency]
children: [L3://episodic/2026-05-12/T1430]
2. L1://procedural/go-concurrency (weight 0.9, recalled 32x)
brief: Go 并发模式 — goroutine + channel + select + context.Cancel
children: [L2://semantic/go/goroutine, L2://semantic/go/channel]
3. ...
(use --full to expand body, --include-l4 to include ledger/sessions)
默认召回 L0+L1+L2+L3 (排 L4)。按 weight 排序。
--include-l4 才返[AUTO_MODE: ...] 下行为不变 (recall 本就纯读 + 自动 update count)。仅在显式 --full 时返回完整内容, AUTO_MODE 不自动加 --full。
当 prompt 含 [AUTO_MODE] (来自 ~/.cortex/scripts/recall.sh):
--full, 默认返回摘要development
Go 数据库规范——GORM Model 命名 ModelXxx、表名单数、枚举 uint8 + 常量、索引 idx_ 前缀 + deleted_at leading column、禁 time.Time 统一 int64 unix、禁指针/nullable 字段、TEXT/BLOB/JSON 禁 default、AutoMigrate 禁改主键。设计 DB model、写 GORM tag、建索引、做 migration 审查时触发。
development
Go HTTP API 规范——响应始终 200 + body code 字段、路由 /api/* 全 POST 单段 <Action><Model>、中间件逐路由注册禁 Group(prefix,mw...)、handler 仅返回 (rsp,error)、认证走 header。设计 HTTP API、写路由/handler/中间件时触发。
development
Go 项目结构规范——三层架构(API → Impl → State)、全局状态模式、internal/ 私有包、cmd/ 仅 main.go、go.work 多模块、禁止 Repository 接口和 DI 容器、struct 公共字段开头全 omitempty、handler var rsp 顶声明、禁 legacy migration。设计项目骨架、新建目录、组织包、做架构评审时触发。
development
Go 命名规范——Id/Uid 字段(非 ID)、IsActive/HasMFA 布尔前缀、CreatedAt 时间字段、接收者统一用 p、包名全小写无下划线、泛型类型参数描述性命名、集合字段 xxx_list 禁 xxxs 复数、Enum 0 值 XxxNil 禁 Unknown、禁 Status 统一 State、Set/Update 语义区分。定义结构体字段、函数、变量、包、接收者名、泛型、枚举时触发。