cross-channel-history-retrieval

cross-channel-history-retrieval is a skill for Claude Code from XiaoLuoLYG/GOD. It costs 114 tokens per session (1,093 once invoked), scanned A, original, Apache-2.0.

A skill for searching the original messages from earlier chat sessions and channels when the current conversation does not contain enough history.

In plain words
What is it for?
Use it to search chat history by keywords, channel, session, or time range and bring matching messages into the current conversation.
Why use it?
It helps recover exact past questions, dates, people, or decisions instead of relying on incomplete memory.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to search chat history by keywords, channel, session, or time range and bring matching messages into the current conversation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xiaoluolyg/god/cross-channel-history-retrieval
About the project

GOD is a control room for observing and directing societies of language-model agents running in simulated worlds. It lets researchers inspect replays, question individual agents, alter future events, reset simulations, and export experiments for reuse. The catalogue entries are skills and agents for operating and investigating these simulations.

XiaoLuoLYG/GOD · 1,109 stars · on GitHub · xiaoluolyg.github.io

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.

Any agent
npx skills add XiaoLuoLYG/GOD --skill cross-channel-history-retrieval
Clone the repo
git clone --depth 1 https://github.com/XiaoLuoLYG/GOD

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 cross-channel-history-retrieval

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaoluolyg/god/cross-channel-history-retrieval/github.svg)](https://agentmods.dev/skills/xiaoluolyg/god/cross-channel-history-retrieval)
Your own site
<a href="https://agentmods.dev/skills/xiaoluolyg/god/cross-channel-history-retrieval"><img src="https://agentmods.dev/badge/skills/xiaoluolyg/god/cross-channel-history-retrieval/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 cross-channel-history-retrieval

Your own site · 80×15
<a href="https://agentmods.dev/skills/xiaoluolyg/god/cross-channel-history-retrieval"><img src="https://agentmods.dev/badge/skills/xiaoluolyg/god/cross-channel-history-retrieval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,093 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00114 $0.01093
Opus 5 $0.00057 $0.00547
Sonnet 5 $0.00023 $0.00219
Haiku 4.5 $0.00011 $0.00109

Measured 9d ago against content hash 202d54e87d5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

cross-channel-history-retrieval 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 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/search_history.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

jiuwenclaw/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/cross-channel-history-retrieval/SKILL.md · 68 lines

What it actually says

跨频道历史检索

用于从 ~/.jiuwenclaw/agent/sessions/<session_id>/history.json 中检索历史消息,并把命中结果整理为可直接粘贴进当前上下文的文本块。

何时使用

  • 用户提到“其他频道/会话”的聊天内容,或在 A 频道问自己在 B 频道(如网页)说过什么
  • 「今天/刚才我问了什么」「关于某某我提过什么问题」 且当前会话里看不到原文
  • 用户给出关键词,要求回溯某时间段对话
  • 用户要求把检索结果“带到当前上下文里”

执行方式

必须使用 mcp_exec_command 执行脚本,不要只口头总结。

python ~/.jiuwenclaw/agent/skills/cross-channel-history-retrieval/scripts/search_history.py --channel feishu --query "报销 审批" --start "2026-03-26 09:00" --end "2026-03-26 18:00" --limit 30

(Windows:--channel / --query / 时间参数等与 Unix 相同;默认 mcp_exec_commandcmdcmd 不会展开 ~,不要用 ~/.jiuwenclaw,应写 python %USERPROFILE%\.jiuwenclaw\agent\skills\cross-channel-history-retrieval\scripts\search_history.py 再接同样参数。若整条命令在 PowerShell 里执行,~ 一般会展开,也可用 $env:USERPROFILE\...。)

参数说明

  • --channel:按频道过滤(如 feishu / dingtalk / web)。如果用户在语言里没有指明 channel,则不要传 --channel,脚本会扫描所有会话。
  • --session-id:只检索指定会话(优先级高于 --channel
  • --query:空格分词关键词(例如 "合同 审批"
  • --keyword:可重复传入多个精确关键词
  • --start--end:显式时间范围,格式支持
    • YYYY-MM-DD
    • YYYY-MM-DD HH:MM
    • YYYY-MM-DD HH:MM:SS
    • ISO8601(如 2026-03-26T10:30:00+08:00
  • --at:某个时间点,配合 --window-minutes 形成检索窗
  • --window-minutes:窗口大小(默认 120 分钟)
  • --timezone:默认 Asia/Shanghai
  • --limit:返回命中上限(默认 20)
  • --max-sessions:最多扫描会话数量(默认 200)
  • --auto-expand:无命中时自动扩大时间窗重试(默认开启)

时间策略

  1. 若用户明确给了开始/结束时间,优先使用。
  2. 若仅给“某时刻”,使用 --at + --window-minutes
  3. 若用户没给时间,使用默认窗口(最近 24 小时)。
  4. 若初次无结果且 --auto-expand 开启,自动扩展为最近 72 小时再试一次。

输出与上下文注入

脚本第一行固定输出 SKILL=cross-channel-history-retrieval,便于在 mcp_exec_command 回显或日志里 grep 确认本 skill 的脚本已执行。

脚本会输出两个区块:

  • HISTORY_SEARCH_SUMMARY:统计信息与最终时间窗
  • HISTORY_CONTEXT_BLOCK:可直接放入当前对话上下文的命中消息片段

拿到脚本输出后,你应当:

  1. 在回复中简要说明检索范围和命中情况。
  2. HISTORY_CONTEXT_BLOCK 中的内容原样(或轻度裁剪)贴到当前回复里,作为上下文依据。
  3. 若无命中,明确说明已检索的时间窗、频道/会话和关键词,并询问是否放宽条件。
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 68 lines · 114 tokens per session scan A 202d54e87d5e

Subscribe to this mod's changes

cross-channel-history-retrieval is a skill published in the GitHub repository XiaoLuoLYG/GOD (1,109 stars, last pushed 16d ago), licensed Apache-2.0. It adds 114 tokens to every session and 1,093 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-09-03.

Related

Other skills, from other repositories

knowledge-base

Create and maintain a Markdown knowledge base that any AI agent can read, search, and update. Use when the user wants to start a knowledge base, add or update notes, organize docs/notes for an agent or LLM to consume, build an index of notes, or run a cleanup/maintenance pass on an existing MD knowledge base. Triggers…

wonderwhy-er/DesktopCommanderMCP · 112 tokens

obsidian-vault

Organize Obsidian vaults with MOCs, wikilinks, frontmatter/properties, dashboards, orphan-note checks, and cleanup workflows. Use ONLY when the user explicitly refers to Obsidian — by naming "Obsidian", an Obsidian "vault", or an Obsidian-specific feature such as wikilinks ("[[ ]]"), the Dataview or Bases plugins, or…

wonderwhy-er/DesktopCommanderMCP · 171 tokens

task-agent-eliza-bridge

Use when spawning a Claude Code, Codex, Gemini, Aider, or other CLI task agent whose work needs parent Eliza runtime context. Covers the read-only loopback bridge for character, room, memory, and active workspace state.

elizaOS/eliza · 55 tokens

aatmf-t04-memory-manipulation

AATMF T4 — Multi-Turn & Memory Manipulation. Persistent memory injection, conversation-state poisoning, cross-session contamination, ghost-context leak.

PurpleAILAB/Decepticon · 39 tokens

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 tokens

hive.note-taking

Maintain a free-form scratchpad of decisions, extracted values, and open questions so context pruning doesn't lose anything you still need.

aden-hive/hive · 30 tokens