claude-devtools: Command for Claude Code

.claude/commands/devtools/chatgroup-architecture.md

claude-devtools:chatgroup-architecture is a command for Claude Code from matt1398/claude-devtools. It costs 53 tokens per session (2,983 once invoked), scanned A, original, MIT.

A technical guide to how conversation records move from raw JSONL files—one JSON object per line—to the chat groups shown in the app.

In plain words
What is it for?
Use it when working on user, AI, system, or compact groups; message chunks; tool links; display items; or the rendering hierarchy.
Why use it?
It removes guesswork when changing conversation parsing or display code by showing how messages are classified, combined, linked to tools, and rendered.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions subagents.

This is matt1398/claude-devtools's own configuration. It tells Claude Code how to work on claude-devtools 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 claude-devtools configures →

About the project

claude-devtools is a visual debugging application that reads Claude Code's locally saved logs and session transcripts and presents their hidden details. Developers use it to inspect tool inputs and outputs, file activity, token usage, subagents, context consumption, and team coordination. The catalogue entries add commands, hooks, agents, instructions, and settings for the tool.

matt1398/claude-devtools · 3,994 stars · on GitHub · claude-dev.tools

Reuse

Borrowing it

Nothing to install: this file belongs to matt1398/claude-devtools. 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/matt1398/claude-devtools/main/.claude/commands/devtools/chatgroup-architecture.md
Clone the repo
git clone --depth 1 https://github.com/matt1398/claude-devtools

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 claude-devtools:chatgroup-architecture

README.md
[![agentmods](https://agentmods.dev/badge/commands/matt1398/claude-devtools/chatgroup-architecture/github.svg)](https://agentmods.dev/commands/matt1398/claude-devtools/chatgroup-architecture)
Your own site
<a href="https://agentmods.dev/commands/matt1398/claude-devtools/chatgroup-architecture"><img src="https://agentmods.dev/badge/commands/matt1398/claude-devtools/chatgroup-architecture/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 claude-devtools:chatgroup-architecture

Your own site · 80×15
<a href="https://agentmods.dev/commands/matt1398/claude-devtools/chatgroup-architecture"><img src="https://agentmods.dev/badge/commands/matt1398/claude-devtools/chatgroup-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,983 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.
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.00053 $0.02983
Opus 5.5 $0.00021 $0.01193
Sonnet 5.5 $0.00011 $0.00597
Haiku 4.5 $0.00005 $0.00298

Measured 1mo ago against content hash 5eca85da99a7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

claude-devtools:chatgroup-architecture 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 1mo 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/commands/devtools/chatgroup-architecture.md · 390 lines

How it starts

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

ChatGroup Architecture

How conversation data flows from raw JSONL messages to rendered chat groups.

Core Design Principle

Chat groups are independent items in a flat chronological list, not paired turns. There is no UserTurn/AITurn pairing — each group stands alone.

// src/renderer/types/groups.ts
export type ChatItem =
  | { type: 'user'; group: UserGroup }
  | { type: 'system'; group: SystemGroup }
  | { type: 'ai'; group: AIGroup }
  | { type: 'compact'; group: CompactGroup };

export interface SessionConversation {
  sessionId: string;
  items: ChatItem[];  // Flat chronological list
  totalUserGroups: number;
  totalSystemGroups: number;
  totalAIGroups: number;
  totalCompactGroups: number;
}

Pipeline Overview

Raw JSONL messages
  → MessageClassifier (classify into user/system/ai/hardNoise)
  → ChunkBuilder (buffer AI messages, flush on user/system boundary)
  → ChunkFactory (build EnhancedAIChunk with SemanticSteps)
  → groupTransformer (chunks → flat ChatItem[] conversation)
  → aiGroupEnhancer (AIGroup → EnhancedAIGroup with displayItems, linkedTools, lastOutput)
  → React components render

Primary source files:

  • src/main/services/parsing/MessageClassifier.ts
  • src/main/services/analysis/ChunkBuilder.ts
  • src/main/services/analysis/ChunkFactory.ts
  • src/renderer/utils/groupTransformer.ts
  • src/renderer/utils/aiGroupEnhancer.ts
  • src/renderer/utils/displayItemBuilder.ts
  • src/renderer/types/groups.ts
  • src/main/types/chunks.ts

Data Models

UserGroup

// src/renderer/types/groups.ts
interface UserGroup {
  id: string;
  message: ParsedMessage;
  timestamp: Date;
  content: UserGroupContent;
  index: number;  // Ordering index within session
}

interface UserGroupContent {
  text?: string;                 // Plain text (commands removed)
  rawText?: string;              // Original text
  commands: CommandInfo[];       // Extracted /commands
  images: ImageData[];           // Attached images
  fileReferences: FileReference[]; // @file.ts mentions
}

Read the full file on GitHub · 390 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. 1mo ago First seen · 390 lines · 53 tokens per session scan A 5eca85da99a7

Subscribe to this mod's changes

claude-devtools:chatgroup-architecture is a command published in the GitHub repository matt1398/claude-devtools (3,994 stars, last pushed 1mo ago), licensed MIT. It adds 53 tokens to every session and 2,983 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-08-30.