dragonruby

dragonruby is a skill for Claude Code, Codex from hoblin/claude-ruby-marketplace. It costs 100 tokens per session (1,833 once invoked), scanned A, original, MIT.

A development guide for DragonRuby Game Toolkit, a Ruby-based toolkit for building 2D games.

In plain words
What is it for?
Creating game loops, rendering sprites and other objects, reading keyboard, mouse, or controller input, animating scenes, managing game state, and implementing collision detection.
Why use it?
It provides patterns for organising the game loop, storing game state, handling player input, drawing objects, and detecting collisions.

Skill for Claude CodeCodex

Part of the dragonruby plugin — 1 skill shipped together

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 skills/hoblin/claude-ruby-marketplace/dragonruby
Any agent
npx skills add hoblin/claude-ruby-marketplace --skill dragonruby
Clone the repo
git clone --depth 1 https://github.com/hoblin/claude-ruby-marketplace

Made for: Claude Code, Codex.

Or install dragonruby, the plugin that ships this one along with the rest of its 1 skill.

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 dragonruby

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoblin/claude-ruby-marketplace/dragonruby.svg)](https://agentmods.dev/skills/hoblin/claude-ruby-marketplace/dragonruby)
Your own site
<a href="https://agentmods.dev/skills/hoblin/claude-ruby-marketplace/dragonruby"><img src="https://agentmods.dev/badge/skills/hoblin/claude-ruby-marketplace/dragonruby.svg" alt="Measured on agentmods" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,833 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.00100 $0.01833
Opus 5 $0.00050 $0.00916
Sonnet 5 $0.00020 $0.00367
Haiku 4.5 $0.00010 $0.00183

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

Security

Grade A, and why

dragonruby 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 3d ago.

The scan reads SKILL.md. This mod also ships 43 executable files (examples/audio/audio_events.rb, examples/audio/background_music.rb, examples/audio/crossfade.rb, …), 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.

plugins/dragonruby/skills/dragonruby/SKILL.md · 258 lines

How it starts

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

DragonRuby Game Toolkit

This skill provides comprehensive guidance for building 2D games with DragonRuby Game Toolkit (DRGTK). Use for game loop implementation, sprite rendering, input handling, collision detection, animation, and scene management.

Quick Reference

Basic Game Structure

def boot args
  args.state = {}
end

def tick args
  # Called 60 times per second
  args.state.player ||= { x: 640, y: 360, w: 50, h: 50, path: 'player.png' }

  # Handle input
  args.state.player.x += 5 if args.inputs.right
  args.state.player.x -= 5 if args.inputs.left

  # Render
  args.outputs.sprites << args.state.player
end

Key Concepts

Concept Purpose
def tick(args) Main game loop (60 FPS)
args.outputs Render sprites, labels, primitives
args.state Persistent game data storage
args.inputs Keyboard, mouse, controller input
args.grid Screen dimensions (1280x720)
Geometry Collision detection helpers

Coordinate System

  • Screen: 1280x720 pixels
  • Origin: Bottom-left (0, 0)
  • Y-axis: Increases upward
(0, 720) ─────────────── (1280, 720)
    │                        │
    │     1280 × 720         │
    │                        │
(0, 0) ─────────────── (1280, 0)

Rendering Primitives

Use args.outputs.primitives for FIFO (first-in, first-out) render order control.

Sprites (Images)

args.outputs.primitives << {
  x: 100, y: 100, w: 64, h: 64,
  path: 'sprites/player.png',
  angle: 45,
  anchor_x: 0.5, anchor_y: 0.5,
  r: 255, g: 255, b: 255, a: 255,
  flip_horizontally: false
}

Labels (Text)

args.outputs.primitives << {
  x: 640, y: 360,
  text: "Score: #{args.state.score}",
  size_px: 22,
  anchor_x: 0.5, anchor_y: 0.5,
  r: 255, g: 255, b: 255
}

Solids and Borders

# Filled rectangle (use primitive_marker: :solid)
args.outputs.primitives << {
  x: 0, y: 0, w: 100, h: 100,
  r: 255, g: 0, b: 0,
  primitive_marker: :solid
}

# For many rectangles, use path: :solid for better performance
args.outputs.primitives << { x: 0, y: 0, w: 100, h: 100, path: :solid, r: 255, g: 0, b: 0 }

# Outline rectangle
args.outputs.primitives << { x: 0, y: 0, w: 100, h: 100, r: 0, g: 0, b: 0, primitive_marker: :border }

Read the full file on GitHub · 258 lines

Files

What ships with it

58 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. 3d ago First seen · 258 lines · 100 tokens per session scan A dd0fc1f77720

Subscribe to this mod's changes

dragonruby is a skill published in the GitHub repository hoblin/claude-ruby-marketplace (36 stars, last pushed 24d ago), licensed MIT. It adds 100 tokens to every session and 1,833 once invoked, about $0.0005 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.

Related

Other skills, from other repositories