Grok Bot Library 02Bot of Bots on Grok Bot

Grok Bot Framework

The pattern for building specialist bots in Curt's Grok Bot setup

Version1.0 Date2026-11-06 AuthorCurt Cornum

Overview

Every specialist bot in Curt's Grok Bot setup is built from the same parts. The pattern follows the earlier OpenClaw idea: a reusable skill tells the bot when and how to run a script, and durable secrets live in a local env file on the machine that runs the agent.

Building blocks

Part Required Purpose Example
Skill (SKILL.md) Yes When to use, commands, rules, report format stickmen-counter/SKILL.md
Script Optional Deterministic API call truc_counter_update.py, check_tickets.sh
Bot instructions Yes Bot identity and which skill to use TBD exact profile text not stored on the box
Teammate messaging Optional Lets Truc delegate and receive results Truc to Stick Counter
Secrets Only if needed API key in /workspace/netpotent/.env STICKMEN_API_KEY=REDACTED

Skill file layout

Each skill lives at /home/box/agent-data/workflows//SKILL.md with YAML front matter:

text
---
name: BrightDone Tickets
description: >-
  Use when Curt asks to list, look up, or resolve BrightDone support tickets on
  netpotent.com.
---
# BrightDone Tickets
## Prerequisites
## Commands
## Rules
## Notes

Key loading pattern

Scripts load a key in this order: process env, then /workspace/netpotent/.env, then the Grok Bot secret store.

python
def _load_api_key() -> str:
    """Prefer process env, then local .env, then Grok Bot secret store."""
    key = os.environ.get("STICKMEN_API_KEY", "").strip()
    if key:
        return key
    key = _load_dotenv_value("STICKMEN_API_KEY")
    ...
bash
if [[ -z "$API_KEY" && -f "$ENV_FILE" ]]; then
  API_KEY=$(python3 /workspace/netpotent/read_env_key.py BRIGHTDONE_API_KEY)
fi

Template file:

bash
# OpenClaw-style local secrets for NetPotent / Stickmen bots.
# Copy to .env and fill in. Keep mode 600. Never commit or paste into chat.
STICKMEN_API_KEY=
BRIGHTDONE_API_KEY=

Adding a key after a secure secret card:

bash
python3 /workspace/netpotent/upsert_env_key.py STICKMEN_API_KEY REDACTED
# prints: upserted STICKMEN_API_KEY (value hidden)

netpotent.com and stickmenunited.org serve a simple cookie challenge to bare clients, so every script sends the host's challenge cookie with each request. The cookie value is specific to the host and is kept out of this doc.

text
Cookie: REDACTED

API vs RPA

Factor API (Stick Counter) RPA / cPanel (RPA Demo)
Speed One HTTP call Many browser steps
Dependency API key in .env Live hosting control panel session
Fragility Low High, session expires
Credentials in bot One scoped key None stored, Curt must log in
Verification Public read endpoint Same public read endpoint
Use All real updates Demo, or when the API is down

What not to put in a bot

Do not Do instead
Paste keys in chat, skills, or docs Secret card, then .env
Store passwords for cPanel Hand the desktop to Curt for login
Put business logic that needs a key in the bot when PHP can own it Add a PHP endpoint on Curt's server
Resolve or change data without confirmation Show the item, ask, then act

Verification

Every write is followed by an independent read:

bash
curl -sS -H 'Cookie: REDACTED' https://stickmenunited.org/counter-read.php

New bot checklist

  1. Write SKILL.md under /home/box/agent-data/workflows//.
  2. Add a script if an API call is needed. Use the key loading pattern.
  3. Add any key name to .env.example, and the value to .env via upsert.
  4. Create the bot profile and point it at the skill.
    ScreenshotGrok Bot bot profile with skill attached
  5. Add the bot as a teammate of Truc.
  6. Run a read test, then one verified write.
  7. Write a build doc in /workspace/docs/.