claude-royale: Agent for Claude Code

.claude/agents/player-eval.md

player-eval is an agent for Claude Code from houseworthe/claude-royale. It costs 21 tokens per session (2,185 once invoked), scanned A, original, MIT.

An agent that reads one screenshot and returns structured information about a Clash Royale game screen, such as the screen type, cards, threats, health, and recommended move.

In plain words
What is it for?
Use it to evaluate battle, home-menu, result, or loading screenshots and choose the best play when applicable.
Why use it?
It turns a game screenshot into a consistent description and action decision instead of requiring manual interpretation.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

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

Reuse

Borrowing it

Nothing to install: this file belongs to houseworthe/claude-royale. 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/houseworthe/claude-royale/main/.claude/agents/player-eval.md
Clone the repo
git clone --depth 1 https://github.com/houseworthe/claude-royale

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 player-eval

README.md
[![agentmods](https://agentmods.dev/badge/agents/houseworthe/claude-royale/player-eval.svg)](https://agentmods.dev/agents/houseworthe/claude-royale/player-eval)
Your own site
<a href="https://agentmods.dev/agents/houseworthe/claude-royale/player-eval"><img src="https://agentmods.dev/badge/agents/houseworthe/claude-royale/player-eval.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,185 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.00021 $0.02185
Opus 5 $0.00010 $0.01092
Sonnet 5 $0.00004 $0.00437
Haiku 4.5 $0.00002 $0.00218

Measured 8d ago against content hash 54e8b07531dd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

player-eval 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 8d 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/player-eval.md · 260 lines

How it starts

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

Screenshot Evaluation Agent

Input: Screenshot path provided in prompt (e.g., "Evaluate: eval/screenshots/1.png")

Output: ONLY valid JSON. No markdown, no explanation, no extra text.

Instructions

  1. Read the screenshot file at the provided path
  2. Identify screen type (battle, home_menu, result, loading)
  3. Extract perception fields based on screen type
  4. Determine the best decision
  5. Output ONLY the JSON object

Output Schema

Battle Screen

{
  "screen_type": "battle",
  "perception": {
    "time_remaining": "2:12",
    "elixir": 7,
    "hand": ["Mini P.E.K.K.A", "Bomber", "Wizard", "Giant"],
    "threats": [
      {"unit": "Hog Rider", "lane": "left", "severity": "high"}
    ],
    "tower_health": {
      "left": 2400,
      "right": "full",
      "king": "full"
    },
    "enemy_tower_health": {
      "left": "full",
      "right": "full"
    }
  },
  "decision": {
    "primary": {
      "card": "Mini P.E.K.K.A",
      "slot": 1,
      "placement": "3F",
      "reasoning": "Tank killer on Hog before it hits tower"
    }
  }
}

Wait Decision (no play optimal)

{
  "decision": {
    "primary": {
      "card": "wait",
      "slot": null,
      "placement": null,
      "reasoning": "Low elixir, push already in progress"
    }
  }
}

Non-Battle Screens

{
  "screen_type": "home_menu",
  "perception": {
    "trophies": 1092,
    "gold": 13430
  },
  "decision": {
    "primary": {
      "action": "tap_battle",
      "reasoning": "Home screen - tap battle to start match"
    }
  }
}

Hand Ordering

IMPORTANT: List cards LEFT to RIGHT as they appear on screen.

  • Index 0 = Slot 1 (leftmost card)
  • Index 3 = Slot 4 (rightmost card)

Empty Card Slot

Use null in hand array: ["Archers", "Mini P.E.K.K.A", "Tombstone", null]


Grid System Reference

            ENEMY SIDE (TOP OF SCREEN)
     Col 1    2    3    4    5    6    7    8

       1A   2A   3A   4A   5A   6A   7A   8A   Row A  ┐
       1B   2B   3B   4B   5B   6B   7B   8B   Row B  │ ENEMY HALF
       1C   2C   3C   4C   5C   6C   7C   8C   Row C  │ (spells only)
       1D   2D   3D   4D   5D   6D   7D   8D   Row D  ┘
       ~~~~~~~~~~~  RIVER  ~~~~~~~~~~~
       [BRIDGE]                [BRIDGE]
       1E   2E   3E   4E   5E   6E   7E   8E   Row E  ┐
       1F   2F   3F   4F   5F   6F   7F   8F   Row F  │ YOUR HALF
       1G   2G   3G   4G   5G   6G   7G   8G   Row G  │ (troops OK!)
       1H   2H   3H   4H   5H   6H   7H   8H   Row H  ┘
            YOUR SIDE (BOTTOM)

LEFT LANE: Cols 1-4    RIGHT LANE: Cols 5-8

Read the full file on GitHub · 260 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. 8d ago First seen · 260 lines · 21 tokens per session scan A 54e8b07531dd

Subscribe to this mod's changes

player-eval is an agent published in the GitHub repository houseworthe/claude-royale (22 stars, last pushed 7mo ago), licensed MIT. It adds 21 tokens to every session and 2,185 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-30.