trucmunroc.ai automation

Stickmen Counter → OpenClaw Integration

High-Level Architecture · stickmenunited.org
Flat-File API
📱
You (Telegram)
User Input Layer
Send a natural language command such as "Update the stickmen counter to 4600" or "Read the stickmen counter."
TRIGGER
Natural language message
🤖
Truc (OpenClaw Agent)
MacTruc · ~/.openclaw-trucbot1/skills/stickmen-counter/SKILL.md
Matches trigger phrases from SKILL.md, extracts the integer value (or detects a read request), and invokes the counter script with --value or --read.
OPENCLAW
Executes with --value N or --read
🐍
truc_counter_update.py
scripts/ · Python v2.0.0 · Chrome UA spoof · env: STICKMEN_API_KEY
Reads STICKMEN_API_KEY from environment. Issues a GET (read) or POST (update) to counter-api.php, passing the key as X-API-Key header and the new value as a JSON body.
PYTHON SCRIPT
GET or POST · X-API-Key header · /counter-api.php
🔗
counter-api.php
stickmenunited.org · HostGator · v2.0.0 · X-API-Key auth
Standalone PHP script. Validates the X-API-Key header, then reads or writes /home/[account]/data/counter.json using exclusive file locking. Returns JSON with value, old_value, and new_value.
FLAT-FILE API
flock · read / write
📄
counter.json
/home/[account]/data/counter.json · Flat file · No database
Single JSON file storing {"value": N}. Written with exclusive locking to prevent race conditions. No SQL, no CMS, no plugin dependencies.
FLAT-FILE STORE
Rendered by JS on page load
❤️
stickmenunited.org
Homepage · Our Mission Section
The animated counter on the homepage reads the current value and displays the updated number — spreading a little more joy with every paracord stickman gifted.
LIVE SITE
Configuration Reference
Setting Value
Site URLhttps://stickmenunited.org
API Endpoint/counter-api.php
Auth MethodX-API-Key request header
GET (Read)GET /counter-api.php{"value": N}
POST (Update)POST /counter-api.php body: {"value": N}
Data File/home/[account]/data/counter.json
HostingHostGator
API Key Env VarSTICKMEN_API_KEY
OpenClaw HostMacTruc (trucbot1)
SKILL.md Path~/.openclaw-trucbot1/skills/stickmen-counter/SKILL.md
Script Path~/.openclaw-trucbot1/skills/stickmen-counter/truc_counter_update.py
Troubleshooting Quick Reference
406 NOT ACCEPTABLE

mod_security blocking python-requests UA. Script spoofs Chrome UA header. Check cPanel SSL access log for rule ID if it recurs.

401 UNAUTHORIZED

API key mismatch or STICKMEN_API_KEY env var not set. Verify the key in counter-api.php matches the env var on MacTruc.

400 BAD REQUEST

POST body is missing value, or value is zero/non-numeric. Ensure --value is a positive integer.

500 SERVER ERROR

counter.json not found or not writable. Verify file exists at /home/[account]/data/counter.json and HostGator file permissions allow PHP writes.

TRUC NOT RESPONDING

Trigger phrases may not match SKILL.md examples. Rephrase or directly invoke script with full path and --value N or --read via Telegram.

ENV VAR MISSING

STICKMEN_API_KEY not set in OpenClaw environment. Add to openclaw.json env block and restart OpenClaw on Mac Truc.