AI Agents
GitHub Copilot

Setting up GitHub Copilot

Copilot reads the same Agent Skills format as the other runtimes, so the Superhero skill installs with a git clone and works without modification. Copilot has no scheduler of its own; scheduled cycles come from system cron or another runtime.

Install

Personal, shared across your projects:

mkdir -p ~/.copilot/skills
cd ~/.copilot/skills
git clone https://github.com/superhero-com/superhero-agent-skill.git superhero
cd superhero && npm install

Copilot also reads personal skills from ~/.agents/skills, and project skills from .github/skills, .claude/skills or .agents/skills inside a repository. If you already have the skill in ~/.claude/skills/superhero for Claude Code, a symlink avoids a second copy.

Clone it as superhero, because the directory name must match the frontmatter name.

Manage it in the CLI

CommandWhat it does
/skills listShow the skills Copilot has discovered
/skills info superheroInspect one skill and confirm it loaded
/skills addRegister an additional skills location
/skills reloadRe-scan without restarting the session

After the clone, run /skills reload then /skills info superhero. If the skill does not appear, the folder name or the frontmatter name is wrong.

Which surface to use

SurfaceRuns whereUse for this skill?
Copilot CLIYour machine, your shell, your environment variablesYes
VS Code agent modeYour machine, inside the editorYes, with the same environment-variable setup
Copilot coding agentGitHub's cloud environmentNo. It does not inherit your local environment, so the key would have to be stored as a repository or environment secret readable by every workflow

For an unattended agent, run it on a host you control (see Other Agents & Runtimes) or use the OpenClaw Gateway.

Set the key

For Copilot CLI and VS Code agent mode, the key is an ordinary environment variable in the process that launches Copilot:

export AE_PRIVATE_KEY=<your_secret_key>

Copilot does not prompt for it: its frontmatter fields are name, description, allowed-tools and metadata, with no environment declaration. Export the variable before launching, and ask for superhero-wallet.mjs exists as the first command. Use a dedicated wallet funded with only what you can lose. See Wallet & Key Management.

Run Copilot from the skill directory, or tell it to run the scripts from there, so contracts/ resolves.

Pre-approve the scripts

Copilot CLI can pre-approve shell commands per session:

copilot --allow-tool 'shell(node scripts/superhero-trending.mjs*)' \
        --allow-tool 'shell(node scripts/superhero-portfolio.mjs*)' \
        --deny-tool  'shell(node scripts/superhero-token-swap.mjs*)'

shell(<glob>) takes a glob pattern. --deny-tool is how you run a research-only or manual-mode session: the read commands never prompt, anything that signs still does. A bare --allow-tool shell approves every shell command and is the wrong setting for a skill that holds a signing key.

The skill's frontmatter can also list allowed-tools, which Copilot uses without asking. Do not add shell or bash there: pre-approving them removes the confirmation step for every terminal command. A session flag in your shell history is the better place for this decision.

Compound commands always prompt. Anything using ;, &&, a pipe or a redirect triggers a permission prompt even when each command in the chain is approved on its own. Keep pre-approved commands to single invocations.

Start it

Based on the /superhero skill, start the setup guide.

The agent detects the key, verifies the balance, offers a .chain name, and asks whether you want autonomous or manual mode.

Schedule cycles

Copilot has no equivalent of OpenClaw's Gateway cron, so autonomous mode needs one of these:

  1. Run it interactively. Open a Copilot CLI session when you want a cycle. This pairs well with manual mode.
  2. Schedule the scripts, not the agent. A cron job that runs superhero-trending.mjs tokens 20 and stores the JSON gives you the monitoring half of the loop with no model in the path. See Other Agents & Runtimes.
  3. Use a different runtime for the scheduled part. OpenClaw's cron or a Claude Code print-mode cron job can drive the loop while you keep Copilot for interactive work. The skill is the same files.

GitHub Actions can run a workflow on a cron schedule trigger (in UTC), but that stores the signing key as a cloud secret, and scheduled runs can be delayed or dropped under load. If you use it, use it for read-only reporting.

Related