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.
npx skills add TashanGKD/cognitive-os --skill cognitive-askgit clone --depth 1 https://github.com/TashanGKD/cognitive-osWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tashangkd/cognitive-os/cognitive-ask)<a href="https://agentmods.dev/skills/tashangkd/cognitive-os/cognitive-ask"><img src="https://agentmods.dev/badge/skills/tashangkd/cognitive-os/cognitive-ask/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/tashangkd/cognitive-os/cognitive-ask"><img src="https://agentmods.dev/badge/skills/tashangkd/cognitive-os/cognitive-ask.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00102 | $0.05421 |
| Opus 5 | $0.00051 | $0.02710 |
| Sonnet 5 | $0.00020 | $0.01084 |
| Haiku 4.5 | $0.00010 | $0.00542 |
Grade A, and why
cognitive-ask 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 8d 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.
This is a copy
91% identical to cognitive-ask — 10 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.
How it starts
The opening of the file, as written. The whole thing — 341 lines — stays where its author put it; the contents beside it link to each section on GitHub.
认知问答 Skill(Cognitive Ask)
严格基于用户自己的认知文档(L0/L1/L1.5/L2)回答问题。 铁律:不引入外部观点,不补充用户没有说过的内容,只用用户自己的文字和思考。
知识导航表(执行前必须理解的概念根)
| 层级 | 文档 | 需要理解的概念 |
|---|---|---|
| D0 认知根(必读) | cognitive/L0_brain_map.md |
整个K-object体系的入口索引:各L1文档的主题/位置/版本;扫描找相关K-objects |
| D3 规范参考 | .cursor/rules/knowledge-integrity-rules.mdc(R2 NO_FABRICATION + R3 READ_FIRST) |
R2:不引入用户文档中没有的观点;R3:先读相关文档再回答,不凭印象 |
| D4 运行时数据 | L0_大脑总地图.md + 根据问题确定的相关L1/L1.5/L2文档 |
先扫描L0找相关文档,再读相关文档后回答 |
核心概念速查: ① 只用用户自己的K-objects回答 = 禁止引入外部观点,禁止补充用户没有写过的内容 ② 引用必须说明来源:「在[文档名]§[章节]中提到…」——让用户能验证 ③ 知识空白 = 相关K-objects中找不到内容时,明确说「您的文档中未提及」,不自行推断
这个 Skill 解决的问题
用户在多处文档、多次对话中积累了大量思考,但:
- 某个话题在多个文档里都有提及,散落各处
- 不记得自己对某个问题的完整立场是什么
- 想知道自己的某个想法在整个思维体系里处于哪个位置
- 不确定自己是否已经想清楚了某个问题
激活后立即执行
Step 0 工作区路径探测(v2 Agent 兼容层)
认知库有两种可能的路径布局:
尝试读取:`docs/L0/大脑总地图.md`
IF 成功 → **v2 模式**:L0=docs/L0/ | L1=docs/L1/ | L1.5=docs/L1_5/ | L2=docs/L2/
ELSE 尝试:`cognitive/L0_brain_map.md`
IF 成功 → **Cursor 模式**:使用 cognitive/ 前缀(原路径不变)
IF 都失败 → 告知用户认知库路径未初始化,停止
确定路径模式后,所有后续步骤中路径自动替换。
下文中 [CL0] / [CL1] / [CL1.5] / [CL2] 分别代表对应层的实际路径前缀。
Step 1 理解问题
→ 用户的问题是什么?核心概念是什么?
→ 如果问题不清晰,追问一个最关键的问题(一次只问一个)
→ 明确问题后继续
Step 2 搜索文档(分层检索,从顶层到底层)
[Layer 1] L1.5 底层原则层(最先检索)
Read: [CL1.5]/底层原则库.md
→ 这个问题是否直接触及某个已确认原则(P1/P2等)?
→ 如果是,记录:「原则层有直接答案」
[Layer 2] L1 系统性文档(必须先读 L0,再系统覆盖相关聚类)
Step 2a:Read [CL0]/大脑总地图.md
→ 从 L0 提取所有聚类列表和已登记的 L1 文档名
Step 2a.5:全量文档索引(防止 L0 过时导致遗漏)
⚠️ L0 可能不包含最近新建的文档——必须执行本步骤补全。
执行 list_files([CL1]) 或等效的文件系统扫描
→ 获得 L1 目录下所有 .md 文件的完整列表
→ 与 Step 2a 从 L0 中提取的列表做 diff
→ 若发现「L0 未登记的文档」:加入待检索列表,标注「L0 未登记,来自文件系统扫描」
→ 记录:「L0 登记 N 篇,文件系统实际 M 篇,差异 K 篇」
→ 判断「问题是全局性问题还是聚焦性问题」:
【全局性问题判断标准】满足以下任一条件,即为全局性:
· 问题中包含「整体」「核心」「本质」「全部」「所有」「系统」「体系」
· 问题是「X是什么」「X有哪些观点」「X的关键是什么」形式
· 问题话题是一个跨文档的高层概念(无法被单个文档完整回答)
→ 全局性问题:**必须覆盖所有聚类(含 L0 未登记的),无例外**
【聚焦性问题】:用户明确指定了单一文档/聚类(如「[B]文档里说了什么」)
→ 聚焦性问题:可以限定在指定范围内
Step 2b:分两步读取每个 L1 文档(先结构,后内容)
对每个「待检索聚类」中的文档,执行以下两步:
**Step 2b-①(结构扫描,必须先做)**
Read 该文档的前 80 行(涵盖摘要 + 全部章节标题)
→ 提取所有 ## / ### 章节标题,构建「章节目录」
→ 根据用户问题的关键词,标记「高相关章节」(显式理由)
→ ⚠️ 不允许「凭直觉」跳过某个聚类——必须给出明确的跳过原因
**Step 2b-②(定向读取,基于 ① 的结论)**
只读被标记的「高相关章节」(不是整篇)
IF 文档整体相关性高(全局性问题 + 核心文档)→ 读全文
→ 记录:找到了哪些相关内容,在哪里,来自哪个聚类
Step 2c:知识图谱邻域扫描 + BM25 兜底(双轨并行)
**轨道 A:知识图谱邻域扫描**(优先,精度高)
认知科学依据:扩散激活(Collins & Loftus, 1975)——激活一个概念节点后,
激活沿关系边向邻近节点传播(priming effect)
Read: [CL0]/知识图谱_正式文档.md(或 cognitive/knowledge_graph.md)
→ 找到 Step 2b 中已确定的「主要相关L1文档」在图谱中的节点
→ 获取该节点的全部关系边(出边+入边)
→ 按关系强度排序:depends(1.0) > extends(0.9) > cross_ref(0.7) > references(0.5)
→ 选取权重 ≥ 0.7 的邻居节点(Top-5,排除已在 Step 2b 读过的)
IF 邻居节点与当前问题高度相关(主题相似):
→ Read 该邻居文档的相关章节(每个最多读 300 字)
→ 记录:「从图谱邻域发现补充内容,来自 [文档名]([关系类型] 关系)」
**轨道 B:BM25 关键词兜底**(知识图谱缺失时,或作为补充验证)
触发条件:知识图谱文件不存在 OR 图谱中已读文档的关系边 < 3 条(稀疏图谱)
提取用户问题的关键词(中文字 + 英文词)
对 Step 2a.5 中 L0 未登记但存在于文件系统的文档:
→ 读取各文档前 200 字(标题+摘要),计算关键词命中数
→ 命中 ≥ 2 个关键词的文档:加入待检索列表,执行 Step 2b 两步读取
→ 记录:「BM25 兜底发现补充文档 [文档名],命中词:[词列表]」
⚠️ 约束:
- Step 2c 是「补充」步骤,不是「替代」Step 2b 的步骤
- 两轨道合计最多新增 3-5 个文档,避免检索范围无限扩展
- 图谱文件不可读时轨道A静默跳过,但轨道B必须执行
[Layer 3] L2 碎片层(以下两种情况必须执行,不允许跳过)
强制触发条件(满足任一即必须读 L2):
① L2 碎片整合索引中,有「🔲 待整合」碎片的关联L1文档与本问题相关
② 问题是全局性问题(已在 Step 2a 判断为全局性时,必须读 L2 补充 L1 之外的洞见)
⚠️ 不允许以「L1 已有足够内容」为理由跳过 L2 检索——L2 碎片常包含尚未整合进 L1 的新洞见
Read: cognitive/L2_fragments/fragment_index.md
→ 搜索所有「🔲 待整合」碎片,找出与问题相关的条目
→ Read 相关碎片的内容
→ 标注:L2碎片的确认程度(confirmed / tentative / uncertain)
→ 在回答中注明:「以下来自 L2 碎片,尚未整合进 L1」
Step 3 综合分析
整理找到的所有相关内容,判断:
① 「清晰明确」:某文档/碎片有直接、完整的答案
② 「需要综合」:答案散落在多处,需要拼合
③ 「有矛盾」:不同文档/碎片对这个问题给出了有张力的答案
④ 「有空白」:文档只涉及了部分,有明显没有覆盖到的角度
⑤ 「完全空白」:认知库中没有覆盖这个问题
Step 4 生成回答(严格格式)
━━ 基于您的认知文档 ━━
【核心答案】
[直接回答问题,只用用户文档中的原话或紧密推论]
【来源(必须列出每一条依据)】
· [文档名/碎片ID] > [章节/位置]:「原文摘录」
· [文档名/碎片ID] > [章节/位置]:「原文摘录」
【置信度】
[🟢 高]:文档中有明确表述,直接引用
[🟡 中]:需要综合多处推论,可能有偏差
[🔴 低]:仅有碎片级别的提及,尚未系统化
【矛盾(如有)】
发现以下不一致:
· [文档A]说:「...」
· [碎片F-XXX]说:「...」
→ 这两处存在[直接冲突/隐式张力],尚未消解。
**若为🔴 致命冲突(两个结论直接互斥,任一成立另一必然错误)**:
⚠️ 致命矛盾——此矛盾未消解将影响本答案的可信度,强烈建议立即运行矛盾检测
[立即运行矛盾检测] [了解但暂不检测]
**若为🟡 隐式张力或🟢 轻微不一致**:
是否要现在运行矛盾检测?[是] [暂时不用]
【知识空白(如有)】
您的文档对以下角度尚未覆盖:
· [空白点1]:[一句话说明缺了什么]
· [空白点2]
是否要记录为待思考的碎片?[记录为碎片] [不用]
━━━━━━━━━━━━━━━━━━━━━━━━
Step 5 处理后续
→ 用户说「是」(运行矛盾检测)→ 触发 cognitive-detect-contradiction Skill
→ 用户说「记录为碎片」→ 触发 cognitive-capture-fragment Skill,预填充「待思考:[空白点]」
→ 用户有追问 → 继续在文档范围内回答(不引入外部内容)
→ 用户说「这块没想清楚」→ 询问「要运行 self-reflect(自我反思)来帮你想清楚吗?」
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.
- 8d ago First seen · 341 lines · 102 tokens per session scan A 19f9e7a07b0a
cognitive-ask is a skill published in the GitHub repository TashanGKD/cognitive-os (8 stars, last pushed 5mo ago), licensed MIT. It adds 102 tokens to every session and 5,421 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to cognitive-ask, differing in 10 lines, and is treated as a copy.
Other skills, from other repositories
cognitive-reorganize
A workflow for reorganising scattered documents into a complete personal knowledge structure.
cognitive-ask
A question-answering workflow that answers from a user's own knowledge documents, with sources, confidence levels, contradictions, and gaps made clear.
cognitive-integrate-fragments
A workflow for moving pending thought fragments into broader knowledge documents while preserving the existing structure.
cognitive-extract-principle
A workflow for finding shared patterns across several stored thought fragments and turning them into candidate principles for review.
cognitive-self-reflect
A guided self-reflection process that turns vague observations about your habits or feelings into structured records and compares them with earlier entries.
cognitive-capture-fragment
A workflow for capturing brief ideas and storing them as structured entries in a personal knowledge system.