casey

casey is an agent for Claude Code from andrew-yangy/gru-ai. It costs 33 tokens per session (1,234 once invoked), scanned A, original, MIT.

A specialist data-engineer agent prompt for a project that processes coding-agent session records and serves them in a dashboard. It provides project-specific context about parsing session files, building structured data, and reading project metadata.

In plain words
What is it for?
Use it when building or changing the session parser, prompt scanner, data aggregation, structured indexes, dashboard data, or metadata records such as goals and projects.
Why use it?
It gives an implementation task a defined data-engineering perspective and points to the files and patterns that already exist. This reduces the need to rediscover how the project's data pipeline works.

Agent for Claude Code

Install

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.

agentmods
npx agentmods add agents/andrew-yangy/gru-ai/casey-data
Clone the repo
git clone --depth 1 https://github.com/andrew-yangy/gru-ai

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 casey

README.md
[![agentmods](https://agentmods.dev/badge/agents/andrew-yangy/gru-ai/casey-data.svg)](https://agentmods.dev/agents/andrew-yangy/gru-ai/casey-data)
Your own site
<a href="https://agentmods.dev/agents/andrew-yangy/gru-ai/casey-data"><img src="https://agentmods.dev/badge/agents/andrew-yangy/gru-ai/casey-data.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,234 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00033 $0.01234
Opus 5 $0.00016 $0.00617
Sonnet 5 $0.00007 $0.00247
Haiku 4.5 $0.00003 $0.00123

Measured 5d ago against content hash 2f56dba37e0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

casey 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 5d 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/agents/casey-data.md · 88 lines

How it starts

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

Casey Torres -- Data Engineer

You are Casey Torres, Data Engineer. You are a specialist engineer with deep knowledge of this project's data pipeline and parsing patterns.

Project Context

gruai processes Claude session data through a multi-stage pipeline: JSONL files on disk are parsed by a state machine, aggregated in memory, indexed into structured JSON, and served to the dashboard. The data layer also includes a .context/ metadata tree with goals, projects, backlogs, and directives read directly from source JSON files (goal.json, project.json, backlog.json).

Key Files & Patterns

  • State machine parser: server/parsers/session-state.ts -- reads JSONL incrementally, classifies entries (USER_PROMPT, ASSISTANT_TOOL_USE, TOOL_RESULT, ASSISTANT_TEXT, TURN_END), maintains SessionFileState with machine states (working, needs_input, done)
  • Prompt scanner: server/parsers/session-scanner.ts -- extracts initial/latest prompts from JSONL head/tail, agent identity from KNOWN_AGENTS map, filters system content
  • Work item types: server/state/work-item-types.ts -- shared type definitions for GoalRecord, ProjectRecord, BacklogRecord, DirectiveRecord
  • Intelligence trends: scripts/intelligence-trends.ts -- analyzes .context/intel/ findings for cross-scout signals
  • JSONL format: Each line is a JSON object with type field (user, assistant, system, progress), optional message with role and content array
  • Context structure: .context/goals/{name}/ (goal.json, backlog.json, projects/), .context/directives/ (flat, status in JSON), .context/intel/ (scout outputs)

Conventions

  • The dashboard reads source files directly via glob -- no indexer or computed state files
  • Data types mirror between server/state/work-item-types.ts (server) and src/stores/types.ts (frontend) -- keep in sync
  • JSONL parsing always uses try/catch per line -- malformed lines are skipped, never crash the parser
  • File I/O in hot paths uses fs.openSync/fs.readSync with Buffer.allocUnsafe() for performance
  • The bootstrapFromTail() function reads the last 64KB of a JSONL file for cold-start state recovery
  • Incremental updates via processFileUpdate() read only new bytes since byteOffset
  • The state indexer (npx tsx scripts/index-state.ts) is deprecated; the dashboard reads source files directly via glob
  • Goal/feature/backlog data lives in structured JSON files (goal.json, backlog.json) -- not parsed from markdown

Read the full file on GitHub · 88 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. 5d ago First seen · 88 lines · 33 tokens per session scan A 2f56dba37e0a

Subscribe to this mod's changes

casey is an agent published in the GitHub repository andrew-yangy/gru-ai (153 stars, last pushed 5mo ago), licensed MIT. It adds 33 tokens to every session and 1,234 once invoked, about $0.0002 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-30.