lifesciences-research: Command for Claude Code

.claude/commands/graphiti-aura-stats.md

graphiti-aura-stats is a command for Claude Code from donbr/lifesciences-research. It costs 13 tokens per session (1,867 once invoked), scanned A, original, MIT.

A command that queries a production Neo4j Aura graph and summarizes its stored entities and namespaces. Neo4j Aura is Neo4j's managed cloud database service.

In plain words
What is it for?
Use it to inspect episode counts by namespace, total entities, and the most common entity types in the production graph.
Why use it?
It provides counts and distributions needed to understand production data growth and plan database capacity.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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

Reuse

Borrowing it

Nothing to install: this file belongs to donbr/lifesciences-research. 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/donbr/lifesciences-research/main/.claude/commands/graphiti-aura-stats.md
Clone the repo
git clone --depth 1 https://github.com/donbr/lifesciences-research

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 graphiti-aura-stats

README.md
[![agentmods](https://agentmods.dev/badge/commands/donbr/lifesciences-research/graphiti-aura-stats/github.svg)](https://agentmods.dev/commands/donbr/lifesciences-research/graphiti-aura-stats)
Your own site
<a href="https://agentmods.dev/commands/donbr/lifesciences-research/graphiti-aura-stats"><img src="https://agentmods.dev/badge/commands/donbr/lifesciences-research/graphiti-aura-stats/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 graphiti-aura-stats

Your own site · 80×15
<a href="https://agentmods.dev/commands/donbr/lifesciences-research/graphiti-aura-stats"><img src="https://agentmods.dev/badge/commands/donbr/lifesciences-research/graphiti-aura-stats.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 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,867 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.00013 $0.01867
Opus 5 $0.00006 $0.00933
Sonnet 5 $0.00003 $0.00373
Haiku 4.5 $0.00001 $0.00187

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

Security

Grade A, and why

graphiti-aura-stats 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/commands/graphiti-aura-stats.md · 228 lines

How it starts

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

Generate comprehensive production graph statistics for Neo4j Aura analytics and capacity planning.

Instructions

Execute these queries sequentially to build a complete analytics report. Report results to the user in a formatted summary.

Query 1: Episode Distribution by Namespace

mcp__neo4j-aura-cypher__read_neo4j_cypher(
    query="""
    MATCH (e:Episodic)
    RETURN e.group_id AS namespace,
           count(*) AS episodes,
           min(e.created_at) AS first_episode,
           max(e.created_at) AS last_episode
    ORDER BY episodes DESC
    """
)

Purpose: Shows which namespaces contain data and identifies growth patterns.

Query 2: Total Entity Count

mcp__neo4j-aura-cypher__read_neo4j_cypher(
    query="""
    MATCH (n:Entity)
    RETURN count(n) AS total_entities
    """
)

Purpose: Get total entity count for summary statistics.

Query 3: Entity Type Distribution

mcp__neo4j-aura-cypher__read_neo4j_cypher(
    query="""
    MATCH (n:Entity)
    RETURN labels(n) AS entity_types,
           count(*) AS count
    ORDER BY count DESC
    LIMIT 15
    """
)

Purpose: Breakdown by entity labels (Person, Company, Concept, etc.). Helps validate extraction quality.

Query 4: Relationship Type Frequency

mcp__neo4j-aura-cypher__read_neo4j_cypher(
    query="""
    MATCH ()-[r]->()
    RETURN type(r) AS relationship_type,
           count(*) AS frequency,
           count(CASE WHEN r.invalid_at IS NOT NULL THEN 1 END) AS invalidated_count,
           round(100.0 * count(CASE WHEN r.invalid_at IS NOT NULL THEN 1 END) / count(*), 2) AS invalidation_rate_pct
    ORDER BY frequency DESC
    LIMIT 15
    """
)

Purpose: Most common relationship patterns and invalidation rates. Identifies schema usage and knowledge evolution velocity.

Query 5: Temporal Invalidation Statistics

mcp__neo4j-aura-cypher__read_neo4j_cypher(
    query="""
    MATCH ()-[r]->()
    WHERE r.invalid_at IS NOT NULL AND r.valid_at IS NOT NULL
    RETURN type(r) AS relationship_type,
           count(*) AS total_invalidated,
           round(avg(duration.between(
             datetime(r.valid_at),
             datetime(r.invalid_at)
           ).seconds) / 3600.0, 2) AS avg_lifetime_hours
    ORDER BY total_invalidated DESC
    LIMIT 10
    """
)

Read the full file on GitHub · 228 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 · 228 lines · 13 tokens per session scan A 7a76103c818a

Subscribe to this mod's changes

graphiti-aura-stats is a command published in the GitHub repository donbr/lifesciences-research (7 stars, last pushed 8d ago), licensed MIT. It adds 13 tokens to every session and 1,867 once invoked, about $0.0001 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.