wezterm-ai-agents: Instructions file for Claude Code

CLAUDE.md

wezterm-ai-agents CLAUDE.md is an instructions file for Claude Code from nakashima-takeo/wezterm-ai-agents. It costs 1,655 tokens per session, scanned A, original, MIT.

Project instructions for a WezTerm plugin that manages parallel AI coding-agent sessions in terminal tabs and panes.

In plain words
What is it for?
Developing, testing, linting, formatting, and understanding the WezTerm plugin's workspace, worktree, and session features.
Why use it?
They give contributors the project structure and the commands needed to check Lua code, formatting, and tests.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Codex.

This is nakashima-takeo/wezterm-ai-agents's own configuration. It tells Claude Code how to work on wezterm-ai-agents itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything wezterm-ai-agents configures →

Reuse

Borrowing it

Nothing to install: this file belongs to nakashima-takeo/wezterm-ai-agents. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nakashima-takeo/wezterm-ai-agents/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/nakashima-takeo/wezterm-ai-agents

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 wezterm-ai-agents CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/nakashima-takeo/wezterm-ai-agents/claude-md/github.svg)](https://agentmods.dev/instructions/nakashima-takeo/wezterm-ai-agents/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/nakashima-takeo/wezterm-ai-agents/claude-md"><img src="https://agentmods.dev/badge/instructions/nakashima-takeo/wezterm-ai-agents/claude-md/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 wezterm-ai-agents CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/nakashima-takeo/wezterm-ai-agents/claude-md"><img src="https://agentmods.dev/badge/instructions/nakashima-takeo/wezterm-ai-agents/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,655 This file is loaded in full into every session.
When invoked 1,655 The same file — it is already loaded in full.
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.01655 $0.01655
Opus 5 $0.00827 $0.00827
Sonnet 5 $0.00331 $0.00331
Haiku 4.5 $0.00166 $0.00166

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

Security

Grade A, and why

wezterm-ai-agents CLAUDE.md 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 11d 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.

CLAUDE.md · 90 lines

How it starts

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

CLAUDE.md

概要

WezTerm プラグイン。並列 AI コーディングエージェントセッションを管理する。WezTerm の Lua 5.4 サンドボックス上で動作する (テスト/lint は LuaJIT で実行)。永続ワークスペース、git worktree 連携、タブ/ペイン UI によるエージェント状態追跡を提供。

コマンド

# Lint
luacheck .

# フォーマットチェック
stylua --check .

# フォーマット修正
stylua .

# 全テスト実行 (luajit 必須)
bash test/run.sh

# 単体テスト実行
luajit test/test_agent.lua

アーキテクチャ

plugin/init.lua がエントリポイント。dofile() で全モジュールをロードする。WezTerm サンドボックスは wezterm / mux グローバルを提供するが、debug ライブラリは使用不可。

ディレクトリ構成(レイヤ別。init.lua がロード順=依存階層で全体を接続):

plugin/
├── init.lua            — エントリポイント、apply() で層順にロード+結線
├── ui/                 — 上位層: 描画・操作
│   ├── ui.lua          — タブタイトル、右ステータスバーの描画
│   └── selector/       — InputSelector ベースの UI + キーバインド
│       ├── init.lua    — coordinator (build_keybinds / agent選択 / pin)
│       ├── workspace.lua — ワークスペース選択/登録/削除 UI
│       ├── worktree.lua  — worktree/PR/Issue 選択 UI + prefetch
│       └── ui.lua      — フォーマット共通ヘルパー (setup で両UIに注入)
├── state/              — 中位層: 永続化・配置 (循環は agent_mod/layout_mod 注入で回避)
│   ├── workspace/
│   │   ├── init.lua    — JSON永続化 + CRUD
│   │   └── session.lua — タブ状態のスナップショット/同期/ワークスペース生成
│   └── layout.lua      — ペイン分割レイアウトのスナップショット/復元
├── service/            — 下位層: 外部I/O・検出 (UI に依存しない)
│   ├── agent.lua       — エージェントレジストリ、検出、状態集約、JSON リーダー
│   ├── agents/         — 各エージェント実装 (claude/codex/cursor/gemini)
│   ├── worktree/
│   │   ├── init.lua    — ローカル git worktree 操作 (list/add/remove/prune) + 命名/パス展開
│   │   └── github.lua  — PR/Issue 連携 (gh 取得・キャッシュ・パース・フィルタ・worktree生成)
│   ├── editor.lua      — エディタ検出・起動引数
│   └── links.lua       — ターミナル出力パスの editor:// リンク化
└── resource/           — 下位層: 静的データ
    ├── labels.lua      — i18n ラベル (en/ja)
    └── icons.lua       — アイコンセット (unicode / nerd)、opts.nerd_font で切替

主要パターン:

  • エージェント状態は hooks が pane ごとに JSON ファイルを書き込む push 方式: $XDG_STATE_HOME/wezterm-ai-agents/<gui_pid>/wezterm-agent-<pane_id> (GUI プロセス PID 名前空間配下。フォールバック ~/.local/state)
  • hooks/agent_status.sh が書き込み側 (全エージェント共通)。Lua 側は wezterm.json_parse() で読み取り
  • PID 名前空間は書き込み側 WEZTERM_UNIX_SOCKETgui-sock-<pid> と読み取り側 wezterm.procinfo.pid() が同一 GUI プロセス PID に合意する前提 (mux 内蔵の既定構成のみ。分離 mux 構成は非対応)
  • JSON 形式: {"agent":"<id>","state":"<state>","ts":<unix>,"session_id":"<sid>"}
  • ワークスペースデータは $XDG_STATE_HOME/wezterm-ai-agents/workspaces.json (PID 名前空間なし) にアトミック書き込み (tmp + rename)
  • 循環依存は関数引数でモジュールを渡して回避 (agent_mod, layout_mod)
  • 非同期/外部コマンド実行の方針は docs/async.md を参照 (UI ブロック回避、背景取得 + キャッシュ等)

Read the full file on GitHub · 90 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. 11d ago First seen · 90 lines · 1,655 tokens per session scan A dd9a6db12571

Subscribe to this mod's changes

wezterm-ai-agents CLAUDE.md is an instructions file published in the GitHub repository nakashima-takeo/wezterm-ai-agents (5 stars, last pushed 3mo ago), licensed MIT. It adds 1,655 tokens to every session, about $0.0083 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-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens