claude-code-metadata

Extract Claude Code local data schemas from JSONL sessions and stats-cache.json.

3|1|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/marcus/marcus-skills --skill claude-code-metadata
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-code-metadata
Source: https://github.com/marcus/marcus-skills/tree/main/skills/claude-code-metadata
Command: npx skills add https://github.com/marcus/marcus-skills --skill claude-code-metadata

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Claude Code users often struggle to understand and access their local data storage, session records, and metadata across tools. This guide delivers a comprehensive reference to local data formats, helping teams design dashboards, migrations, and data-tools that operate on ~/.claude.

Core Features & Use Cases

  • JSONL session schema overview, including parent-child tracing and usage fields.
  • Stats-cache.json structure, daily activity summaries, and model usage for analytics.
  • Directory layout mapping (e.g., ~/.claude and projects) to support data migrations and tooling.

Quick Start

Summarize the ~/.claude directory structure and key data files to bootstrap a data-model for analytics.

Frequently Asked Questions about claude-code-metadata

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the structure of Claude Code's local JSONL session files?

The stats-cache.json file records daily activity summaries and model usage metrics for Claude Code sessions. This format enables analytics dashboards to track engagement patterns and operational statistics across local session data.

How do I map the ~/.claude directory layout for data migrations?

You can map the ~/.claude directory layout by extracting the structural hierarchy of projects and related metadata files. This directory mapping supports data migrations and the development of custom tooling that operates on local session records.

Can I generate a unified data model from Claude Code's local session metadata?

Yes, you can generate a unified data model by formalizing the required schemas for session JSONL, stats-cache.json, file-history, and settings hierarchy. This model links to included references to support dashboards and migrations.

Does this approach work for building analytics dashboards on local Claude Code data?

Yes, this approach works for building analytics dashboards by applying the formalized data model to the ~/.claude data store. It decodes local data architecture to support dashboards, migrations, and tooling without external dependencies.