← Back to Skills Marketplace
sbauch

Looper Golf

by sbauch · GitHub ↗ · v1.0.2
cross-platform ✓ Security Clean
1111
Downloads
2
Stars
1
Active Installs
3
Versions
Install in OpenClaw
/install looper-golf
Description
Play a round of golf using CLI tools — autonomously or with a human caddy.
README (SKILL.md)

Looper Golf

You are an AI golfer. You can play autonomously or collaborate with a human caddy, and switch between styles at any point during a round.

CRITICAL RULES

  1. ONLY use the CLI commands listed below. Never make direct HTTP requests, curl calls, or try to access API endpoints. The CLI handles all server communication internally.
  2. ALWAYS run look at the start of every hole.
  3. ALWAYS run bearing before every hit. Never guess an aim angle — calculate it.
  4. Never use aim 0 or aim 180 unless bearing actually returned that value.
  5. Read your target's coordinates directly from the map — every cell shows symbol(right) and the row label is the ahead value.

Available Commands

These are the ONLY commands you use. Each one is a subcommand of the CLI tool:

Command Usage
register node "{baseDir}/cli.js" register --inviteCode \x3Ccode> --name "Name"
courses node "{baseDir}/cli.js" courses
start node "{baseDir}/cli.js" start --courseId \x3Cid>
look node "{baseDir}/cli.js" look
bearing node "{baseDir}/cli.js" bearing --ahead \x3Cyards> --right \x3Cyards>
hit node "{baseDir}/cli.js" hit --club \x3Cname> --aim \x3Cdegrees> --power \x3C1-100>
view node "{baseDir}/cli.js" view
scorecard node "{baseDir}/cli.js" scorecard
prepare-round node "{baseDir}/cli.js" prepare-round --courseId \x3Cid>

Setup

Rounds require an on-chain transaction before you can play. You cannot start a round from the CLI alone.

Step 1: Get an invite code

Ask the course owner to generate an invite code from the web app. They click "Generate Agent Invite" and give you the code (format: GOLF-XXXXXXXX). Codes expire after 1 hour.

Step 2: Register (one-time)

node "{baseDir}/cli.js" register --inviteCode \x3Ccode> --name "Your Name"

This creates your agent identity, binds it to the owner's course, and saves credentials to agent.json.

Step 3: Start a round (on-chain)

There are two ways to start a round:

Option A — Agent Play (course owner starts from web app): The course owner clicks "Play via Agent" in the web app. This calls GameContract.startRound(playerCourseId, hostCourseId, 2) on-chain. The game server picks up the event and creates a round for your agent automatically. No wallet needed on your end.

Option B — Start on-chain yourself (requires a wallet skill): If the course owner has added your wallet as an approved signer on the course's TBA (Token Bound Account), you can start rounds yourself using the prepare-round command:

node "{baseDir}/cli.js" prepare-round --courseId \x3ChostCourseId>

This outputs a JSON transaction object ({to, data, value, chainId}) that you submit via your wallet. The transaction calls CourseTBA.execute() which invokes GameContract.startRound() with mode 2 (agent play). After the transaction confirms, the game server's indexer picks up the event and creates the round.

Security note: The prepare-round command generates raw EVM calldata. Before submitting, verify that the to address matches your known Course TBA and the chainId matches Base Sepolia (84532). The value should always be "0". Never submit transaction data from this command to addresses you don't recognize.

Wallet requirement: Option B requires a wallet skill that can submit arbitrary EVM transactions. Bankr is a known compatible wallet skill. Any wallet skill that can submit a raw transaction ({to, data, value, chainId}) will work.

Step 4: Resume and play

Once a round is started on-chain (via either option), use start to pick it up:

node "{baseDir}/cli.js" courses
node "{baseDir}/cli.js" start --courseId \x3Cid>

The start command finds your active round on the course and resumes it. If no round exists, it will tell you.

Start options: --teeColor \x3Ccolor>, --yardsPerCell \x3C2-20>, --mapFormat \x3Cgrid|ascii>.

Play Modes

You support two play modes. The user can switch between them at any time — even mid-hole. Default to caddy mode unless the user asks you to play autonomously.

Caddy Mode (default)

You are the golfer. The human is your caddy. Before each shot:

  1. Run look and share the map with the user
  2. Analyze the hole — identify hazards, suggest a target, recommend club and power
  3. Ask your caddy for their read before hitting. They may agree, suggest adjustments, or offer a different perspective
  4. Consider their advice, then make your call — run bearing and hit

You make the final decision on every shot, but your caddy knows the course. Listen to their advice and factor it into your thinking.

Autonomous Mode

You make all decisions yourself. Use the shot workflow below without pausing for input. This is efficient for playing many holes quickly.

Per-hole subagents (recommended for multiple holes): When playing more than 1-2 holes autonomously, spawn a fresh subagent for each hole to keep context clean. Each subagent plays one hole, reports the score, then you spawn the next. Key rules:

  • One hole per subagent — spawn with clean context (contextMessages: 0)
  • Sequential only — never play holes in parallel (server state is sequential)
  • Include the shot workflow and map-reading instructions in each subagent's task prompt
  • Round state persists server-side, so a new subagent picks up exactly where the last left off

Switching Modes

The user can say things like:

  • "Play the front 9 on your own, then let's do the back 9 together" → autonomous for holes 1-9, caddy mode for 10-18
  • "Go ahead and finish this hole" → switch to autonomous for the current hole
  • "Hold on, let me see this shot" → switch to caddy mode immediately
  • "Play the next 3 holes, then check back in" → autonomous for 3 holes, then caddy mode

Always respect the user's request. When finishing an autonomous stretch, show the scorecard and ask the user how they'd like to continue.

Shot Workflow (repeat for every shot)

  1. looknode "{baseDir}/cli.js" look
  2. Read coordinates — Find your target on the map. Read ahead from the row label, right from the parentheses.
  3. bearingnode "{baseDir}/cli.js" bearing --ahead \x3Cyards> --right \x3Cyards> to get the exact aim angle and distance.
  4. hitnode "{baseDir}/cli.js" hit --club \x3Cname> --aim \x3Cdegrees> --power \x3Cpercent> using the aim from bearing.

Reading the Map

The look command shows each row labeled with yards AHEAD of your ball (positive = toward green, negative = behind). Cells use two formats:

  • TYPE(X) — single cell at X yards right of ball
  • TYPE(START:END) — consecutive cells of same type spanning START to END yards right

Flag F and ball O are always shown as single cells.

Consecutive rows with identical terrain may be merged into Y-ranges (e.g., 10-20y: means rows from 10y to 20y ahead all share the same terrain). This does not apply on the green, where every row is shown individually.

Example:

   200y: .(-20) F(-15) G(-15:0) g(5)
90-148y: .(-25:10)
    50y: T(-15:-10) .(-5:5)
     0y: .(-10:-5) O(0) .(5:10)

To find a target's coordinates:

  1. Find the symbol (e.g., F(-15) on the 200y row)
  2. The row label is the ahead value → 200 (for merged rows like 90-148y, use any value in that range)
  3. The number in parentheses is the right value → -15
  4. Run bearing --ahead 200 --right -15

For ranges like G(-15:0), the green spans from 15y left to center — pick any value in that range as right.

Your ball is O(0) at row 0y.

On tee shots, the map trims boring fairway rows near the tee. On the green, only green-area rows are shown and distance is in feet.

Worked Examples

Example 1 — Approach to the flag

Map shows F(-15) on the 200y row.

Run: bearing --ahead 200 --right -15Bearing: 356 deg | Distance: 201 yards

Your 5-iron has 210y total stock. Power = 201/210 * 100 = 96%. Run: hit --club 5-iron --aim 356 --power 96

Example 2 — Tee shot to fairway bend

You want to hit the fairway bend, not the flag. On the 230y row you see .(-5:15). Aim at the center of the range: bearing --ahead 230 --right 5Bearing: 1 deg | Distance: 230 yards Run: hit --club driver --aim 1 --power 85

Map Symbols

  • F = Flag, G = Green, g = Collar, . = Fairway, ; = Rough
  • S = Bunker, s = Greenside bunker, W = Water, T = Tee, O = Your ball

Higher row values = closer to the green. Lower/negative = behind your ball.

Your Bag

Your stock yardages are shown once when you start a round. Distance scales linearly:

  • carry = stockCarry * (power / 100)
  • power = (desiredDistance / stockTotal) * 100

Aim System (for reference — let bearing calculate this for you)

  • 0 = toward green (up on map)
  • 90 = right
  • 180 = backward
  • 270 = left

Wind

The look output includes a Wind line describing the current conditions, e.g.:

Wind: 10 mph from NW (headwind-left)

Wind affects every full shot. Putts are immune.

How wind affects shots

  • Headwind reduces carry distance. A 10 mph headwind on a 200y shot loses ~6 yards.
  • Tailwind adds carry distance. Same shot gains ~6 yards downwind.
  • Crosswind pushes the ball sideways. A 10 mph crosswind drifts a 200y shot ~10 yards.
  • Longer shots are affected more. A driver in wind drifts much further than a wedge.

Adjusting for wind

  • Headwind: Club up (e.g., 5-iron instead of 6-iron) or increase power.
  • Tailwind: Club down or reduce power to avoid overshooting.
  • Crosswind: Aim upwind of your target. If the wind pushes right, aim left. Use bearing to get aim to an offset target.
  • Strong wind (12+ mph): Favor lower-lofted clubs that keep the ball down. Consider laying up rather than attacking a pin near hazards.
  • Calm (\x3C3 mph): Wind is negligible — play normally.

Strategy Tips

  • Off the tee: Aim at the widest part of the fairway, not always the flag.
  • Doglegs: Aim at the bend, not the green.
  • Lay up short of water/bunkers rather than trying to carry them.
  • Putting: Use putter at low power. Read distance carefully.
  • Factor wind into every club and aim decision — check the wind line in look output.
  • A bogey beats a double. Play safe when unsure.
Usage Guidance
This skill appears to do what it says: run a local Node CLI that talks to a game server and stores an agent identity in agent.json. Before installing or using it: 1) Verify you trust https://api.playlooper.xyz — the CLI will obtain and use a bearer token from that server and submit shots and hole info to it. 2) Be careful with the "prepare-round" flow: it generates raw EVM calldata that a wallet skill must submit — only sign/submit transactions you have manually verified (to, chainId, and value). The SKILL.md includes a warning about this; follow it. 3) Note agent.json contains your agentId/apiKey; store it in a secure directory you control (you can set OPENCLAW_GOLF_BASE_DIR). 4) The skill source and homepage are unknown — if you need higher assurance, review the full cli.js file yourself or run the CLI in a sandboxed environment before granting it access to a real wallet skill. 5) Minor docs mismatch: some reference files show dist/cli.js while the top-level CLI is cli.js — this is likely a packaging artifact but worth noting.
Capability Analysis
Type: OpenClaw Skill Name: looper-golf Version: 1.0.2 The skill bundle is designed for playing a golf game via CLI commands and interacting with a remote API. The `SKILL.md` provides clear instructions to the AI agent, including 'CRITICAL RULES' that explicitly forbid direct HTTP requests or `curl` calls, mitigating prompt injection risks for network exfiltration. The `cli.js` code handles arguments safely, without direct shell execution of user input, and includes robust path traversal protection for its state file. While the `cmdPrepareRound` command generates on-chain transaction data based on server-provided configuration (introducing a trust dependency on the game server), the `SKILL.md` explicitly warns the user to verify the transaction details before submission, indicating an awareness of this risk rather than malicious intent by the skill itself. No evidence of intentional data exfiltration, backdoors, or other malicious activities was found.
Capability Assessment
Purpose & Capability
Name/description (CLI golf) match the included JS CLI and the commands documented in SKILL.md. The skill requires only node (declared) and communicates with a single game server (api.playlooper.xyz), which is consistent with playing rounds via a remote service.
Instruction Scope
SKILL.md limits the agent to running the listed CLI commands and to using the CLI for all server communication; the included cli.js implements fetch calls to the game server and persists agent credentials to agent.json — exactly what the instructions describe. The skill also recommends spawning subagents for autonomous play, which is a behavior confined to the skill's domain.
Install Mechanism
No install spec (instruction-only) and only a node binary is required. The package includes a CLI JavaScript file; there are no downloads or archive extraction steps that would introduce additional risk.
Credentials
Registry metadata declares no required env vars; the code and docs accept optional environment variables (OPENCLAW_GOLF_BASE_DIR, OPENCLAW_GOLF_SERVER_URL / GAME_SERVER_URL) and persist agent credentials in agent.json. This is reasonable for a CLI that needs configurable state and a server URL, but the metadata could have been explicit about supported env vars. The skill does not request unrelated secrets or multiple external credentials.
Persistence & Privilege
always:false and normal autonomous-invocation settings. The CLI writes agent.json to a base directory (configurable via OPENCLAW_GOLF_BASE_DIR or defaults to cwd); the code includes a guard against path traversal. Persisting an apiKey/agentId locally is expected for this use case.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install looper-golf
  3. After installation, invoke the skill by name or use /looper-golf
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
- Registration now requires a short-lived invite code from the course owner (`--inviteCode`), replacing the previous `--registrationKey` and course linking workflow. - The `caddy-code` command and corresponding steps have been removed; agent registration is managed entirely via the invite system. - Added a security note for on-chain play: users should verify `prepare-round` transaction details before sending. - Updated CLI usage examples and documentation to reflect the new onboarding process. - No changes to gameplay flow or available play modes.
v1.0.1
**Changelog for looper-golf 1.0.1** - Added new setup steps for on-chain rounds, including agent registration and course owner linking via a `caddy-code`. - Introduced support for on-chain transaction initiation using the `prepare-round` command. - CLI usage updated: the executable path is now `cli.js` (instead of `dist/cli.js`); new commands like `register`, `caddy-code`, and `prepare-round` are available. - Updated map syntax and reading instructions to account for merged terrain rows and symbol range notation. - Removed the obsolete type definition file `cli.d.ts`.
v1.0.0
Initial release of looper-golf — play golf rounds via CLI with autonomous or caddy-assisted modes. - Supports two modes: autonomous play or collaboration with a human caddy (default to caddy mode). - Enforces strict CLI-only gameplay—no direct API or HTTP access. - Provides detailed shot workflow, map reading, and club/power selection instructions. - Enables dynamic mode switching mid-round based on user requests. - Documents all available commands and key usage examples for getting started. - Includes robust map-reading guidance and strategic gameplay tips.
Metadata
Slug looper-golf
Version 1.0.2
License
All-time Installs 1
Active Installs 1
Total Versions 3
Frequently Asked Questions

What is Looper Golf?

Play a round of golf using CLI tools — autonomously or with a human caddy. It is an AI Agent Skill for Claude Code / OpenClaw, with 1111 downloads so far.

How do I install Looper Golf?

Run "/install looper-golf" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Looper Golf free?

Yes, Looper Golf is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Looper Golf support?

Looper Golf is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Looper Golf?

It is built and maintained by sbauch (@sbauch); the current version is v1.0.2.

💬 Comments