agentleFS
treylomtreylom/ThisCode/skills/thiscode_agy/SKILL.md

thiscode-agy

Skill41 starsChanged 2 months agoMITView on GitHub

Use when integrating Antigravity (agy) CLI with Discord — Y-3 single-shot + Y-2 PTY interactive bridge daemon, tmux 2-pane visual layout (daemon log + agy TUI), per-channel conversation isolation, persona prepend, attachment sandbox, dedup, atomic dispatch with per-channel flock. Drop-in mirror of the Claude Code bridge pattern (AgyDiscordBot + DiscordReplyAdapter + AgyWorker) for Gemini/Antigravity-side bots.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    default = --sandbox (prompt for sensitive ops)

    line 63
  2. Very specific:

    Use this skill for ThisCode agent orchestration and multi-bot coordination.

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

thiscode_agy — Antigravity Discord Bridge Skill

Why this exists: ThisCode/ThisCodex 가 Claude Code (Anthropic) + Codex (OpenAI) bridge 를 표준화했지만, Antigravity CLI (Google Gemini) 도 같은 패턴으로 Discord 에 묶을 가치가 있다. 본 스킬은 그 reference implementation 의 templated 버전이다.

What this skill provides

Architecture (Y-3 + Y-2 hybrid):

  • Y-3 (default): agy --print subprocess per Discord message. Reliable, deterministic stdout for Discord reply.
  • Y-2 (asset mode): agy --prompt-interactive PTY session for /agy-asset commands (image/file generation).
  • tmux 2-pane visual: top = bridge daemon log (live [RAW]/[INBOX]/[OUTBOX] events), bottom = agy CLI TUI (Discord message visually injected via tmux send-keys — UX mirror of sshee codex pattern).

Components (genericized from agent-hassabis/):

  • templates/launch.sh — 2-step tmux launch (placeholder → split → env-correct bridge start), wrapper with suicide guard
  • templates/bridge.py — async bridge daemon (inbox polling fallback + Discord gateway live), per-channel flock, tmux send-keys visual inject
  • templates/discord_client.py — AgyDiscordBot + DiscordReplyAdapter + DedupStore + per-channel asyncio.Lock, heartbeat task, raw debug print
  • templates/agy_worker.py — agy CLI subprocess invocation (argv-based, shell=False, clean env), conversation_id extraction
  • templates/attachment.py, conv_map.py, log_rotation.py, discord_outbox.py — supporting utilities
  • templates/setup_bot_dirs.sh — state + channel dir bootstrap (mode 700, umask 077)
  • templates/requirements.txt, .gitignore — Python deps + git hygiene
  • templates/persona-essence.md.template — persona prepend (only true template file; copy + edit)
  • templates/env.template — .env shape (DISCORD_BOT_TOKEN, AGY_PATH, AGY_UNSAFE, optional GEMINI_MODEL)

Documentation:

  • README.md — 5-minute quickstart
  • setup-guide.md — full setup walkthrough (Discord Developer Portal OAuth + Python venv + agy CLI install + tmux layout)
  • references/architecture.md — Y-3 vs Y-2 design, why this hybrid, attachment sandbox model
  • references/troubleshooting.md — common issues (OAuth scope, message_content intent, tmux pane numbering, persona prepend)

See references/ for detailed procedures only when setup or troubleshooting requires them.

When to use this skill

  • Setting up a new Antigravity-based Discord bot
  • Mirroring the sshee/Codex or agy bridge pattern for a different AI CLI
  • Diagnosing existing agy bridge issues (jump to references/troubleshooting.md)
  • Adding /agy-asset (Y-2 PTY) capability to an existing bot

Quick start

See README.md for the full quickstart (copy commands for each file into ~/my-agy-bot/{launch.sh,persona-essence.md,requirements.txt,.gitignore} and ~/my-agy-bot/scripts/{bridge.py,discord_client.py,agy_worker.py,attachment.py,conv_map.py,log_rotation.py,discord_outbox.py,setup_bot_dirs.sh}). Most templates have their final filename — only env.template and persona-essence.md.template use the .template suffix and require a rename on copy.

See setup-guide.md for full details including OAuth permissions (CRITICAL — bot scope required, not just applications.commands).

Conventions

  • Bot name = single token (no spaces). Used for tmux session name + Discord channel state dir name.
  • Channel state dir = ~/.claude/channels/discord-<bot-name>/ — contains .env, bot-info.json, inbox/, outbox/, soul.md.
  • WD = bot project dir — launch.sh, bridge.py, discord_client.py, agy_worker.py, persona-essence.md, state/.
  • agy CLI permissions:
    • default = --sandbox (prompt for sensitive ops)
    • AGY_UNSAFE=1 in .env = --dangerously-skip-permissions (no prompts; only when single-user trusted host)

What this skill does NOT do

  • It does NOT install agy CLI itself. Get it from Antigravity website + place at ~/.local/bin/agy (default) or set AGY_PATH env.
  • It does NOT manage Discord bot creation (Developer Portal step) — see setup-guide.md §1 for that walkthrough.
  • It does NOT handle multi-bot orchestration (use ThisCode roster system for that).

Reference: the production bot this skill was extracted from

agent-hassabis/ in the maintainer's vault — Demis Hassabis persona, alias hs, tmux session hs, channel ~/.claude/channels/discord-hs/. The persona-specific content was stripped to make this skill generic.


How to Use This Skill

Use this skill for ThisCode agent orchestration and multi-bot coordination. Handles routing to appropriate agent variants, meeting room setup, and bot-to-bot communication within the ThisCode ecosystem.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.