threads

threads is a skill for Codex from majiayu000/spellbook. It costs 75 tokens per session (7,440 once invoked), scanned A, original, MIT.

A workflow guide for coordinating several coding agents on a broad task. It defines separate work lanes, file ownership, review gates, and checks that the work is complete.

In plain words
What is it for?
Use it to split work across agents, manage GitHub issue or pull-request queues, assign ownership, and verify that each lane has finished correctly.
Why use it?
It reduces conflicts and missed work when multiple agents handle different parts of a codebase or issue queue at the same time.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

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/majiayu000/spellbook/threads
Any agent
npx skills add majiayu000/spellbook --skill threads
Clone the repo
git clone --depth 1 https://github.com/majiayu000/spellbook

Made for: 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 threads

README.md
[![agentmods](https://agentmods.dev/badge/skills/majiayu000/spellbook/threads.svg)](https://agentmods.dev/skills/majiayu000/spellbook/threads)
Your own site
<a href="https://agentmods.dev/skills/majiayu000/spellbook/threads"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/threads.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,440 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.1 $0.00075 $0.07440
Opus 5 $0.00037 $0.03720
Sonnet 5 $0.00015 $0.01488
Haiku 4.5 $0.00007 $0.00744

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

Security

Grade A, and why

threads 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 2d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/analyze_run_log.py, scripts/append_run_log.py, scripts/run_budget_contract.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.

skills/threads/SKILL.md · 612 lines

How it starts

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

Threads

Use this skill to turn a broad request into controlled Codex-native subthreads with explicit lanes, file ownership, review gates, and verifiable closure.

Native Codex threads are short-lived parallel work lines inside the Codex workflow. They are not the same as OMX/tmux workers. If native subagent tools are not visible, discover them with tool search. If no native subagent capability is available, produce the thread prompt pack and execution plan instead of pretending threads were launched.

Quick Path

  1. Classify the request: single_agent, plan_only, execute_direct, review_only, research_spec, or clarify_first.
  2. If the user explicitly asked for threads, record intent_contract and thread_dispatch_gate, write a run_phase: preflight record, and pass append_run_log.py --validate-only before spawning.
  3. For GitHub queues, fetch remote state in the coordinator lane, then write queue_gate, queue_ledger, issue_to_pr_map, and the validated queue_bounds.
  4. Write a lane map with file ownership, verification owner, stop conditions, context budget, and output firewall.
  5. Route large command output to artifacts before dispatch; the parent reads only summaries, short tails, targeted greps, and evidence paths.
  6. Dispatch only bounded native lanes with disjoint writable scopes or read-only roles.
  7. Collect, wait, and close spawned agents; do not count the coordinator as a spawned thread.
  8. Run fresh verification tied to the current head or artifact.
  9. End with a compact final report and threads_run_log; write durable JSONL for queue, multi-lane, push, comment, or merge-capable runs.

Do Not Use For

Do not use this skill for generic uses of "thread" unless the user explicitly means Codex workflow orchestration:

  • operating-system threads, language concurrency, or async programming models
  • chat, email, forum, Slack, GitHub discussion, or comment threads
  • OpenAI Assistants API threads or other product APIs
  • ordinary single-agent repo work where there are no independent lanes

Read the full file on GitHub · 612 lines

Files

What ships with it

8 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. 2d ago First seen · 612 lines · 75 tokens per session scan A 12e1c153ebce

Subscribe to this mod's changes

threads is a skill published in the GitHub repository majiayu000/spellbook (272 stars, last pushed yesterday), licensed MIT. It adds 75 tokens to every session and 7,440 once invoked, about $0.0004 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

pneuma-session

Rewrite the active Pneuma session's UI title + one-line summary so the launcher and ProjectPanel rows reflect what the session is actually about. Use this skill whenever the user asks to "整理 / 概括 / refresh / re-title / summarize this session", whenever the conversation has produced substantive work and the default…

pandazki/pneuma-skills · 127 tokens

handoff

Write a portable, secret-scrubbed handoff doc so this work can continue in any AI tool or on any machine. Use when saying "handoff", "running out of tokens", or "continue elsewhere".

anton-abyzov/specweave · 44 tokens

lov-gh-tidy

Interactive GitHub repo hygiene skill. Lists all open issues, PRs, stale branches, and orphan labels, shows a summary of each with analysis, then asks the user how to handle each item (close, merge, comment, delete, keep). Executes all chosen actions via gh CLI. Use when the user says "清理 GitHub", "tidy repo", "clean…

lovstudio/skills · 95 tokens

session-handoff-resume

Skill to save ultra-compact project checkpoints and seamlessly resume work across accounts or new chat sessions with minimum token consumption / Skill untuk menyimpan checkpoint proyek yang super ringkas dan melanjutkan pekerjaan secara efisien saat ganti akun/sesi tanpa boros token.

roedyrustam/vibes-plug · 59 tokens

ag-teleportar

Switch rapido entre projetos no workspace com contexto preservado. Carrega CLAUDE.md, detecta stack, verifica .env, mostra branch atual, e resume estado. Nao e cd — e context-aware switching.

andregusman-raiz/a-gusman-claude · 50 tokens

task-copilot

Use when work should be tracked with tc, including creating PRDs, tasks, handoffs, logs, and work products, or when preserving detailed outputs outside the chat context.

Everyone-Needs-A-Copilot/claude-copilot · 40 tokens