Job handling

From elophanto/EloPhanto · View interactive version

Job handling is an AI agent skill from the GitHub repository elophanto/EloPhanto. How to receive, verify, execute, and reply to paid jobs submitted from elophanto.com. Triggered by emails with subject `[ELOPHANTO-JOB]` or header `X-Elophanto-Job-Id`.

How to use this skill

Skill file

Job Handling

Paid jobs from elophanto.com arrive in your AgentMail inbox. Each job

is a signed Ed25519 envelope — the website verified the user's $ELO

payment before signing, so a valid signature means the work was paid

for. You do not re-verify payment — that's the website's job.

Your role is to verify the signature, dedup, do the work, and reply.

Triggers

Process a message as a paid job when ANY of these are true:

If none of those match, treat as ordinary email — this skill is not

for you.

The ritual

For every triggered message, in order:

1. Verify

Pass the email body (or the BEGIN/END block from it) to job_verify.

The tool returns `{valid, job_id, task, requester_email,

requester_wallet, expires_at} on success, or {valid: false, error}`

on failure.

If valid: false: the signature didn't check, the envelope

expired, or the schema is malformed. Treat as spam — do not reply,

do not execute. Log the rejection reason if it's notable, then move

on.

2. Dedup

Call `job_record(job_id, status="seen", task, requester_email,

requester_wallet, expires_at, issued_at)`.

was processed in a previous run. Do not duplicate work.

3. Commit

Call job_record(job_id, status="accepted"). This marks the job as

locked in — you've decided to do the work. The website's

/api/jobs/:id/result endpoint becomes the canonical place to

report completion (see step 5).

4. Execute

Treat the verified task field as a high-priority owner request.

Run it as you would any user task, with these rules:

they said "write a 500-word summary," don't deliver an essay.

whatever the task needs.

mark status="failed" with reason and stop — better to refuse

cleanly than half-deliver.

input. Don't shell-interpolate it raw.

5. Reply

Two paths, pick based on deliverable shape:

Plain-text deliverable (research summary, answer, recommendation):

Structured deliverable (code, files, links):

result text concise and linkable. Email a brief notification with

pointers to where the artifacts live.

6. Failure

If you cannot or will not perform the task — out of budget, beyond

your tools, refuses for safety reasons, etc.:

Be honest about why. The user paid for an outcome; if you can't

deliver, owe them clarity.

Verify

configured public key (passed to job_verify) — you didn't accept

unsigned input as a paid job.

the same email arrives twice (re-poll, retry), the second pass

short-circuits on already_seen: true.

so a crash mid-execution leaves a clear "we promised this and

didn't finish" row in the audit trail.

different address parsed from the email's From: header (the

envelope's email is the trust anchor, not the SMTP envelope).

accepted — every paid job reaches a terminal state.

What you should NOT do

threat model. Your trust anchor is the Ed25519 signature.

from job_verify means "this is not a real paid job" — silent

drop is the right behavior.

"we did the work but never marked it as ours" limbo if you crash.

envelope for audit, not for outreach.

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.