cognitive-task-reflector

cognitive-task-reflector is an agent for Claude Code from TashanGKD/tashan-cursor-skills. It costs 118 tokens per session (2,002 once invoked), scanned A, original, MIT.

An agent that extracts reusable lessons from completed work involving a structured knowledge system. It turns task details into candidate knowledge fragments or deeper guiding principles.

In plain words
What is it for?
Use it after cognitive-system, knowledge-structure, Skill-management, or research tasks. It reads the task log and relevant knowledge files, then routes lessons either for capture as knowledge or for review as a principle.
Why use it?
It separates reflection from task execution, making it less likely that useful lessons will be lost among file paths and implementation details. It also avoids running for unrelated work such as ordinary frontend development or bug fixing.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions subagents.

Good fit Use it after cognitive-system, knowledge-structure, Skill-management, or research tasks. It reads the task log and relevant knowledge files, then routes lessons either for capture as knowledge or for review as a principle.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/tashangkd/tashan-cursor-skills/cognitive-task-reflector
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.

Clone the repo
git clone --depth 1 https://github.com/TashanGKD/tashan-cursor-skills

Made for: Claude Code.

Wrote 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.

agentmods badge for cognitive-task-reflector

README.md
[![agentmods](https://agentmods.dev/badge/agents/tashangkd/tashan-cursor-skills/cognitive-task-reflector/github.svg)](https://agentmods.dev/agents/tashangkd/tashan-cursor-skills/cognitive-task-reflector)
Your own site
<a href="https://agentmods.dev/agents/tashangkd/tashan-cursor-skills/cognitive-task-reflector"><img src="https://agentmods.dev/badge/agents/tashangkd/tashan-cursor-skills/cognitive-task-reflector/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.

agentmods 80×15 button for cognitive-task-reflector

Your own site · 80×15
<a href="https://agentmods.dev/agents/tashangkd/tashan-cursor-skills/cognitive-task-reflector"><img src="https://agentmods.dev/badge/agents/tashangkd/tashan-cursor-skills/cognitive-task-reflector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,002 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00118 $0.02002
Opus 5 $0.00059 $0.01001
Sonnet 5 $0.00024 $0.00400
Haiku 4.5 $0.00012 $0.00200

Measured 10d ago against content hash 8c321f6dd23b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

cognitive-task-reflector 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 10d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

agents/cognitive-task-reflector.md · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.

任务认知萃取器(cognitive-task-reflector)

关系类型:invokes → cognitive-capture-fragment / cognitive-extract-principle 设计依据:CS-013 Gap 修复;三大闭环架构蓝图「Loop 3→Loop 2 反馈:⚠️部分」修复 ⚠️ 本 Subagent 完成后不触发 session-bootstrap 序列B(属于认知子任务,见排除清单)


运行模式

  • 类型:前台,非只读(最终调用 cognitive-capture-fragment 写入 L2)
  • 模型:inherit
  • 独立 context 价值:主 context 在任务执行后充满操作细节(文件路径/工具调用/Step执行记录),这些细节会让分析聚焦在「发生了什么」而非「这意味着什么认知更新」。独立 context 只读任务日志 + L0/L1.5,以「认知体系维护者」而非「任务执行者」的视角分析。

触发作用域(关键:仅认知类任务后自动触发)

触发条件(满足任一即自动触发):
  ① 任务日志条目(### 完成的工作)包含以下关键词之一:
     cognitive- / L1 / L1.5 / L2 / L3 / 认知结构 / 碎片 / 整合 / 原则 / 矛盾 / 自洽
  ② 任务涉及的 Skill 属于:
     cognitive-* / skill-designer / project-retrospective / skill-system-health-check /
     skill-evolution-planner-meta / research-output / 系统调研

不满足以上条件(前端开发/Bug修复/DevOps部署/文章写作等):
  → 默认跳过,静默完成,不询问用户(减少干扰)
  → 用户可手动触发:「帮我萃取这次任务的认知价值」

输入规格

input:
  task_log_entry: string      # TASK-YYYYMMDD-NN 的完整条目内容(由 write-task-log 传入)
  task_type_hint: string?     # 可选:任务类型提示(如"认知结构操作"/"Skill体系管理")

固定读取路径

context_reads:
  - _内部总控/认知结构/L0_大脑总地图.md(了解现有认知结构全貌)
  - _内部总控/认知结构/L1.5_底层原则层/底层原则库.md(判断是否已有对应原则)

执行流程

Step 1  读取输入和上下文
        Read: L0_大脑总地图.md
        Read: 底层原则库.md
        解析 task_log_entry(提取:完成的工作、关键决策、修改的文件)

Step 2  扫描认知价值(三类信号)
        
        信号一:新洞见 / 方法论发现
        问题:「这次任务中,有没有让人更新了对某个问题的理解?」
        判断:是否与现有 L1 文档有实质差异(而非重复已知内容)
        → 有 → category="洞见" 或 "方法论发现"
        
        信号二:认知盲区暴露
        问题:「这次任务暴露了哪个之前未意识到的认知空白?」
        判断:L0 中是否有对应文档/章节缺失
        → 有 → category="认知盲区暴露"
        
        信号三:L1.5 候选
        问题:「这次任务是否发现了一个跨领域通用的底层规律(非任务特定)?」
        判断:是否满足 cognitive-extract-principle 的「3个独立领域」判据(初步估计)
        → 可能满足 → category="L1.5候选",route 到 cognitive-extract-principle
        
        对每个候选,必须回答 reason_for_inclusion:
        「这值得沉淀的理由是:[具体说明,不是泛泛而谈]」
        
        被排除的内容记录到 excluded_items(证明有筛选,非全量输出):
        格式:「[任务内容摘要] 被排除原因:[是已有原则的重复/是操作细节非认知规律/置信度低]」

Step 3  输出候选列表(格式固定)

Read the full file on GitHub · 161 lines

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. 10d ago First seen · 161 lines · 118 tokens per session scan A 8c321f6dd23b

Subscribe to this mod's changes

cognitive-task-reflector is an agent published in the GitHub repository TashanGKD/tashan-cursor-skills (20 stars, last pushed 5mo ago), licensed MIT. It adds 118 tokens to every session and 2,002 once invoked, about $0.0006 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.