Help us improve
Share bugs, ideas, or general feedback.
From mega-code
Signs in to MEGA-Code via GitHub or Google OAuth to obtain an API key. Uses a two-step OAuth flow with browser-based login.
npx claudepluginhub wisdomgraph/mega-code --plugin mega-codeHow this skill is triggered — by the user, by Claude, or both
Slash command
/mega-code:login [--provider github|google] [--url https://console.megacode.ai][--provider github|google] [--url https://console.megacode.ai]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Authenticate with MEGA-Code to obtain an API key using a two-step OAuth flow.
Provides Python patterns for external service authentication using API keys, OAuth, tokens. Includes verification flows, smoke tests, env checks, and error handling with leyline.
Implements OAuth 2.0 for GitHub and Microsoft Entra in Cloudflare Workers and edge runtimes. Covers headers, scopes, token handling, quirks, and 403 fixes without MSAL.
Installs @mirohq/miro-api Node.js client and configures OAuth 2.0 authentication for Miro REST API v2.
Share bugs, ideas, or general feedback.
Authenticate with MEGA-Code to obtain an API key using a two-step OAuth flow.
MEGA_DIR="$(cd "${CLAUDE_SKILL_DIR}/../.." && pwd)"
export MEGA_CODE_AGENT="claude"
uv run --directory "$MEGA_DIR" python -m mega_code.client.login --step create [--url URL]
Add --provider github for GitHub OAuth instead of Google.
Add --url URL to specify the server (default: https://console.megacode.ai).
Returns a JSON object to stdout:
{"login_url": "https://...", "client_id": "abc-123", "base_url": "https://..."}
On error, the JSON has an error field instead.
After getting the JSON:
login_url to the user — tell them to open it in their browserclient_id and base_url for Step 2uv run --directory "$MEGA_DIR" python -m mega_code.client.login \
--step poll --client-id CLIENT_ID --url BASE_URL
Replace CLIENT_ID and BASE_URL with values from Step 1.
Run this in the background so the user is not blocked.
On success, saves to ~/.local/share/mega-code/.env (stable, version-independent):
MEGA_CODE_API_KEY, MEGA_CODE_CLIENT_MODE=remote, MEGA_CODE_SERVER_URLPolls every 3s, times out after 10 minutes.
Credentials are stored in the stable data directory, not the versioned plugin dir. Do not print the raw API key — mask it.
grep -E "MEGA_CODE_(API_KEY|CLIENT_MODE|SERVER_URL)" "$HOME/.local/share/mega-code/.env" \
| sed -E 's/(MEGA_CODE_API_KEY=.{6}).*/\1***/'
MEGA_CODE_SERVER_URL in ~/.local/share/mega-code/.env.