skills/game-dev/game-analytics/SKILL.md
Analyzes game data metrics for player behavior tracking and performance optimization.
npx skillsauth add alphaonedev/openclaw-graph game-analyticsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill analyzes game data metrics to track player behavior and optimize performance, processing logs, sessions, and metrics from games.
Use this skill for processing in-game data during development, such as identifying player drop-off in levels, optimizing resource usage, or debugging performance bottlenecks in real-time multiplayer games.
claw game-analytics parse --input logs.json).GET /api/analytics/reports/heatmap?gameId=123.metrics: [latency > 500ms]).claw game-analytics predict --model churn.json.Always initialize with authentication via environment variable $GAME_ANALYTICS_API_KEY. For CLI, run commands in a project directory with game data files. In code, import as a module and call functions directly. Use asynchronous patterns for large datasets to avoid blocking. For example, chain commands: first parse data, then analyze. Handle outputs as JSON streams for piping to other tools.
claw game-analytics analyze --file data.json --metric player-session --output report.csv (parses file, filters by metric, saves to CSV; requires $GAME_ANALYTICS_API_KEY).POST /api/analytics/track with body { "event": "player_login", "data": { "sessionId": "abc123", "timestamp": "2023-10-01T12:00:00Z" } } (sends tracking data; authenticate with Bearer token from $GAME_ANALYTICS_API_KEY).import claw
api_key = os.environ.get('GAME_ANALYTICS_API_KEY')
response = claw.analytics.track(event='level_complete', data={'level': 5}, api_key=api_key)
print(response.json())
metrics:
- name: session_length
threshold: 300 # seconds
filters:
- player_type: 'new'
Load with claw game-analytics load-config config.yaml.Integrate by setting $GAME_ANALYTICS_API_KEY in your environment before running commands. For web apps, use OAuth via claw game-analytics auth --provider google to get a token. In Node.js projects, require the module and handle promises:
const claw = require('claw');
claw.analytics.setKey(process.env.GAME_ANALYTICS_API_KEY);
claw.analytics.analyze({ file: 'data.json' }).then(data => console.log(data));
Ensure data formats match (e.g., JSON inputs only). For cluster integration, link with 'game-dev' tools by prefixing commands, like claw game-dev game-analytics analyze.
Check for errors by inspecting exit codes in CLI (e.g., code 401 means auth failure; retry with claw game-analytics retry --command analyze). In API calls, catch HTTP errors: if status 403, log "Invalid API key" and prompt for $GAME_ANALYTICS_API_KEY reset. Use try-except in code snippets:
try:
result = claw.analytics.analyze(file='data.json')
except claw.AnalyticsError as e:
if e.code == 'AUTH_FAILED':
print("Set GAME_ANALYTICS_API_KEY and retry")
Always validate inputs before processing to avoid parsing errors (e.g., ensure JSON is well-formed).
claw game-analytics analyze --file player_logs.json --metric drop-off to identify levels with high quit rates. Use the output to adjust game design, e.g., via API: POST /api/analytics/optimize with { "suggestions": true }.claw game-analytics load-config perf.yaml, then execute claw game-analytics query --metric latency --filter 'server=prod' to get reports. Integrate into a CI/CD pipeline to automate checks, using code:
claw.analytics.query({ metric: 'latency' }).then(results => {
if (results.avg > 100) console.log('Optimize server');
});
tools
Root web development: project structure, tooling selection, deployment decisions
development
WebAssembly: Rust/Go/C to WASM, wasm-bindgen, Emscripten, WASM Component Model
development
Vue 3: Composition API script setup, Pinia, Vue Router 4, SFCs, Vite, Nuxt 3
tools
Tailwind CSS 4: utility classes, config, JIT, arbitrary values, darkMode, plugins, shadcn/ui