Not in the top 1,000 by GitHub stars

dimpurr/grok-bot-gateway

Grok Bot's official external channel gateway, with a return path you choose.

History

Review weekly changes to SKILL.md before updating. Dates mark the weeks in which we observed each version; checks apply to the recorded commits.

View weekly changes

SKILL.md

Week of Nov 2, 2026 · +0 / −0 lines

Before Network or broad shell → After Network or broad shell

94b7894bf280 → 94b7894bf280

Compare on GitHub

Week of Oct 26, 2026 · Line counts unavailable

Before Not checked yet → After Network or broad shell

First observation → 94b7894bf280

No earlier version was observed for comparison.

Compare on GitHub

View on GitHubAdd to my skills

Verified commit 94b7894bf2802c0fcebeb23035dc1ad6b1286e48

git clone --filter=blob:none --no-checkout https://github.com/dimpurr/grok-bot-gateway.git .hotskills/dimpurr-grok-bot-gateway && git -C .hotskills/dimpurr-grok-bot-gateway checkout --detach 94b7894bf2802c0fcebeb23035dc1ad6b1286e48 # Copy each selected skill directory from .hotskills/dimpurr-grok-bot-gateway into .claude/skills/<skill-name>/
23GitHub stars
13stars in 7 days
1skill in this repository
2commits in 30 days

Heat

7.1
  • Star growth, last 7 daysNot available
  • Star growth, last 24 hoursNot available
  • Rank movement, last 7 daysNot available
  • Commits, last 30 daysNot available
  • Accounts asking about it through MCP, last 7 daysNot available
  • Hot votes this weekNot available

Heat never changes the order by stars, and sponsorship never touches it. How heat works

Stars over time

Oct 25, 2026Nov 6, 202623

30-day change not yet available: not enough history.

Individual skills in this repository

How it works

grok-bot-gateway

When your agent uses it

An official-webhook-only gateway to all your Grok Bots. Use this when a coding agent or script needs to list a Grok Bot team, read a Bot's transcript or message a Bot, or when a Grok Bot user wants to host that gateway; it detects which side you're on and guides you. Callers (Claude Code, Codex, scripts) use the grokgw client; hosts create the gateway Bot, its webhook routine and a host config. Getting results back is optional and goes over a return path you choose (none by default).

What it loads into context

Frontmatter

222 tokens

Always available to the agent

SKILL.md

8,731 tokens

When the skill is activated

Reference documents

3,607 tokens

Loaded on request

Token counts are estimates. Scripts run separately; they are not counted as reference context.

The playbook

  1. Step 0: detect your role
  2. Caller path
  3. Host path
  4. Reference
  5. Known limitations & trade-offs

Scripts executed separately

  • scripts/callback_receiver.py
  • scripts/gateway_deliver.py
  • scripts/grokgw
  • scripts/outbox_server.py
  • scripts/start.sh
  • tests/mock_server.py
  • tests/run.sh
  • tests/test_grokgw.py

Files

  • .claude-plugin/marketplace.jsonasset444 bytes
  • .claude-plugin/plugin.jsonasset631 bytes
  • .cursor-plugin/marketplace.jsonasset466 bytes
  • .cursor-plugin/plugin.jsonasset590 bytes
  • .github/workflows/test.ymlasset546 bytes
  • LICENSEasset11,357 bytes
  • README.mddoc4,637 bytes
  • SKILL.mdcore33,296 bytes
  • SKILL.mdcore33,296 bytes
  • SKILL.mdcore33,296 bytes
  • SKILL.mdcore33,296 bytes
  • SKILL.mdcore33,296 bytes
  • SKILL.mdcore33,296 bytes
  • SKILL.mdcore33,296 bytes
  • SKILL.mdcore33,296 bytes
  • SKILL.mdcore33,296 bytes
  • SKILL.mdcore33,296 bytes
  • SKILL.mdcore33,296 bytes
  • SKILL.mdcore33,296 bytes
  • contracts/request.schema.jsonasset3,709 bytes
  • contracts/result.schema.jsonasset6,741 bytes
  • references/return-paths.mddoc9,341 bytes
  • scripts/callback_receiver.pyruns5,950 bytes
  • scripts/gateway_deliver.pyruns17,358 bytes
  • scripts/grokgwruns26,650 bytes
  • scripts/host.example.jsonasset340 bytes
  • scripts/outbox_server.pyruns6,392 bytes
  • scripts/start.shruns4,631 bytes
  • tests/mock_server.pyruns7,588 bytes
  • tests/run.shruns646 bytes
  • tests/test_grokgw.pyruns29,862 bytes
Read SKILL.md

# Grok Bot gateway

An official-webhook-only gateway to all your Grok Bots: list them, read their transcripts and message them from outside Grok Bot. One dedicated **gateway Bot** has a routine with an official webhook trigger. An outside tool POSTs a small JSON request to that webhook, the gateway Bot wakes up, does one of four things (`ping`, list the Bots, read a Bot's transcript, send a Bot a message) and hands the result back over a **return path** the caller chose. Every request is a full Bot run, so it is asynchronous (tens of seconds to minutes) and spends the account's Grok Bot usage.

How results come back is optional and up to the caller. The default is `none` (fire-and-forget): `ping` and `send` work, but nothing is read back. Setting a return path (`tailnet`, `tunnel`, `github` or `callback`) enables `list`, `read`, `ask` and `fetch`. No mode is "better"; see [references/return-paths.md](references/return-paths.md) for a neutral comparison.

There are two roles, and this one file serves both:

- **Caller:** the outside side. Claude Code, Codex or a script on a laptop or in CI, using the `grokgw` client.
- **Host:** the Grok Bot side. A Grok Bot account that runs the gateway Bot on its cloud computer.

Read **Step 0**, then only your role's section. The reference material at the end is shared.

Files in this skill (paths are relative to this folder):
View the complete source on GitHub

Skills included

  • grok-bot-gateway

Repository facts

License
Apache-2.0
Created
Oct 3, 2026
Last pushed
Nov 5, 2026
Forks
6
Open issues
0
Project activity
Active

Before you install

Network or broad shell

Automated signals, not a guarantee

Checked Nov 5, 2026

Not fully analyzed: some files were too long, unreadable or missing. This never lowers the level.

Show 11 notes
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
  • SKILL.md:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
Show all 232 signals by file

.claude-plugin/plugin.json

  • Network accessline 7
    "name": "dimpurr",     "email": "dimpurr@live.com",     "url": "https://github.com/dimpurr"
  • Network accessline 8
    "email": "dimpurr@live.com",     "url": "https://github.com/dimpurr"   },
  • Network accessline 9
    "url": "https://github.com/dimpurr"
  • Network accessline 10
    },   "homepage": "https://github.com/dimpurr/grok-bot-gateway",   "repository": "https://github.com/dimpurr/grok-bot-gateway",
  • Network accessline 11
    "homepage": "https://github.com/dimpurr/grok-bot-gateway",
  • Network accessline 12
    "repository": "https://github.com/dimpurr/grok-bot-gateway",

.cursor-plugin/plugin.json

  • Network accessline 8
    "email": "dimpurr@live.com"   },   "homepage": "https://github.com/dimpurr/grok-bot-gateway",
  • Network accessline 9
    },   "homepage": "https://github.com/dimpurr/grok-bot-gateway",   "repository": "https://github.com/dimpurr/grok-bot-gateway",
  • Network accessline 10
    "homepage": "https://github.com/dimpurr/grok-bot-gateway",
  • Network accessline 11
    "repository": "https://github.com/dimpurr/grok-bot-gateway",

LICENSE

  • Network accessline 2
    Apache License                            Version 2.0, January 2004                         http://www.apache.org/licenses/
  • Network accessline 4
    http://www.apache.org/licenses/
  • Network accessline 196
    http://www.apache.org/licenses/LICENSE-2.0

SKILL.md

  • Network accessline 26
    | Path | Used by | Purpose | |---|---|---| | `scripts/grokgw` | Caller | bash + curl client |
  • Network accessline 27
    |---|---|---| | `scripts/grokgw` | Caller | bash + curl client | | `scripts/callback_receiver.py` | Caller | receiver for `callback` mode (stdlib), behind your own HTTPS proxy |
  • Network accessline 28
    | `scripts/grokgw` | Caller | bash + curl client |
  • Access to secretsline 84
    [Credential-related source omitted]
  • Network accessline 180
    - `GROKGW_AUTH_HEADER` header name for the key (default `Authorization`, value `Bearer <key>`) - **Cost guard:** the client keeps a local hourly ledger and a kill switch. A blocked call exits 7 with nothing sent; 4xx rejections start no run
  • Network accessline 182
    - **Key handling:** the client passes the key (and any outbox/repo token) to curl on stdin (`-H @-`), so it never appears in `ps`, and it never prints it.
  • Network accessline 237
    - A background thread deletes outbox files older than 24 h (`GROKGW_MAX_AGE_HOURS`). - **Firewall:** if it can use `sudo`, it adds an iptables rule so only `tailscale0` and loopback can reach the port. Without sudo, say so to the owner and 
  • Network accessline 239
    - Quick local check: `curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8787/00000000-0000-4000-8000-000000000000.json` should print `404`.
  • Access to secretsline 255
    [Credential-related source omitted]
  • Access to secretsline 264
    [Credential-related source omitted]
  • Dangerous shell operationline 295
    The preferred way to install this skill on Grok Bot is to hand this file (and the `scripts/`, `contracts/` and `references/` files) to a Bot and ask it to save it as a skill. The Bot keeps it in the account's shared skill library. Don't use
  • Network accessline 295
    The preferred way to install this skill on Grok Bot is to hand this file (and the `scripts/`, `contracts/` and `references/` files) to a Bot and ask it to save it as a skill. The Bot keeps it in the account's shared skill library. Don't use
  • Network accessline 325
    From Cursor's Routines help, "Where do the webhook URL and key live, and what does a 200 mean?" (https://cursor.com/help/grok-bot/routines):
  • Network accessline 369
    A transcript archive makes reads cheaper. For example, [chat-stasher](https://github.com/dimpurr/chat-stasher) is an encrypted, append-only archive of AI conversations. A first-class `grok-bot` platform is specified there but not yet implem

contracts/request.schema.json

  • Network accessline 1
    {   "$schema": "https://json-schema.org/draft/2020-12/schema",
  • Network accessline 2
    "$schema": "https://json-schema.org/draft/2020-12/schema",

contracts/result.schema.json

  • Network accessline 1
    {   "$schema": "https://json-schema.org/draft/2020-12/schema",
  • Network accessline 2
    "$schema": "https://json-schema.org/draft/2020-12/schema",

references/return-paths.md

  • Network accessline 86
    - **Caller:** set `GROKGW_RETURN=tunnel`, `GROKGW_OUTBOX=https://<public-host>`   (must be `https://`) and a bearer token in `GROKGW_OUTBOX_TOKEN` or
  • Network accessline 87
    (must be `https://`) and a bearer token in `GROKGW_OUTBOX_TOKEN` or
  • Network accessline 90
    - **Host:** run `outbox_server.py` with `GROKGW_OUTBOX_TOKEN` (or   `GROKGW_OUTBOX_TOKEN_FILE`) set, and put a tunnel in front of the loopback   port yourself, e.g. `cloudflared tunnel --url http://127.0.0.1:8787`.
  • Network accessline 91
    `GROKGW_OUTBOX_TOKEN_FILE`) set, and put a tunnel in front of the loopback   port yourself, e.g. `cloudflared tunnel --url http://127.0.0.1:8787`. - **host.json:**
  • Network accessline 92
    port yourself, e.g. `cloudflared tunnel --url http://127.0.0.1:8787`.
  • Network accessline 109
    `GROKGW_GITHUB_TOKEN_CMD`. Optional `GROKGW_GITHUB_PATH` (default `outbox`),   `GROKGW_GITHUB_REF` (default `main`), `GROKGW_GITHUB_API` (default   `https://api.github.com`). The client polls
  • Network accessline 110
    `GROKGW_GITHUB_REF` (default `main`), `GROKGW_GITHUB_API` (default   `https://api.github.com`). The client polls   `GET /repos/<repo>/contents/<path>/<file>?ref=<ref>` with
  • Network accessline 111
    `https://api.github.com`). The client polls
  • Network accessline 134
    - **Caller:** set `GROKGW_RETURN=callback` and `GROKGW_CALLBACK_URL` to the   public `https://` URL of your receiver. Run
  • Network accessline 135
    public `https://` URL of your receiver. Run
  • Network accessline 147
    [Credential-related source omitted]

scripts/callback_receiver.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Access to secretsline 37
    [Credential-related source omitted]
  • Access to secretsline 38
    [Credential-related source omitted]
  • Access to secretsline 39
    [Credential-related source omitted]
  • Access to secretsline 40
    [Credential-related source omitted]
  • Access to secretsline 42
    [Credential-related source omitted]

scripts/gateway_deliver.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Network accessline 32
    GROKGW_HOME            host state dir (default /workspace/gateway)     GROKGW_HOST_CONFIG     config file (default <GROKGW_HOME>/host.json)     GITHUB_API             GitHub API base (default https://api.github.com)
  • Network accessline 33
    GROKGW_HOST_CONFIG     config file (default <GROKGW_HOME>/host.json)     GITHUB_API             GitHub API base (default https://api.github.com)     GROKGW_DELIVER_INSECURE_TEST=1
  • Network accessline 34
    GITHUB_API             GitHub API base (default https://api.github.com)
  • Network accessline 53
    [Credential-related source omitted]
  • Access to secretsline 53
    [Credential-related source omitted]
  • Network accessline 54
    [Credential-related source omitted]
  • Access to secretsline 54
    [Credential-related source omitted]
  • Network accessline 55
    [Credential-related source omitted]
  • Access to secretsline 55
    [Credential-related source omitted]
  • Access to secretsline 56
    [Credential-related source omitted]
  • Network accessline 273
    }).encode()         url = "%s/repos/%s/contents/%s/%s%s" % (GITHUB_API, repo, path, rid, suffix)         r = urllib.request.Request(url, data=payload, method="PUT")
  • Network accessline 274
    url = "%s/repos/%s/contents/%s/%s%s" % (GITHUB_API, repo, path, rid, suffix)         r = urllib.request.Request(url, data=payload, method="PUT")         r.add_header("Authorization", "Bearer " + token)
  • Network accessline 275
    r = urllib.request.Request(url, data=payload, method="PUT")
  • Network accessline 277
    r.add_header("Accept", "application/vnd.github+json")         r.add_header("Content-Type", "application/json")         with urllib.request.urlopen(r, timeout=15) as resp:
  • Network accessline 278
    r.add_header("Content-Type", "application/json")         with urllib.request.urlopen(r, timeout=15) as resp:             if not (200 <= resp.status < 300):
  • Network accessline 279
    with urllib.request.urlopen(r, timeout=15) as resp:
  • Network accessline 284
    headers = callback_headers(rid, kind, body, descriptor["secret"])         target = "%s/%s/%s" % (descriptor["url"].rstrip("/"), rid, kind)         r = urllib.request.Request(target, data=body, method="POST")
  • Network accessline 285
    target = "%s/%s/%s" % (descriptor["url"].rstrip("/"), rid, kind)         r = urllib.request.Request(target, data=body, method="POST")         for k, v in headers.items():
  • Network accessline 286
    r = urllib.request.Request(target, data=body, method="POST")

scripts/grokgw

  • Executable scriptline 1
    #!/usr/bin/env bash
  • Access to secretsline 19
    [Credential-related source omitted]
  • Network accessline 35
    #   GROKGW_GITHUB_REF       branch or ref (default main) #   GROKGW_GITHUB_TOKEN     read-only token (never printed)                  or GROKGW_GITHUB_TOKEN_CMD #   GROKGW_GITHUB_API       API base (default https://api.github.com; tests use
  • Network accessline 36
    #   GROKGW_GITHUB_TOKEN     read-only token (never printed)                  or GROKGW_GITHUB_TOKEN_CMD #   GROKGW_GITHUB_API       API base (default https://api.github.com; tests use a mock) #   callback:
  • Network accessline 37
    #   GROKGW_GITHUB_API       API base (default https://api.github.com; tests use a mock)
  • Network accessline 54
    OUTBOX="${GROKGW_OUTBOX:-http://127.0.0.1:8787}"; OUTBOX="${OUTBOX%/}"
  • Network accessline 60
    RETURN="${GROKGW_RETURN:-none}" GITHUB_REPO="${GROKGW_GITHUB_REPO:-}"; GITHUB_PATH="${GROKGW_GITHUB_PATH:-outbox}" GITHUB_REF="${GROKGW_GITHUB_REF:-main}"; GITHUB_API="${GROKGW_GITHUB_API:-https://api.github.com}"
  • Network accessline 61
    GITHUB_REPO="${GROKGW_GITHUB_REPO:-}"; GITHUB_PATH="${GROKGW_GITHUB_PATH:-outbox}" GITHUB_REF="${GROKGW_GITHUB_REF:-main}"; GITHUB_API="${GROKGW_GITHUB_API:-https://api.github.com}" CALLBACK_URL="${GROKGW_CALLBACK_URL:-}"; CALLBACK_DIR="${G
  • Network accessline 62
    GITHUB_REF="${GROKGW_GITHUB_REF:-main}"; GITHUB_API="${GROKGW_GITHUB_API:-https://api.github.com}"
  • Access to secretsline 89
    [Credential-related source omitted]
  • Dangerous shell operationline 107
    if [ $((now - ts)) -gt 10 ]; then rm -rf "$LOCK" 2>/dev/null; continue; fi
  • Dangerous shell operationline 112
    lock_release() { rm -rf "$LOCK" 2>/dev/null; return 0; }
  • Dangerous shell operationline 139
    if [ -e "$tmp" ]; then mv "$tmp" "$CALLS" 2>/dev/null || rm -f "$tmp"; fi
  • Access to secretsline 159
    [Credential-related source omitted]
  • Access to secretsline 164
    [Credential-related source omitted]
  • Network accessline 181
    tailnet)       [ -n "${GROKGW_OUTBOX_HOST:-}" ] && hdr=(-H "Host: $GROKGW_OUTBOX_HOST")       curl -sS -m 20 ${hdr[@]+"${hdr[@]}"} -w '\n%{http_code}' "$OUTBOX/$1" ;;
  • Network accessline 182
    [ -n "${GROKGW_OUTBOX_HOST:-}" ] && hdr=(-H "Host: $GROKGW_OUTBOX_HOST")       curl -sS -m 20 ${hdr[@]+"${hdr[@]}"} -w '\n%{http_code}' "$OUTBOX/$1" ;;     tunnel)
  • Network accessline 183
    curl -sS -m 20 ${hdr[@]+"${hdr[@]}"} -w '\n%{http_code}' "$OUTBOX/$1" ;;
  • Network accessline 185
    [Credential-related source omitted]
  • Network accessline 186
    [Credential-related source omitted]
  • Network accessline 187
    [Credential-related source omitted]
  • Network accessline 189
    [Credential-related source omitted]
  • Network accessline 190
    [Credential-related source omitted]
  • Network accessline 191
    [Credential-related source omitted]
  • Network accessline 192
    -H 'Accept: application/vnd.github.raw' -w '\n%{http_code}' \         "$GITHUB_API/repos/$GITHUB_REPO/contents/$GITHUB_PATH/$1?ref=$GITHUB_REF" ;;     callback)
  • Network accessline 193
    "$GITHUB_API/repos/$GITHUB_REPO/contents/$GITHUB_PATH/$1?ref=$GITHUB_REF" ;;
  • Network accessline 272
    local v u rest hostpart kv resp code hdrs tok rbody   if has curl; then     v=$(curl --version 2>/dev/null | head -1 | awk '{print $2}')
  • Network accessline 273
    if has curl; then     v=$(curl --version 2>/dev/null | head -1 | awk '{print $2}')     pcheck PASS "curl present${v:+ (version $v)}"
  • Network accessline 274
    v=$(curl --version 2>/dev/null | head -1 | awk '{print $2}')
  • Network accessline 275
    pcheck PASS "curl present${v:+ (version $v)}"
  • Network accessline 276
    else     pcheck FAIL "curl not found"   fi
  • Network accessline 277
    pcheck FAIL "curl not found"
  • Network accessline 285
    elif printf '%s' "$u" | grep -q '[[:space:]]'; then     pcheck FAIL "GROKGW_WEBHOOK_URL contains whitespace"   elif [ "${u#https://}" = "$u" ]; then
  • Network accessline 286
    pcheck FAIL "GROKGW_WEBHOOK_URL contains whitespace"   elif [ "${u#https://}" = "$u" ]; then     pcheck FAIL "GROKGW_WEBHOOK_URL should start with https://"
  • Network accessline 287
    elif [ "${u#https://}" = "$u" ]; then
  • Network accessline 288
    pcheck FAIL "GROKGW_WEBHOOK_URL should start with https://"   else     rest="${u#https://}"; hostpart="${rest%%/*}"
  • Network accessline 289
    else     rest="${u#https://}"; hostpart="${rest%%/*}"     if [ -n "$hostpart" ]; then pcheck PASS "GROKGW_WEBHOOK_URL set, https URL shape ok"
  • Network accessline 290
    rest="${u#https://}"; hostpart="${rest%%/*}"
  • Access to secretsline 295
    [Credential-related source omitted]
  • Network accessline 312
    pcheck INFO "GROKGW_OUTBOX not set (loopback default; only right on the gateway's computer)"       else         resp=$(curl -sS -m 20 -o /dev/null -D - -w '\n%{http_code}' \
  • Network accessline 313
    else         resp=$(curl -sS -m 20 -o /dev/null -D - -w '\n%{http_code}' \                 "$OUTBOX/00000000-0000-4000-8000-000000000000.json" 2>/dev/null) || resp=$'\n000'
  • Network accessline 314
    resp=$(curl -sS -m 20 -o /dev/null -D - -w '\n%{http_code}' \
  • Network accessline 328
    fi ;;     tunnel)       case "$OUTBOX" in https://*) pcheck PASS "tunnel outbox is https" ;; *) pcheck FAIL "tunnel mode needs GROKGW_OUTBOX to be https://" ;; esac
  • Network accessline 329
    [Credential-related source omitted]
  • Network accessline 330
    case "$OUTBOX" in https://*) pcheck PASS "tunnel outbox is https" ;; *) pcheck FAIL "tunnel mode needs GROKGW_OUTBOX to be https://" ;; esac
  • Access to secretsline 331
    [Credential-related source omitted]
  • Network accessline 333
    if [ -n "$tok" ]; then pcheck PASS "tunnel outbox token set"         else pcheck FAIL "tunnel outbox token is empty"; fi         code=$(curl -sS -m 20 -o /dev/null -w '%{http_code}' "$OUTBOX/00000000-0000-4000-8000-000000000000.json" 2>/dev
  • Network accessline 334
    else pcheck FAIL "tunnel outbox token is empty"; fi         code=$(curl -sS -m 20 -o /dev/null -w '%{http_code}' "$OUTBOX/00000000-0000-4000-8000-000000000000.json" 2>/dev/null) || code=000         if [ "$code" = 401 ]; then pcheck PASS "ou
  • Network accessline 335
    code=$(curl -sS -m 20 -o /dev/null -w '%{http_code}' "$OUTBOX/00000000-0000-4000-8000-000000000000.json" 2>/dev/null) || code=000
  • Network accessline 336
    [Credential-related source omitted]
  • Network accessline 337
    [Credential-related source omitted]
  • Network accessline 338
    [Credential-related source omitted]
  • Network accessline 356
    [Credential-related source omitted]
  • Network accessline 357
    [Credential-related source omitted]
  • Network accessline 358
    [Credential-related source omitted]
  • Network accessline 359
    -w '\n%{http_code}' "$GITHUB_API/repos/$GITHUB_REPO" 2>/dev/null) || resp=$'\n000'
  • Network accessline 372
    fi ;;     callback)       case "$CALLBACK_URL" in https://*) pcheck PASS "callback URL is https" ;; *) pcheck FAIL "GROKGW_CALLBACK_URL must be https://" ;; esac
  • Network accessline 373
    callback)       case "$CALLBACK_URL" in https://*) pcheck PASS "callback URL is https" ;; *) pcheck FAIL "GROKGW_CALLBACK_URL must be https://" ;; esac       if mkdir -p "$CALLBACK_DIR" 2>/dev/null && touch "$CALLBACK_DIR/.doctor" 2>/dev/nu
  • Network accessline 374
    case "$CALLBACK_URL" in https://*) pcheck PASS "callback URL is https" ;; *) pcheck FAIL "GROKGW_CALLBACK_URL must be https://" ;; esac
  • Dangerous shell operationline 376
    rm -f "$CALLBACK_DIR/.doctor"; pcheck PASS "callback dir writable ($CALLBACK_DIR)"
  • Network accessline 376
    rm -f "$CALLBACK_DIR/.doctor"; pcheck PASS "callback dir writable ($CALLBACK_DIR)"       else pcheck FAIL "callback dir not writable ($CALLBACK_DIR)"; fi       resp=$(curl -sS -m 20 -o /dev/null -D - -w '\n%{http_code}' "${CALLBACK_URL%/}/h
  • Network accessline 377
    else pcheck FAIL "callback dir not writable ($CALLBACK_DIR)"; fi       resp=$(curl -sS -m 20 -o /dev/null -D - -w '\n%{http_code}' "${CALLBACK_URL%/}/healthz" 2>/dev/null) || resp=$'\n000'       code=${resp##*$'\n'}; hdrs=${resp%$'\n'*}
  • Network accessline 378
    resp=$(curl -sS -m 20 -o /dev/null -D - -w '\n%{http_code}' "${CALLBACK_URL%/}/healthz" 2>/dev/null) || resp=$'\n000'
  • Network accessline 416
    code=$(printf '%s: Bearer %s\n' "$hname" "$k" | curl -s -m "$tmo" -o /dev/null -w '%{http_code}' \
  • Network accessline 417
    -X POST -H @- -H 'Content-Type: application/json' --data-binary "$1" "$GROKGW_WEBHOOK_URL" 2>/dev/null) || code=000  # quiet: curl errors can echo the URL
  • Network accessline 475
    tailnet) RETDESC='{"mode":"tailnet"}' ;;   tunnel)     case "$OUTBOX" in https://*) ;; *) die "tunnel mode needs GROKGW_OUTBOX to be an https:// URL" 1 ;; esac
  • Network accessline 476
    tunnel)     case "$OUTBOX" in https://*) ;; *) die "tunnel mode needs GROKGW_OUTBOX to be an https:// URL" 1 ;; esac     RETDESC='{"mode":"tunnel"}' ;;
  • Network accessline 477
    case "$OUTBOX" in https://*) ;; *) die "tunnel mode needs GROKGW_OUTBOX to be an https:// URL" 1 ;; esac
  • Network accessline 483
    callback)     [ -n "$CALLBACK_URL" ] || die "set GROKGW_CALLBACK_URL for callback mode" 1     case "$CALLBACK_URL" in https://*) ;; *) die "GROKGW_CALLBACK_URL must be https://" 1 ;; esac
  • Network accessline 484
    [ -n "$CALLBACK_URL" ] || die "set GROKGW_CALLBACK_URL for callback mode" 1     case "$CALLBACK_URL" in https://*) ;; *) die "GROKGW_CALLBACK_URL must be https://" 1 ;; esac     mkdir -p "$CALLBACK_DIR" 2>/dev/null; chmod 700 "$CALLBACK_DIR
  • Network accessline 485
    case "$CALLBACK_URL" in https://*) ;; *) die "GROKGW_CALLBACK_URL must be https://" 1 ;; esac
  • Dangerous shell operationline 492
    trap '[ "${POSTED:-0}" = 1 ] || rm -f "$SECRET_FILE"' EXIT

scripts/outbox_server.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Access to secretsline 31
    [Credential-related source omitted]
  • Access to secretsline 33
    [Credential-related source omitted]
  • Access to secretsline 34
    [Credential-related source omitted]
  • Access to secretsline 35
    [Credential-related source omitted]
  • Access to secretsline 36
    [Credential-related source omitted]
  • Access to secretsline 42
    [Credential-related source omitted]
  • Access to secretsline 45
    [Credential-related source omitted]

scripts/start.sh

  • Executable scriptline 1
    #!/usr/bin/env bash
  • Network accessline 16
    [Credential-related source omitted]
  • Network accessline 17
    [Credential-related source omitted]
  • Network accessline 18
    #                      e.g. `cloudflared tunnel --url http://127.0.0.1:8787`
  • Dangerous shell operationline 32
    ts() { if [ "$(id -u)" = 0 ]; then tailscale "$@"; else tailscale "$@" 2>/dev/null || sudo -n tailscale "$@"; fi; }
  • Network accessline 33
    TSIP=$(tailscale ip -4 2>/dev/null | head -1) healthy() { # $1 = address; a valid-looking but absent id must give 404 from *our* server.   code=$(curl -s -m 3 -o /dev/null -w '%{http_code}' -D - "http://${1:-127.0.0.1}:$PORT/00000000-0000-4
  • Network accessline 34
    healthy() { # $1 = address; a valid-looking but absent id must give 404 from *our* server.   code=$(curl -s -m 3 -o /dev/null -w '%{http_code}' -D - "http://${1:-127.0.0.1}:$PORT/00000000-0000-4000-8000-000000000000.json" 2>/dev/null | tr -
  • Network accessline 35
    code=$(curl -s -m 3 -o /dev/null -w '%{http_code}' -D - "http://${1:-127.0.0.1}:$PORT/00000000-0000-4000-8000-000000000000.json" 2>/dev/null | tr -d '\r' | awk '/^[Ss]erver: outbox/{s=1} END{print s?"ok":"no"}')
  • Dangerous shell operationline 41
    rm -f "$PIDF"
  • Dangerous shell operationline 50
    find "$OUTBOX_DIR" -maxdepth 1 -type f \( -name '*.json' -o -name '*.part' \) -mmin +1440 -delete 2>/dev/null || true
  • Access to secretsline 60
    [Credential-related source omitted]
  • Access to secretsline 61
    [Credential-related source omitted]
  • Dangerous shell operationline 70
    if [ -n "$TSIP" ] && sudo -n sh -c "command -v iptables" >/dev/null 2>&1; then
  • Dangerous shell operationline 72
    if sudo -n iptables -N GROKGW-OUTBOX 2>/dev/null; then
  • Dangerous shell operationline 73
    sudo -n iptables -A GROKGW-OUTBOX -i tailscale0 -j RETURN
  • Dangerous shell operationline 74
    sudo -n iptables -A GROKGW-OUTBOX -i lo -j RETURN
  • Dangerous shell operationline 75
    sudo -n iptables -A GROKGW-OUTBOX -j DROP
  • Dangerous shell operationline 78
    if sudo -n iptables -C "${JUMP[@]}" 2>/dev/null; then echo "firewall: rule present"
  • Dangerous shell operationline 79
    elif sudo -n iptables -I "${JUMP[@]}" 2>/dev/null; then echo "firewall: only tailscale0/lo may reach $TSIP:$PORT"
  • Network accessline 83
    if [ -n "$TSIP" ]; then   if healthy "$TSIP"; then echo "tailnet: serving on http://$TSIP:$PORT"; else echo "tailnet: NOT reachable on $TSIP:$PORT" >&2; exit 2; fi
  • Network accessline 84
    if healthy "$TSIP"; then echo "tailnet: serving on http://$TSIP:$PORT"; else echo "tailnet: NOT reachable on $TSIP:$PORT" >&2; exit 2; fi

tests/mock_server.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Access to secretsline 31
    [Credential-related source omitted]
  • Access to secretsline 32
    [Credential-related source omitted]
  • Access to secretsline 33
    [Credential-related source omitted]
  • Access to secretsline 34
    [Credential-related source omitted]
  • Access to secretsline 36
    [Credential-related source omitted]
  • Access to secretsline 37
    [Credential-related source omitted]
  • Access to secretsline 38
    [Credential-related source omitted]
  • Access to secretsline 39
    [Credential-related source omitted]
  • Possible obfuscationline 124
    data = base64.b64decode(obj.get("content", ""))

tests/run.sh

  • Executable scriptline 1
    #!/usr/bin/env bash

tests/test_grokgw.py

  • Executable scriptline 1
    #!/usr/bin/env python3
  • Network accessline 43
    def free_port():     s = socket.socket()
  • Network accessline 44
    s = socket.socket()
  • Network accessline 99
    def http(url, data=None, headers=None, method=None):     req = urllib.request.Request(url, data=data, headers=headers or {}, method=method)
  • Network accessline 100
    req = urllib.request.Request(url, data=data, headers=headers or {}, method=method)
  • Access to secretsline 140
    [Credential-related source omitted]
  • Network accessline 158
    env["GROKGW_MOCK_SLEEP"] = str(sleep)         self.start([sys.executable, MOCK], env)         self.wait_up("http://127.0.0.1:%d/healthz" % port)
  • Network accessline 159
    self.start([sys.executable, MOCK], env)         self.wait_up("http://127.0.0.1:%d/healthz" % port)         return "http://127.0.0.1:%d" % port
  • Network accessline 160
    self.wait_up("http://127.0.0.1:%d/healthz" % port)
  • Network accessline 161
    return "http://127.0.0.1:%d" % port
  • Network accessline 165
    self.start([sys.executable, OUTBOX], {             "GROKGW_BIND": "127.0.0.1", "GROKGW_PORT": str(port), "GROKGW_OUTBOX_DIR": self.outbox})         self.wait_up("http://127.0.0.1:%d/%s.json" % (port, ZERO))
  • Network accessline 166
    "GROKGW_BIND": "127.0.0.1", "GROKGW_PORT": str(port), "GROKGW_OUTBOX_DIR": self.outbox})         self.wait_up("http://127.0.0.1:%d/%s.json" % (port, ZERO))         return "http://127.0.0.1:%d" % port
  • Network accessline 167
    self.wait_up("http://127.0.0.1:%d/%s.json" % (port, ZERO))
  • Network accessline 168
    return "http://127.0.0.1:%d" % port
  • Network accessline 175
    "GROKGW_CALLBACK_BIND": "127.0.0.1", "GROKGW_CALLBACK_PORT": str(port),             "GROKGW_CALLBACK_DIR": cbdir})         self.wait_up("http://127.0.0.1:%d/healthz" % port)
  • Network accessline 176
    "GROKGW_CALLBACK_DIR": cbdir})         self.wait_up("http://127.0.0.1:%d/healthz" % port)         self.cbdir = cbdir
  • Network accessline 177
    self.wait_up("http://127.0.0.1:%d/healthz" % port)
  • Network accessline 181
    def env(self, **over):         e = dict(os.environ)         e.update({"GROKGW_WEBHOOK_URL": "https://example.com/hook",
  • Network accessline 182
    [Credential-related source omitted]
  • Access to secretsline 182
    [Credential-related source omitted]
  • Network accessline 183
    e.update({"GROKGW_WEBHOOK_URL": "https://example.com/hook",
  • Network accessline 215
    port = free_port()         r = self.run_grokgw("ping", "--no-wait", env=self.env(             GROKGW_WEBHOOK_URL="http://127.0.0.1:%d/hook" % port, GROKGW_POST_TIMEOUT="1"))
  • Network accessline 216
    r = self.run_grokgw("ping", "--no-wait", env=self.env(             GROKGW_WEBHOOK_URL="http://127.0.0.1:%d/hook" % port, GROKGW_POST_TIMEOUT="1"))         self.assertEqual(r.returncode, 6, r.stderr)
  • Network accessline 217
    GROKGW_WEBHOOK_URL="http://127.0.0.1:%d/hook" % port, GROKGW_POST_TIMEOUT="1"))
  • Network accessline 378
    "completed_at": "2026-10-03T00:00:00Z"}).encode()         ts, sig = sign(secret, body)         base = "http://127.0.0.1:%d/%s/result" % (port, rid)
  • Network accessline 380
    base = "http://127.0.0.1:%d/%s/result" % (port, rid)
  • Network accessline 390
    "X-Grokgw-Timestamp": ts, "X-Grokgw-Signature": "sha256=dead", "Content-Type": "application/json"})         self.assertEqual(code, 401)         code, _ = http("http://127.0.0.1:%d/%s/result" % (port, ZERO), data=body, method="POST",
  • Network accessline 391
    self.assertEqual(code, 401)         code, _ = http("http://127.0.0.1:%d/%s/result" % (port, ZERO), data=body, method="POST",                        headers={"X-Grokgw-Timestamp": ts, "X-Grokgw-Signature": sig})
  • Network accessline 392
    code, _ = http("http://127.0.0.1:%d/%s/result" % (port, ZERO), data=body, method="POST",
  • Network accessline 405
    [Credential-related source omitted]
  • Network accessline 406
    [Credential-related source omitted]
  • Network accessline 407
    [Credential-related source omitted]
  • Network accessline 452
    [Credential-related source omitted]
  • Network accessline 524
    def test_secret_removed_when_nothing_sent(self):         cbdir = os.path.join(self.dir, "cb")         env = self.env(GROKGW_RETURN="callback", GROKGW_CALLBACK_URL="https://hooks.example.com",
  • Network accessline 525
    cbdir = os.path.join(self.dir, "cb")         env = self.env(GROKGW_RETURN="callback", GROKGW_CALLBACK_URL="https://hooks.example.com",                        GROKGW_CALLBACK_DIR=cbdir, GROKGW_DISABLED="1")
  • Network accessline 526
    env = self.env(GROKGW_RETURN="callback", GROKGW_CALLBACK_URL="https://hooks.example.com",
  • Network accessline 534
    cbdir = os.path.join(self.dir, "cb")         env = self.env(GROKGW_WEBHOOK_URL=mock + "/hook", GROKGW_RETURN="callback",                        GROKGW_CALLBACK_URL="https://hooks.example.com", GROKGW_CALLBACK_DIR=cbdir)
  • Network accessline 535
    env = self.env(GROKGW_WEBHOOK_URL=mock + "/hook", GROKGW_RETURN="callback",                        GROKGW_CALLBACK_URL="https://hooks.example.com", GROKGW_CALLBACK_DIR=cbdir)         r = self.run_grokgw("ping", "--no-wait", env=env)
  • Network accessline 536
    GROKGW_CALLBACK_URL="https://hooks.example.com", GROKGW_CALLBACK_DIR=cbdir)
  • Network accessline 541
    with open(os.path.join(cbdir, rid + ".secret"), "r", encoding="utf-8") as f:             self.assertEqual(f.read(), body["return"]["secret"])         self.assertEqual(body["return"]["url"], "https://hooks.example.com")
  • Network accessline 543
    self.assertEqual(body["return"]["url"], "https://hooks.example.com")
  • Network accessline 557
    [Credential-related source omitted]
  • Network accessline 558
    [Credential-related source omitted]
  • Network accessline 559
    [Credential-related source omitted]
  • Network accessline 569
    {"v": 1, "request_id": rid, "op": "ping", "return": {"mode": "unknown"}},             {"v": 1, "request_id": rid, "op": "ping", "return": {"mode": "github", "repo": "bad repo"}},             {"v": 1, "request_id": rid, "op": "ping", "return
  • Network accessline 570
    {"v": 1, "request_id": rid, "op": "ping", "return": {"mode": "github", "repo": "bad repo"}},             {"v": 1, "request_id": rid, "op": "ping", "return": {"mode": "callback", "url": "https://x"}},             {"v": 1, "request_id": rid, 
  • Network accessline 571
    {"v": 1, "request_id": rid, "op": "ping", "return": {"mode": "callback", "url": "https://x"}},
  • Access to secretsline 616
    [Credential-related source omitted]
  • Network accessline 665
    [Credential-related source omitted]
  • Network accessline 666
    [Credential-related source omitted]
  • Network accessline 667
    self.wait_up("http://127.0.0.1:%d/%s.json" % (port, ZERO))
  • Network accessline 668
    url = "http://127.0.0.1:%d/%s.json" % (port, ZERO)

How the signals fit together

Facts from a static read of the files at the pinned commit. They describe what the code does, not why.

Some files could not be read; the facts below still hold.

Signal confidence: 215 facts

and 165 more

Works with

Agent compatibility, from the files in this repository
AgentStatusEvidenceInstall to
Claude CodeNativeManifest .claude-plugin/marketplace.json.claude/skills/<skill-name>/
CodexCompatibleStandard SKILL.md SKILL.md.agents/skills/<skill-name>/
CursorCompatibleStandard SKILL.md SKILL.md.cursor/skills/<skill-name>/
Gemini CLICompatibleStandard SKILL.md SKILL.md.gemini/skills/<skill-name>/
GitHub CopilotCompatibleStandard SKILL.md SKILL.md.github/skills/<skill-name>/
OpenCodeCompatibleStandard SKILL.md SKILL.md.opencode/skills/<skill-name>/
  • Native The repository ships a manifest, folder or frontmatter field for this agent.
  • Compatible A standard SKILL.md that this agent can read.
  • Unknown No evidence either way.

Derived automatically from paths, manifests and frontmatter. Not tested on each agent.