Grok Bot Library 03Bot of Bots on Grok Bot

Stick Counter

A Grok Bot specialist that reads and updates the Stickmen gifted counter

Version1.0 Date2026-11-06 AuthorCurt Cornum

Purpose

Stick Counter reads and updates the "Stickmen Gifted Worldwide" counter on https://stickmenunited.org. Reads use a public endpoint. Updates call a small PHP API with an API key. Truc · Bot of Bots delegates counter requests to it as a teammate.

The OpenClaw Version

The design follows OpenClaw skills: a skill tells the bot when and how to run a script, and secrets live in a local env file on the agent machine, not in chat. The script header still reads "NetPotent Automation · Stickmen United" and the .env loader is commented "OpenClaw-style local secrets".

Item OpenClaw Grok Bot
Chat front end Telegram-style TBD Grok Bot chat with Truc
Script TBD truc_counter_update.py v2.1.0
Secrets Local env file /workspace/netpotent/.env
CLI flags, paths, bot ids TBD See Build Steps

Architecture

Piece Location
Skill /home/box/agent-data/workflows/stickmen-counter/SKILL.md
Script /home/box/agent-data/workflows/stickmen-counter/truc_counter_update.py
Secrets /workspace/netpotent/.env (STICKMEN_API_KEY=REDACTED)
Public read https://stickmenunited.org/counter-read.php
Write API Authenticated PHP endpoint on stickmenunited.org, header X-API-Key
Data file counter.json in a private folder on the web host
POST value verify Curt Truc Stick Counter counter write API counter-read.php counter.json
YouOrchestratorSpecialist botServer endpoint or data

Build Steps

1. Server side

On stickmenunited.org, the counter write API checks X-API-Key and writes counter.json. counter-read.php returns the value publicly. TBD PHP source is not stored on the box.

2. Secrets

bash
python3 /workspace/netpotent/upsert_env_key.py STICKMEN_API_KEY REDACTED

3. Script

bash
python3 /home/box/agent-data/workflows/stickmen-counter/truc_counter_update.py --read
python3 /home/box/agent-data/workflows/stickmen-counter/truc_counter_update.py --value 5564

The update call:

bash
curl -sS -X POST https://stickmenunited.org/REDACTED \
  -H 'X-API-Key: REDACTED' -H 'Cookie: REDACTED' \
  -H 'Content-Type: application/json' -d '{"value": 5564}'

The script retries 3 times with exponential backoff on timeouts and 5xx errors, and prints "Counter updated: old → new".

4. Skill and bot

Save SKILL.md, create the Stick Counter bot, attach the skill, and add it as Truc's teammate.

ScreenshotGrok Bot teammate chat between Truc and Stick Counter

Bot Instructions

Skill text (excerpt):

text
If the user says a number, treat it as an update. If they only ask, treat it as a read.

For updates, STICKMEN_API_KEY must be available via (in order): process env,
/workspace/netpotent/.env, or the Grok Bot secret store.
If the key is missing for an update, request it with a secret-request named
STICKMEN_API_KEY, then write it into /workspace/netpotent/.env (mode 600).
Never put the key in chat, skill text, or logs.

Respond like: "We've gifted 4,565 stickmen so far!"
Confirm like: "Done! Counter updated to 4,600."

When Curt says "add N", the bot reads the current value, sets current + N, then verifies.

Obstacles and Fixes

Obstacle Fix
Secret card did not persist the key Write the key into /workspace/netpotent/.env
Host anti-bot challenge on bare clients Send the host's challenge cookie
Counter changed outside the bot (unexplained +16 on Oct 23) Read before adding; Curt confirmed the total
cPanel path needs a live hosting session Kept as RPA Demo only; API is preferred

cPanel alternative (RPA Demo)

text
1. Open the hosting cPanel (Curt signs in; never type credentials).
2. File Manager, open the private data folder.
3. Select counter.json, Edit, set {"value": N}, Save Changes.
4. Verify with counter-read.php.
ScreenshotcPanel File Manager editing counter.json

Verification

bash
curl -sS -H 'Cookie: REDACTED' https://stickmenunited.org/counter-read.php
ScreenshotPublic Stickmen counter on stickmenunited.org
Date Added Before After
Oct 23 16 5464 5480
Oct 28 9 5480 5489
Oct 29 40 5489 5529
Nov 2 5 5529 5534
Nov 6 30 5534 5564

Lessons Learned

  • An API is faster and sturdier than UI automation for a single value.
  • Keep keys in .env, not only in the secret card.
  • Always verify with an independent read.
  • Read before adding so outside changes are caught.