← 返回 Skills 市场
maheshmurthy

Setup Agent

作者 Mahesh Murthy · GitHub ↗ · v0.2.0 · MIT-0
cross-platform ⚠ suspicious
254
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install karma-setup-agent
功能描述
Set up or log in to Karma. Use when user says "set up agent", "configure API key", "connect to Karma", "login to Karma", "log in", or before first use of any...
使用说明 (SKILL.md)

Setup Karma Agent

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.

Flow

Check if KARMA_API_KEY is already set:

  • If set → skip to Verify Configuration
  • If not set → use the 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

Quick Start — No Account Needed

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)

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.2.0" \
  -d '{}'

Expected response:

{ "key": "karma_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }

The key is shown only once. Proceed immediately to Set 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).

Create API Key via Email

Step 1: Ask for Email

Ask the user for their email address.

Step 2: Send Verification Code

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.2.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."

Step 3: Verify Code

Ask the user for the code they received, then:

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.2.0" \
  -d '{
    "email": "[email protected]",
    "code": "123456",
    "name": "claude-agent"
  }'

Expected response:

{ "key": "karma_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }

Important: The key is shown only once. Proceed immediately to set it.

Step 4: Handle Errors

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

1. Save Your API Key

After obtaining the key, ask permission to save it permanently:

Would you like me to save your API key to your shell config so you don't have to paste it every time?

If yes, detect the user's shell and append the export:

# Detect shell config file
if [ -f "$HOME/.zshrc" ]; then
  SHELL_RC="$HOME/.zshrc"
elif [ -f "$HOME/.bashrc" ]; then
  SHELL_RC="$HOME/.bashrc"
fi

# Append only if not already present
grep -q 'KARMA_API_KEY' "$SHELL_RC" || echo '\
# Karma API Key\
export KARMA_API_KEY="karma_..."' >> "$SHELL_RC"

# Also export for current session
export KARMA_API_KEY="karma_..."

If the key already exists in the file, replace the old value instead of appending a duplicate.

If the user declines, just set it for the current session:

export KARMA_API_KEY="karma_your_key_here"

2. Set the API URL (Optional)

Defaults to production. For local development:

export KARMA_API_URL="http://localhost:3002"

3. Verify Configuration

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.2.0" \
  | python3 -m json.tool

Expected response:

{
  "walletAddress": "0x...",
  "smartAccountAddress": "0x...",
  "supportedChainIds": [10, 137, 1135, ...],
  "supportedActions": ["createProject", "createMilestone", ...]
}

4. Confirm Success

If the response includes walletAddress and supportedActions, tell the user their API key and that 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 updates
  • find-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.

Troubleshooting

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 export KARMA_API_KEY="karma_..." in your terminal
安全使用建议
This skill appears to do what it claims (create or verify a Karma API key and offer to save it), but review these points before allowing it to run: 1) Verify the service domain (gapapi.karmahq.xyz) and confirm you trust this Karma source — the skill metadata has no homepage. 2) Storing an API key in ~/.bashrc or ~/.zshrc leaves it in plaintext and can be exposed via backups or other accounts on the machine; prefer using a session-only export, an OS keyring/secret manager, or a credentials file with tighter permissions. 3) The skill will run curl/uuidgen/python3 commands locally and send requests to the external API; inspect the exact curl commands if you are concerned. 4) If you decline saving the key permanently, the skill will only set it for the current session. 5) If the key is ever exposed, revoke/regenerate it immediately. If you want higher assurance, ask the skill author for an official homepage or repo and prefer installing tools from a verified source.
功能分析
Type: OpenClaw Skill Name: karma-setup-agent Version: 0.2.0 The skill automates API key configuration for the Karma platform by making network requests to gapapi.karmahq.xyz and modifying user shell configuration files (.zshrc, .bashrc) to persist credentials. While these actions are aligned with the stated purpose of an authentication setup and the instructions include a step to ask for user permission, the direct modification of shell profiles and the handling of sensitive API keys via shell scripts represent high-risk capabilities.
能力评估
Purpose & Capability
Name/description align with the instructions: the document describes generating or verifying a Karma API key (quick-start registration or email flow), verifying the key, and saving it for future use. No unrelated binaries, cloud credentials, or unrelated services are requested.
Instruction Scope
Instructions direct the agent to call Karma API endpoints (curl POSTs), ask the user for email/code, and optionally append/replace an export in the user's shell rc file. These actions are coherent with setup but include sensitive operations (writing secrets to shell config, exporting keys into the environment) and send requests to an external endpoint (gapapi.karmahq.xyz). The skill also relies on local tools (uuidgen, curl, python3) without declaring them.
Install Mechanism
Instruction-only skill with no install spec and no code files — nothing is downloaded or written by an installer. Risk from install mechanism is minimal.
Credentials
The skill uses and manages one sensitive secret (KARMA_API_KEY) and an optional KARMA_API_URL. It does not request unrelated credentials, but it recommends persisting the API key in plaintext in shell rc files (~/.zshrc or ~/.bashrc), which increases exposure risk on shared or backed-up machines.
Persistence & Privilege
always:false and the skill is user-invocable (normal). The skill asks for permission before saving the API key, but if permitted it will modify the user's shell profile (append or replace export lines). This is a significant file-write action but scoped to the user's shell config and not to other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install karma-setup-agent
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /karma-setup-agent 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.2.0
Version 0.2.0 of karma-setup-agent features a fully reworked and expanded setup flow for connecting to Karma. - Adds Quick Start (no account required) and Email Login setup options for obtaining your API key. - Provides detailed, step-by-step instructions for saving and verifying your Karma API key, with user-friendly prompts. - Introduces error handling guidance for common scenarios (invalid code, key conflicts, rate limits). - Expands troubleshooting section for easier self-service support. - Clarifies requirements and output, focused on a seamless first-time setup experience.
元数据
Slug karma-setup-agent
版本 0.2.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Setup Agent 是什么?

Set up or log in to Karma. Use when user says "set up agent", "configure API key", "connect to Karma", "login to Karma", "log in", or before first use of any... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 254 次。

如何安装 Setup Agent?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install karma-setup-agent」即可一键安装,无需额外配置。

Setup Agent 是免费的吗?

是的,Setup Agent 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Setup Agent 支持哪些平台?

Setup Agent 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Setup Agent?

由 Mahesh Murthy(@maheshmurthy)开发并维护,当前版本 v0.2.0。

💬 留言讨论