gameplay-analytics

gameplay-analytics is a skill for Claude Code from fcsouza/agent-skills. It costs 78 tokens per session (1,846 once invoked), scanned A, original, MIT.

A game analytics guide for recording player actions and studying how players return, progress, and interact with a game. Retention measures how many players come back after a set number of days, such as day 1, day 7, or day 30.

In plain words
What is it for?
Use it to add gameplay telemetry, track sessions and events, build engagement funnels, and measure D1, D7, or D30 retention.
Why use it?
It helps replace guesswork about player behavior with tracked events, return rates, and engagement paths.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the game-dev plugin — 39 skills shipped together

Good fit Use it to add gameplay telemetry, track sessions and events, build engagement funnels, and measure D1, D7, or D30 retention.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fcsouza/agent-skills/gameplay-analytics
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.

Any agent
npx skills add fcsouza/agent-skills --skill gameplay-analytics
Clone the repo
git clone --depth 1 https://github.com/fcsouza/agent-skills

Made for: Claude Code.

Or install game-dev, the plugin that ships this one along with the rest of its 39 skills.

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 gameplay-analytics

README.md
[![agentmods](https://agentmods.dev/badge/skills/fcsouza/agent-skills/gameplay-analytics/github.svg)](https://agentmods.dev/skills/fcsouza/agent-skills/gameplay-analytics)
Your own site
<a href="https://agentmods.dev/skills/fcsouza/agent-skills/gameplay-analytics"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/gameplay-analytics/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 gameplay-analytics

Your own site · 80×15
<a href="https://agentmods.dev/skills/fcsouza/agent-skills/gameplay-analytics"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/gameplay-analytics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,846 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.00078 $0.01846
Opus 5.5 $0.00031 $0.00738
Sonnet 5.5 $0.00016 $0.00369
Haiku 4.5 $0.00008 $0.00185

Measured today against content hash 67844e9779fd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gameplay-analytics 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 today.

The scan reads SKILL.md. This mod also ships 2 executable files (boilerplate/analytics-client.ts, boilerplate/analytics-schema.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/gameplay-analytics/SKILL.md · 94 lines

How it starts

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

Gameplay Analytics

Events go from the game server into a Redis list, a single worker drains the list into PostgreSQL in batches, and retention and funnels run as SQL over the stored tables.

Rules

  1. Name events noun_verb, snake_case, past tense for finished actions: level_completed, item_purchased, match_ended. Keep a finite catalog in templates/event-catalog.md; an event not in the catalog does not ship.
  2. Every event carries userId, sessionId, createdAt, version, platform. The client fills them. It drops events tracked before a session starts instead of filing them under a fake session id.
  3. Never block gameplay on analytics. track() returns at once and never throws. A Redis outage loses events, not frames.
  4. Buffer in Redis, insert in batches. track() does LPUSH. One worker per Redis key runs flush(), which reads the oldest batch from the list tail, inserts it, then trims it. The insert skips ids that already exist, so a crash between insert and trim replays safely. Two flushers on one key insert the same batch twice and trim twice, losing events.
  5. Track sessions explicitly: start, heartbeat, end. Do not infer sessions from gaps between events. Players crash and lose network without sending end, so run closeIdleSessions(db, idleMs) on a schedule with idleMs set to a few heartbeat intervals.
  6. Retention is cohort-based. A cohort is the UTC day of a player's first session. D is the share of a cohort with a session on exactly cohort day + N. Report a cohort only after its day N has ended. "Players active yesterday" is DAU, not retention.
  7. Funnels are ordered. A player counts at step K only after doing step K-1. Choose the key on purpose: session_id for flows that must finish in one sitting (tutorial, first match), user_id for flows across sessions (install to first purchase). The query is in templates/retention-dashboard.md.
  8. Store UTC, compute days in UTC. Use (now() AT TIME ZONE 'UTC')::date for today. CURRENT_DATE follows the connection's time zone.
  9. Keep analytics tables apart from gameplay tables. They are append-only, large and read by different queries.
  10. Tag experiments on the event, do not fork code paths for analytics. Put experimentId and variant in properties and group by them in SQL.

Read the full file on GitHub · 94 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. today Changed · +5 lines 67844e9779fd
  2. 19d ago Changed · -123 lines · +15 tokens per session a7e3f3050f18
  3. 3mo ago First seen · 212 lines · 63 tokens per session scan A abbafdf1f896

Subscribe to this mod's changes

gameplay-analytics is a skill published in the GitHub repository fcsouza/agent-skills (29 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 1,846 once invoked, about $0.0003 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.

Related

gameplay-analytics compared with skills from other repositories

gameplay-analytics next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gameplay-analyticsfcsouza/agent-skillsSkill29todayMITA78Claude Code
playtest-reportDonchitos/Claude-Code-Game-StudiosSkill42k24d agoMITA20Claude Code
godot-signals-groupsgamedev-skills/awesome-gamedev-agent-skillsSkill13k3d agoApache-2.0A93Claude Code
scenario-unreal-gameplayscenario-labs/skillsSkill4.7kyesterdayMITA121Claude Code
texture-workflowarjun988/blender-skillsSkill5.8k27d agoMITA41Claude Code
motionOpenDCAI/GameFactory-3ASkill1.6kyesterdayApache-2.0A0Claude Code, Codex
gamedev-shadersericrisco/rsc-harnessSkill707yesterdayMITA102Claude Code, Codex