widescreen-research: Command for Claude Code

.claude/commands/games/hooks/README.md

README is a command for Claude Code from glassBead-tc/widescreen-research. It costs 0 tokens per session (3,095 once invoked), scanned A, original, MIT.

A set of hooks that checks whether required stages of game-like development workflows have been completed before allowing them to continue.

In plain words
What is it for?
Use it with Claude Code workflows to validate gates around file edits and record tool actions using project configuration and shell scripts.
Why use it?
It reduces inconsistent decisions by replacing subjective stage checks with scripts that can block progress and report what is missing.

Command for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

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

Reuse

Borrowing it

Nothing to install: this file belongs to glassBead-tc/widescreen-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/glassBead-tc/widescreen-research/main/.claude/commands/games/hooks/README.md
Clone the repo
git clone --depth 1 https://github.com/glassBead-tc/widescreen-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 README

README.md
[![agentmods](https://agentmods.dev/badge/commands/glassbead-tc/widescreen-research/readme.svg)](https://agentmods.dev/commands/glassbead-tc/widescreen-research/readme)
Your own site
<a href="https://agentmods.dev/commands/glassbead-tc/widescreen-research/readme"><img src="https://agentmods.dev/badge/commands/glassbead-tc/widescreen-research/readme.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,095 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.00000 $0.03095
Opus 5 $0.00000 $0.01548
Sonnet 5 $0.00000 $0.00619
Haiku 4.5 $0.00000 $0.00310

Measured 6d ago against content hash 5c648ccd1f86, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

README 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 6d 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/games/hooks/README.md · 491 lines

How it starts

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

Deterministic Workflow Hooks for Game Commands

Problem Statement

The game workflows (Ulysses Protocol, Feature Implementation Game, etc.) have explicit stage gates but rely on agent inference to determine if criteria are met. This creates non-determinism where we want determinism.

Solution: Enforced Stage Gates via Hooks

Use Claude Code's hook system to programmatically validate gate criteria before allowing workflow progression.

Architecture

Game Workflow State (.game-state/)
  ↓
Pre/Post Tool Hooks
  ↓
Gate Validation Scripts
  ↓
PASS → Allow progression
FAIL → Block + Provide actionable feedback

Hook Configuration

Add to your Claude settings (~/.config/claude-code/settings.json or project-local):

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write|Edit",
        "hooks": [
          {
            "type": "command",
            "command": ".claude/commands/games/hooks/validate-gate.sh"
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": ".claude/commands/games/hooks/record-action.sh"
          }
        ]
      }
    ],
    "UserPromptSubmit": [
      {
        "matcher": ".*",
        "hooks": [
          {
            "type": "command",
            "command": ".claude/commands/games/hooks/inject-game-state.sh"
          }
        ]
      }
    ]
  }
}

Hook Types

1. Gate Validation Hooks (PreToolUse)

Purpose: Block actions that violate current stage gate requirements

Example: In Ulysses Protocol Phase 2, block implementation tools until planning gate passes

# .claude/commands/games/hooks/validate-gate.sh
#!/bin/bash
# Reads tool call from stdin, checks current game state, blocks if gate not passed

STATE_FILE=".ulysses-protocol/state.json"

if [ ! -f "$STATE_FILE" ]; then
  # No active game, allow
  exit 0
fi

# Read tool call from stdin
TOOL_INPUT=$(cat)
TOOL_NAME=$(echo "$TOOL_INPUT" | jq -r '.toolName')
CURRENT_PHASE=$(jq -r '.phase' "$STATE_FILE")

# Enforce phase gates
case "$CURRENT_PHASE" in
  1) # Reconnaissance phase
     if [[ "$TOOL_NAME" == "Write" ]] || [[ "$TOOL_NAME" == "Edit" ]]; then
       GATE_PASSED=$(jq -r '.gates.reconnaissance.passed' "$STATE_FILE")
       if [ "$GATE_PASSED" != "true" ]; then
         # Block and provide feedback
         cat << EOF
{
  "block": true,
  "message": "🚫 Gate Violation: Cannot proceed to implementation. Reconnaissance gate not passed.\n\nMissing requirements:\n$(jq -r '.gates.reconnaissance.missing[]' "$STATE_FILE")\n\nRun: /ulysses-gate-check to see status"
}
EOF
         exit 1
       fi
     fi
     ;;
esac

exit 0  # Allow

Read the full file on GitHub · 491 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. 6d ago First seen · 491 lines · 0 tokens per session scan A 5c648ccd1f86

Subscribe to this mod's changes

README is a command published in the GitHub repository glassBead-tc/widescreen-research (6 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,095 tokens. 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.