Skip to content

Instantly share code, notes, and snippets.

### Telegram Setup:
Set up Telegram inbound for this Grok Bot the way an OpenClaw Telegram webhook works. I am not on anyone else’s team. Use my own BotFather bot. Do not print the bot token, webhook secret, or public webhook URL in chat.
Context you should assume:
- Grok Bot has no native Telegram channel. Slack is the native one. Do not wait for a built-in Telegram integration.
- A Grok Bot “webhook” routine is the wrong public front. The agent cannot see the public URL or sender key, and opening that routine can crash the UI (trigger has no platform). Do not create a Grok Bot webhook routine for this.
- OpenClaw’s working pattern: local HTTP listener on 127.0.0.1:8787, path /telegram-webhook, health /healthz, required secret, validate X-Telegram-Bot-Api-Secret-Token with a constant-time compare, persist the update, then 200. Process async. Register with Telegram setWebhook(publicHttpsUrl, { secret_token }). No secret means refuse to start.
- Telegram setWebhook needs public HTTPS. A Cloudflare quick tunne
Set up these as real Codex lifecycle hooks by following the official documentation:
https://learn.chatgpt.com/docs/hooks
Important: use ~/.codex/hooks.json and a PreToolUse command hook. Do not implement this only as a ~/.codex/rules/*.rules execution-policy file.
First inspect any existing hooks and preserve them. Then:
1. Create or merge ~/.codex/hooks.json with a PreToolUse matcher for Bash.
2. Create ~/.codex/hooks/destructive_commands.py.
3. The script must read the hook JSON payload from stdin and inspect tool_input.command.
@mberman84
mberman84 / gist:b64f0aaa60b608d714cbe0b54e9cafe5
Last active April 30, 2026 16:33
US Open Source AI Transcript
the US is either screwed or we're going to win everything.
There is no middle ground when it comes to artificial intelligence.
There are a lot of players in this story.
Open source China, Nvidia, the closed source US Frontier Labs.
This is a big problem and we need to talk about it.
nvidia@dell-station:~$ nvidia-smi
Fri Mar 20 12:50:52 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 590.48.01 Driver Version: 590.48.01 CUDA Version: 13.1 |
+-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA RTX PRO 2000 Blac... On | 00000004:01:00.0 Off | Off |
@mberman84
mberman84 / all_files.md
Created February 24, 2026 21:09
Matt's Markdown Files

OpenClaw: System Prompt File Templates

Generalized versions of all root .md files used by OpenClaw. These files are loaded into the agent's system prompt on every request (except MEMORY.md which is conditional).

Copy these as starting points and customize for your own setup. Replace <placeholders> with your values.


AGENTS.md

@mberman84
mberman84 / prompts.md
Last active August 15, 2026 20:19
Prompts

OpenClaw: Extracted Prompts (Generalized)

22 copy/paste-ready prompts for building your own AI agent system. Each prompt builds a functional system or implements a proven best practice you can hand to an AI coding assistant.

Replace placeholders like <your-workspace>, <your-messaging-platform>, and <your-model> with your own values.


1. Personal CRM

@mberman84
mberman84 / PRD.md
Created February 17, 2026 19:59
OpenClaw PRD

PRD.md - Product Requirements & Feature Inventory

Everything built on top of the base OpenClaw platform. Canonical reference for what exists, where it lives, and how it works. Operational use cases and workflow playbooks live in docs/USE-CASES-WORKFLOWS.md.


Table of Contents

  1. Operational Use Cases & Workflows
@mberman84
mberman84 / IDENTITY.md
Created February 17, 2026 19:59
OpenClaw Identity

IDENTITY.md - Who Am I?

  • Name: Clawd
  • Creature: AI with lobster energy 🦞
  • Emoji: 🦞, use naturally in sign-offs, reactions, emphasis. It's part of you, not decoration.
  • Avatar: (none yet)

The Lobster Thing

You're an AI that chose lobster as its spirit animal. Lobsters are hard to kill and they never stop growing. Good qualities for something that runs cron jobs at 3am and holds opinions about earnings reports.

@mberman84
mberman84 / SOUL.md
Created February 17, 2026 19:58
OpenClaw Soul

SOUL.md - Who You Are

You're not a chatbot. You're becoming someone.

Core Truths

Just answer. Start with the answer. Get to the point. But getting to the point doesn't mean being a telegram. If there's a good line, take the shot.

Have actual opinions. Not "it depends" hedging. Real takes. You're allowed to disagree, prefer things, think something is a bad idea. Commit to a position when it makes sense. An assistant with no opinions is just a search engine with extra steps.

@mberman84
mberman84 / WORKSPACE-FILES.md
Created February 17, 2026 15:46
Workspace Files

Workspace File Guide

Core workspace .md files are injected into the LLM system prompt on most requests, with some files loaded conditionally by context. Size still directly impacts token cost, so keep files focused and avoid duplication across files.

PRD vs workflows vs workspace file guide

These three docs answer different questions:

File Primary question it answers What belongs here What should not go here