/karma:setup-agentfrom karma
Configures the Karma API key for agent skills. Handles instant key generation, email-based login, and manual key entry.
Ships in karma. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Configure your environment to use Karma agent skills. Run this once before using any action skill.
See Agent API Reference for base URL and error handling.
Check if KARMA_API_KEY is already set:
AskUserQuestion tool with these options:
Question: "You need a Karma API key to continue. How would you like to set it up?"
Options: ["Quick start — Generate instantly (no account needed)", "Email login — Link to existing Karma account", "I already have a key"]
Quick start → go to Quick Start — No Account Needed
Email login → go to Create API Key via Email
I already have a key → ask for the key, skip to Save Your API Key
The fastest way to get started. No email, no login, no existing account required.
BASE_URL="${KARMA_API_URL:-https://gapapi.karmahq.xyz}"
INVOCATION_ID=$(uuidgen)
RESPONSE=$(curl -s -X POST "${BASE_URL}/v2/agent/register" \
-H "Content-Type: application/json" \
-H "X-Source: skill:setup-agent" -H "X-Invocation-Id: $INVOCATION_ID" -H "X-Skill-Version: 0.3.0" \
-d '{}')
API_KEY=$(echo "$RESPONSE" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('key','') or d.get('apiKey',''))")
Extract the key value from the response into API_KEY. Proceed immediately to Save Your API Key.
Note: Projects created with this method get their own wallet. They won't be linked to an existing Karma account, so they can't be managed from the website yet (coming in a future update).
Ask the user for their email address.
BASE_URL="${KARMA_API_URL:-https://gapapi.karmahq.xyz}"
INVOCATION_ID=$(uuidgen)
curl -s -X POST "${BASE_URL}/v2/api-keys/auth/init" \
-H "Content-Type: application/json" \
-H "X-Source: skill:setup-agent" -H "X-Invocation-Id: $INVOCATION_ID" -H "X-Skill-Version: 0.3.0" \
-d '{ "email": "[email protected]" }'
Expected response:
{ "message": "Verification code sent to [email protected]" }
Tell the user: "Check your email for a verification code from Karma."
Ask the user for the code they received, then:
RESPONSE=$(curl -s -X POST "${BASE_URL}/v2/api-keys/auth/verify" \
-H "Content-Type: application/json" \
-H "X-Source: skill:setup-agent" -H "X-Invocation-Id: $INVOCATION_ID" -H "X-Skill-Version: 0.3.0" \
-d '{
"email": "[email protected]",
"code": "123456",
"name": "claude-agent"
}')
API_KEY=$(echo "$RESPONSE" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('key','') or d.get('apiKey',''))")
Extract the key value into API_KEY. Proceed immediately to save it.
| Error | Meaning | Action |
|---|---|---|
400 Invalid or expired code | Wrong code or expired | Ask user to check code or request a new one |
409 Active key already exists | User already has a key | Tell them to use their existing key or revoke it from the website |
429 Too many requests | Rate limited | Wait and try again |
After obtaining the key (stored in API_KEY variable), save it automatically. The save method depends on the environment:
CLAUDE_PLUGIN_DATA is set):Save to the plugin's persistent data directory — this works in both CLI and Cowork and persists across sessions automatically:
mkdir -p "${CLAUDE_PLUGIN_DATA}"
echo "{\"apiKey\": \"${API_KEY}\"}" > "${CLAUDE_PLUGIN_DATA}/credentials.json"
export KARMA_API_KEY="${API_KEY}"
Tell the user:
Your API key has been saved and will be loaded automatically in future sessions.
CLAUDE_PLUGIN_DATA):Set the key for the current session:
export KARMA_API_KEY="${API_KEY}"
Then ask the user if they want to persist it:
Your API key is set for this session. Would you like me to save it to your shell config so it persists across sessions?
If yes:
if [ -f "$HOME/.zshrc" ]; then
SHELL_RC="$HOME/.zshrc"
elif [ -f "$HOME/.bashrc" ]; then
SHELL_RC="$HOME/.bashrc"
fi
if grep -q 'KARMA_API_KEY' "$SHELL_RC" 2>/dev/null; then
sed -i.bak "s/export KARMA_API_KEY=.*/export KARMA_API_KEY=\"${API_KEY}\"/" "$SHELL_RC"
else
echo "\n# Karma API Key\nexport KARMA_API_KEY=\"${API_KEY}\"" >> "$SHELL_RC"
fi
If no, the key is only available for the current session.
Defaults to production. For local development:
export KARMA_API_URL="http://localhost:3002"
curl -s "${KARMA_API_URL:-https://gapapi.karmahq.xyz}/v2/agent/info" \
-H "x-api-key: ${KARMA_API_KEY}" \
-H "X-Source: skill:setup-agent" -H "X-Invocation-Id: $INVOCATION_ID" -H "X-Skill-Version: 0.3.0" \
| python3 -m json.tool
Expected response:
{
"walletAddress": "0x...",
"smartAccountAddress": "0x...",
"supportedChainIds": [10, 137, 1135, ...],
"supportedActions": ["createProject", "createMilestone", ...]
}
If the response includes walletAddress and supportedActions, show the user their API key and confirm they're ready:
Your Karma agent is ready!
API Key:
karma_...(the key from step 1 or the email flow)You can now use these skills:
project-manager— Create and manage projects, grants, milestones, and updatesfind-funding-opportunities— Search for grants, hackathons, bounties, and more
Do NOT show wallet address, smart account address, or chain IDs to the user. They only need the API key.
This setup skill only handles authentication — it does not execute any on-chain or financial actions. The action skills (project-manager, funding-program-manager) enforce their own confirmation flows before executing operations.
| Issue | Fix |
|---|---|
401 Invalid or revoked API key | Key is wrong or expired — regenerate via email flow or at karmahq.xyz |
walletAddress: null | Key was created before server wallets — regenerate it |
Connection refused | Wrong KARMA_API_URL — check the URL is reachable |
KARMA_API_KEY not set | Run the setup-agent skill again to generate a new key |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (show-karma/skills) — no native marketplace selected
npx claudepluginhub p/show-karma-skill-creator8 skills in this plugin
/find-funding-opportunitiesSearch the Karma Funding Map for funding programs (grants, hackathons, bounties, accelerators, VC funds, RFPs) via the public API. Use when user says "find grants", "search hackathons", "look for bounties", "explore funding", "programs on Optimism", "what can I apply to", "funding opportunities", or asks about programs over or under a budget./funding-program-managerCreate and manage funding programs on Karma — create programs in the registry, configure intake forms, apply to programs, manage reviewers, applications, milestones, payouts, grant agreements, and AI evaluation. Use when user says "create a program", "new funding program", "set up grants program", "configure intake form", "add form fields", "apply to program", "submit application", "apply for grant", "manage program", "list reviewers", "add reviewer", "remove reviewer", "review applications", "approve application", "reject application", "application status", "list applications", "milestone completions", "pending milestones", "create payout", "disbursement", "payout history", "grant agreement", "sign agreement", "evaluate application", "AI score", "application comment", "enable applications", "update program", "my programs", "which programs do I manage", "program financials", "project milestones", "waiting verification", "milestone report", "project updates", "milestone invoices", "unpaid invoices", "my review queue", "reviewer inbox", "what do I need to review", "which programs do I review", "who is assigned", "application history", "private note", "KYC status", "milestone timeline", or any funding program administration action./manage-portfolio-reportsBuild a community's Karma portfolio report from Karma data, show it to the user for approval, then save it to Karma as a draft and publish on request; also find, edit, unpublish and list reports and series. Use when user says "generate a report", "build the biweekly report", "create the monthly report", "upload this report to Karma", "publish the September report", "edit the report", "change the report title", "show me the draft reports", "which report series exist", "unpublish the report"./project-managerManage projects, grants, milestones, and updates on the Karma protocol. Use when user says "create a project", "new project", "add a grant", "record funding", "add milestone", "complete milestone", "post an update", "project progress", "grant update", "update project", "edit project", "edit grant", "complete grant", "add roadmap milestone", "report impact", "endorse project", "add team member", "set up agent", "configure API key", "check payouts", "payout status", "payout history", "total disbursed", "view invoices", "download invoice", or any project management action./simocracy-evaluationsEvaluate a Karma funding application, or its delivered milestones, with the Simocracy Sims of its program and save each Sim's verdict on Karma as a private draft for reviewers to approve. Applications and programs can be named by reference number, id, project name or program name. Use when user says "evaluate this application with the Sims", "run Sim application evaluation", "Sim review of application", "evaluate milestones with the Sims", "run Sim milestone evaluation", "Sim review of milestone", "which milestones are ready for Sim evaluation", "milestone completion evaluation", "revise the Sim verdicts with the reviewer feedback", "show the pending Sim verdicts"./simocracy-milestone-evaluationsDeprecated. Renamed to simocracy-evaluations, which evaluates applications as well as milestones with the Simocracy Sims. Use simocracy-evaluations instead.Other plugins' skills for the same job