thread-manager

thread-manager is a skill for Claude Code, Codex from peterfei/ai-agent-team. It costs 0 tokens per session (458 once invoked), scanned A, original, MIT.

A conversation manager for Claude Code that keeps several separate work threads. Each thread has its own message history, and local SQLite storage records threads and related file changes.

In plain words
What is it for?
Use it to create, list, switch, update, and delete task threads. It is useful when working on multiple coding tasks in parallel or searching the history of previous work.
Why use it?
It prevents unrelated tasks from mixing their context and makes it easier to pause one task without losing its place. It also helps you find earlier messages and see which files each thread changed.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/peterfei/ai-agent-team/thread-manager
Any agent
npx skills add peterfei/ai-agent-team --skill thread-manager
Clone the repo
git clone --depth 1 https://github.com/peterfei/ai-agent-team

Made for: Claude Code, Codex.

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 thread-manager

README.md
[![agentmods](https://agentmods.dev/badge/skills/peterfei/ai-agent-team/thread-manager.svg)](https://agentmods.dev/skills/peterfei/ai-agent-team/thread-manager)
Your own site
<a href="https://agentmods.dev/skills/peterfei/ai-agent-team/thread-manager"><img src="https://agentmods.dev/badge/skills/peterfei/ai-agent-team/thread-manager.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 458 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00458
Opus 5 $0.00000 $0.00229
Sonnet 5 $0.00000 $0.00092
Haiku 4.5 $0.00000 $0.00046

Measured 4d ago against content hash b0f881d1c9cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

thread-manager 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 4d ago.

The scan reads SKILL.md. This mod also ships 40 executable files (find-module.js, jest.config.js, scripts/download-model.js, …), 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.

.claude/skills/thread-manager/SKILL.md · 47 lines

What it actually says

Thread Manager Skill

Thread Manager 为 Claude Code 提供多线程对话管理功能,让你可以并行处理多个任务,保持上下文隔离和专注。

功能特性

  • 多线程管理: 创建、切换、更新和删除对话线程。
  • 上下文隔离: 每个线程拥有独立的消息历史和上下文。
  • 文件变更追踪: 自动记录每个线程中修改的文件和代码行数统计。
  • 持久化存储: 使用 SQLite 本地存储所有数据,安全可靠。
  • Git 集成: 自动检测文件变更详情。

安装

本 Skill 通常作为 ai-agent-team 项目的一部分安装。如果需要单独安装:

  1. 确保已安装 Node.js 18+。
  2. 运行 npm install 安装依赖。
  3. 运行 npm run build 编译代码。
  4. 将本 Skill 添加到 Claude Code 配置文件 (config.json) 中。

MCP 工具

工具名称 描述
create_thread 创建新线程
list_threads 列出所有线程
switch_thread 切换到指定线程
get_thread 获取线程详情
update_thread 更新线程信息
delete_thread 删除线程
get_current_thread 获取当前活跃线程
track_file_change 记录文件变更 (支持自动检测)
search_messages 基于语义搜索历史消息 (支持自然语言)

Slash Commands

  • /thread new "Title": 创建新线程
  • /threads: 列出所有线程
  • /thread <id>: 切换线程
  • /thread info: 查看当前线程详情
  • /memory search "query": 搜索历史消息 (需要调用 search_messages)

数据存储

数据存储在 ~/.claude/threads/threads.db (默认) 或环境变量 THREADS_DB_PATH 指定的位置。

Files

What ships with it

55 files 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. 4d ago First seen · 47 lines · 0 tokens per session scan A b0f881d1c9cc

Subscribe to this mod's changes

thread-manager is a skill published in the GitHub repository peterfei/ai-agent-team (429 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 458 tokens. 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.

Related

Other skills, from other repositories

ads-launch

Draft or explicitly apply a paid-ad campaign launch through Claude Ads capability-gated adapters. Use for campaign creation, launch plans, publishing ads, activating campaigns, uploading creative, or requests to push a campaign live.

AgriciDaniel/claude-ads · 45 tokens

api-response-optimization

Optimizes API performance through payload reduction, caching strategies, and compression techniques. Use when improving API response times, reducing bandwidth usage, or implementing efficient caching.

secondsky/claude-skills · 36 tokens

plan-create

Create structured implementation plans for autonomous TDD development. Use for new features, multi-file changes, or anything requiring multiple steps or tests. Triggers on aspirational openers ("let's build", "let's start building", "I want to make", "I want an app that", "help me build"), capability lists ("users…

markshust/hcf · 171 tokens

blog-multilingual

One-command multilingual blog creation. Writes a blog post, translates it into user-specified languages, applies cultural adaptation, and emits hreflang tags, sitemap entries, and a CMS-ready language map. The complete write-to-publish pipeline for international content. Orchestrates blog-write, blog-translate…

AgriciDaniel/claude-blog · 130 tokens

amazing-psycoder

Route Amazing PsyCoder requests to the correct psychological experiment or behavioral-data analysis stage: Designer, Coder, or Reviewer. Use for end-to-end or multi-stage work, ambiguous requests such as “帮我做 Stroop”, cross-pipeline work, system-capability questions, or explicit invocations of Amazing PsyCoder.…

soupandpsy/amazing-psycoder-skills · 110 tokens

alibaba-maestro

Alibaba Cloud Maestro routing skill. Classify the user's Alibaba Cloud task, select the narrowest specialist agent or the right team of specialists from the catalog, and dispatch them — single specialist for focused tasks, parallel team (max 4) for multi-domain tasks. Never auto-dispatch live-guard agents.…

VincentChuWaiChow/vanguard-frontier-agentic · 100 tokens