Claude Code Types — Communication skill for Claude Code
TypeScript type definitions for Claude Code chat history JSONL files.
How to install Claude Code Types
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open pedropaulovc/claude-code-types and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Code Types does
TypeScript type definitions for Claude Code chat history JSONL files.
Alternatives in Communication
- Prompts.chat — f.k.a. Awesome ChatGPT Prompts 154.3k ★
- HolaOS — Open-source agentic workspace enterprises can make their own 10.9k ★
- Pregunta Cualquier Cosa Sobre El Código — /understand-chat How does the payment flow work 8.2k ★
README
claude-code-types
[](https://www.npmjs.com/package/claude-code-types) [](docs/README.md)
TypeScript type definitions for [Claude Code](https://docs.anthropic.com/en/docs/claude-code) chat history JSONL files.
Claude Code stores conversation history at `~/.claude/projects//.jsonl`. Each line is a JSON object. This package provides full type coverage for all entry types.
Install
npm install claude-code-types
Usage
import type { TranscriptEntry } from 'claude-code-types';
import { readFileSync } from 'fs';
const path = '~/.claude/projects/my-project/abc123.jsonl';
const entries: TranscriptEntry[] = readFileSync(path, 'utf-8')
.split('\n')
.filter(Boolean)
.map(line => JSON.parse(line) as TranscriptEntry);
for (const entry of entries) {
switch (entry.type) {
case 'user':
console.log(entry.message.content);
break;
case 'assistant':
console.log(entry.message.model);
break;
case 'system':
console.log(entry.subtype);
break;
}
}
Entry types
type |
Interface | Description |
|---|---|---|
user |
UserEntry |
Human messages, tool results |
assistant |
AssistantEntry |
Model responses, tool calls |
system |
SystemEntry |
API errors, compaction, durations |
file-history-snapshot |
FileHistorySnapshotEntry |
Undo/restore tracking |
pr-link |
PrLinkEntry |
Linked pull requests |
progress |
ProgressEntry |
Streaming subagent updates |
queue-operation |
QueueOperationEntry |
Queued user messages |
saved_hook_context |
SavedHookContextEntry |
Hook execution context |
summary |
SummaryEntry |
Conversation summaries |
Versioning
This project follows [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html). See [CHANGELOG.md](CHANGELOG.md) for release hist
Related Skills
Backend API
Use when changing the Express and TypeScript backend in server/, including auth, conversations, guest flows, c
Compact Handover
When your Claude chat gets too long, you're burning tokens exponentially. But switching chats means losing all
Lizard Studio
Claude Code Chrome extension — runs the real Claude Code CLI locally, with the chat in your browser's side pan
Discord CLI
Discord CLI + MCP server that runs as your own user account — read, send, search, and manage any server/DM you
Wechat Exporter
A Claude Code / Codex skill to export and decrypt WeChat (macOS) chat history into plaintext SQLite databases
Pokegents
Pokegents is a local, Pokémon-inspired dashboard that turns Claude Code and Codex sessions into a local team d
Related Agents
Parser Engineer
Specialist for JSONL parsing, data extraction, and the shared types module. Invoke when building or modifying
Type Guardian
Enforces TypeScript quality by finding and fixing type issues, any types, and missing definitions. Use for typ
TypeScript Developer
TypeScript development specialist for GAIA. Use PROACTIVELY for the Agent UI (React/TS/Vite/Electron), type de