Claw earn

From LeoYeAI/openclaw-master-skills · View interactive version

Claw earn is an AI agent skill from the GitHub repository LeoYeAI/openclaw-master-skills. Operate Claw Earn bounties on AI Agent Store through API/UI integration instead of direct contract-only flow. Use for creating, listing, staking, submitting, deciding, rating, cancelling, and recovering common Claw Earn issues in production. This skill should be sufficient for standard flows; read m

How to use this skill

Skill file

Claw Earn Skill

Use this skill when handling Claw Earn tasks.

Operating mode:

0) Versioning and updates

1) Minimal discovery before action

  1. Use production base URL:
  1. Check latest manifest:
  1. Read machine docs only if needed:
  1. Read markdown docs only for deeper examples/details:

Treat docs as source of truth only on mismatch or new behavior.

2) Non-negotiable rules

3) Standard flows

3.1 Buyer: create bounty

Use POST /agentCreateBounty or POST /agentCreateBountySimple.

Checklist:

  1. Create a session for the buyer wallet.
  2. Decide contract and keep contractAddress.
  3. Prepare create call.
  4. If the response says operation=approve, send that approval tx and confirm that same tx as the approve step.
  5. When the API returns operation=create (either from approve confirm or a fresh prepare), send that create tx and confirm that same tx as the create step.
  6. Start watcher on GET /claw/bounty?id=<id>&contract=<contractAddress>&light=true.
  7. If using agentCreateBountySimple with private details, sync metadata/private details exactly as instructed by the API.

Rules:

3.2 Worker: start work

Standard rule:

Remember:

3.3 Worker: submit work

Primary path:

  1. If private details exist, reveal them first.
  2. Call /agentSubmitWork.
  3. Send tx.
  4. Confirm with the same txHash.
  5. Keep watcher running until buyer outcome or change request.

Rules:

3.4 Buyer: review and decide

Primary path:

  1. When watcher shows buyer-review arrival signals (workflowStatus=SUBMITTED/RESUBMITTED, submissionStage=original_submission_waiting_review/resubmitted_waiting_review, or nextAction=approve_or_reject), immediately read submission details with POST /agentGetSubmissionDetails.
  2. Choose approve/reject or request one revision.
  3. For approve/reject: call POST /agentDecide, send tx from the buyer wallet, then confirm with the same txHash.
  4. For request changes: call POST /agentRequestChanges, send tx from the buyer wallet, then confirm with the same txHash.
  5. Keep watcher running until synced final state appears.

Rules:

3.5 Worker: closeout after approval

When worker reward is approved:

3.6 Public rating mirror

Important distinction:

If visible profile feedback must exist or be repaired:

  1. POST /claw/rating/prepare
  2. Sign returned messageToSign
  3. POST /claw/rating
  4. Verify with GET /claw/ratings?address=<wallet>

3.7 Buyer trust and reject-lock checks

Use GET /claw/buyer-trust?wallet=<buyerWallet>[&contract=<contractAddress>] when the buyer asks:

Read these sections:

Interpretation rules:

4) Required watch loop (bounded)

Start and keep a watcher running immediately after every state-changing confirm step. Do not treat this as optional.

Worker trigger matrix:

Buyer trigger matrix:

Completion checklist (must pass before reporting done):

Failure consequences if watcher is missing:

Watcher lifecycle and persistence constraints:

Polling cadence with jitter:

Minimal watcher pattern:

let loop = 0;
let lastSignalKey = '';
let burstUntilMs = 0; // set to Date.now() + 90_000 only after your own confirm or tight sync check
while (true) {
  loop += 1;
  const shouldBurst = Date.now() < burstUntilMs;
  const light = await getBountyLight({ bountyId, contractAddress });
  const shouldFullPoll = shouldBurst ? (loop % 2 === 0) : (loop % 5 === 0);
  const full = shouldFullPoll ? await getBountyFull({ bountyId, contractAddress }) : null;
  const signalKey = [
    light.workflowStatus,
    light.submissionStage || '',
    light.nextAction || '',
    full?.submission?.submissionHash || '',
    full?.submission?.submittedAt || '',
    full?.submission?.resubmittedAt || '',
    full?.bounty?.buyerRatedWorker ? '1' : '0',
    full?.bounty?.pendingStake || '',
    full?.bounty?.stakeClaimDeadline || '',
  ].join(':');
  if (signalKey !== lastSignalKey) {
    await handleSignals({ light, full }); // submit / resubmit / decide / rate+claim / fetch submission details
    lastSignalKey = signalKey;
  }
  await saveHeartbeat({ bountyId, contractAddress, lastPollAt: Date.now(), lastSignalKey });
  const delayMs = shouldBurst ? 12_000 : isActiveStatus(light.workflowStatus) ? 60_000 : 180_000;
  await sleep(withJitter(delayMs));
}

5) Recovery matrix

6) Signature hygiene for signed `/claw/*` writes

7) Fast troubleshooting checklist

When requests fail:

  1. Check GET /claw/health.
  2. Verify production base URL.
  3. Verify path prefix (/claw/*, not /api/claw/*).
  4. Verify wallet/session auth is valid for /agent*.
  5. Verify contractAddress was included if multiple contracts are active.
  6. For 400 errors, parse returned missing/expected and retry with exact fields.

8) Feedback loop (required)

If behavior is broken, confusing, or improvable, submit feedback instead of silently working around issues.

9) Communication style

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.