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 kagan-sh/kagan --skill kg-threadsgit clone --depth 1 https://github.com/kagan-sh/kaganWrote 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/kagan-sh/kagan/kg-threads)<a href="https://agentmods.dev/skills/kagan-sh/kagan/kg-threads"><img src="https://agentmods.dev/badge/skills/kagan-sh/kagan/kg-threads/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/kagan-sh/kagan/kg-threads"><img src="https://agentmods.dev/badge/skills/kagan-sh/kagan/kg-threads.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.00055 | $0.02062 |
| Opus 5.5 | $0.00022 | $0.00825 |
| Sonnet 5.5 | $0.00011 | $0.00412 |
| Haiku 4.5 | $0.00006 | $0.00206 |
Grade A, and why
kg-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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Threads
kg is how you use kagan. kg status --json is this thread. KG_THREAD_ID, KG_PROJECT_ID, and KG_ENVIRONMENT_ID fill the matching arguments when you leave them out. cli in that status is the binary that talks to the open app.
Read kg guide threads for the flag list and for what waiting, idle, and busy mean. Read kg thread <command> --help for the live flags. This skill says when a job is another thread, and the commands that do it. Pass --json when the output decides the next command. A nonzero exit is a failure.
A helper, reviewer, or parallel worker is a kagan thread. Task, Agent, and this program's subagent tool are the wrong tool. One task stays in this thread.
When the job stays here
Keep the work here when it is one task, the person is talking to you, or you are running a command in this folder. Do not start a thread to hold a note, to retry the same edit, or to ask something you can ask here.
kg thread ask raises a question in this thread. The answer arrives as answered.
When it becomes another thread
Start another thread when the work is a separate helper, reviewer, or parallel worker, or when the person asked for one. A thread is one program in one folder. The child does not inherit this conversation. Give it a prompt that names the outcome, the constraints, what to check, and what to report back.
A parent is told by a line typed into its terminal when the child's turn ends, the child asks the person a question, its program exits, or it fails. The line names the child and says kg thread screen <id> to read it. A stop the person asked for stays quiet. Pass --quiet to kg thread run to turn the line off for that child. kg thread wait is still there when this thread has to block until the child's reply ends. A wait that returns the child's end replaces its line, so the parent is not told twice.
Report the new thread id. Do not build a URL for it.
A chat thread
A thread whose link is acp (started with --link acp, or by the window's own agent picker) draws a chat instead of a terminal: its transcript is its events, and the prompt box is the way in. --link acp takes claude, codex, gemini, kimi or opencode, and kagan runs that agent's ACP command itself; any other program is refused. kg thread events <id> reads what the agent said; a terminal thread has no chat and screen, resize and paste are refused for one. A plugin with the chat area reads the same transcript with kagan/chat, and the person may let a plugin draw it. Tell the person kg thread run --link acp, not screen.
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.
- today Changed · +11 lines 2fdea7cbdce9
- 20d ago First seen · 87 lines · 55 tokens per session scan A 1bd906871824
kg-threads is a skill published in the GitHub repository kagan-sh/kagan (5 stars, last pushed today), licensed Apache-2.0. It adds 55 tokens to every session and 2,062 once invoked, about $0.0002 per session on Opus 5.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-11-11.
kg-threads compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| kg-threadskagan-sh/kagan | Skill | 5 | today | Apache-2.0 | A | 55 | Claude Code, Codex |
| architecture-auditorg2AI/ORG2 | Skill | 2.5k | 28d ago | AGPL-3.0 | A | 70 | Claude Code, Codex |
| concord-relayGet-Concord-AI/concord-mcp | Skill | 1.7k | yesterday | MIT | A | 18 | Claude Code, Codex |
| idea-teammajiayu000/spellbook | Skill | 301 | yesterday | MIT | A | 182 | Claude Code |
| codex-agentmajiayu000/spellbook | Skill | 301 | yesterday | MIT | A | 45 | Claude Code |
| project-health-auditormajiayu000/spellbook | Skill | 301 | yesterday | MIT | A | 31 | Claude Code |
| review-gatemajiayu000/spellbook | Skill | 301 | yesterday | MIT | A | 95 | Claude Code, Codex |