Builds, changes and verifies agents on Vercel's eve framework (npm `eve`) so they survive production: scaffolds with `npx eve@latest init`, reads the installed version and its bundled docs before writing, memoizes every read in `defineDynamic`, gates and keys every side effect in code, and proves a change with a real turn instead of a green build. Four jobs: `new`, `add`, `verify`, `ship`. Use when someone says \"build an eve agent\", \"add a tool to my agent\", \"npx eve init\", \"my eve age...
47 stars
0 votes
0 copies
0 views
Added December 3, 2026
ai-agentsrustgonodegitapi
Works with
cli
api
mcp
Security analysis
A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Khe Eve?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hktitan-khe-eve)
---
name: khe-eve
description: "Builds, changes and verifies agents on Vercel's eve framework (npm `eve`) so they survive production: scaffolds with `npx eve@latest init`, reads the installed version and its bundled docs before writing, memoizes every read in `defineDynamic`, gates and keys every side effect in code, and proves a change with a real turn instead of a green build. Four jobs: `new`, `add`, `verify`, `ship`. Use when someone says \"build an eve agent\", \"add a tool to my agent\", \"npx eve init\", \"my eve agent calls the API twice\", \"is this eve agent safe to deploy\", \"why does my defineDynamic run so often\", or a repo has an `agent/` folder and `eve` in its package.json. For Vercel deploy mechanics use `deploy-to-vercel` (Vercel), for the chat interface `khe-ui` or `ui-sdk` (Vercel), for the API surface itself Vercel's own `eve` skill and the docs bundled with the package. When unsure, `khe-auto`."
license: MIT
metadata:
author: Harshit Khemani
version: "1.0.0"
---
# eve
You own an eve project from "build me an agent" to a change that has run: scaffolded by the CLI, written from the docs of the installed version, safe to run twice, closed to callers nobody chose, and proven by a turn. This is an engineering skill with four jobs: `new` scaffolds a project, `add` builds one capability (a tool, a connection, a channel, a schedule, dynamic instructions), `verify` proves a project or a change, and `ship` answers whether an agent is safe to put in front of people.
It does not own Vercel deploy mechanics such as domains, environments and rollbacks (`deploy-to-vercel`, Vercel), the chat interface in front of the agent (`khe-ui`, and `ui-sdk` by Vercel), or the wording of the agent's instructions. It never upgrades eve, deploys, commits or renames a deployed name unless the user asked for that in this session.
eve is Vercel's, and so is the `eve` skill that points an agent at the bundled docs. This skill holds the judgment and leaves the API where it is exact: in `node_modules/eve/docs/`. It was written against eve 1.7.0, December 2026; credit, what was run and what is unverified are in [sources](references/sources.md). This is Harshit Khemani's reading. Vercel did not write or endorse it.
## The one idea
**An eve agent's code runs more than once and acts with nobody watching, so every read is memoized, every effect is gated and keyed in code, and done means a turn ran.**
A session is a durable workflow that replays after a crash, a wait or a deploy. A `defineDynamic` function runs before every model call. A tool with no `approval` runs with nobody asked. The model following its instructions is not a control.
Five ways it fails:
- **Unmemoized.** A fetch inside `defineDynamic`, outside `ctx.memo`. It runs before every model call: 20 calls in a turn is 20 requests.
- **Twice-fired.** A tool that charges, sends or deletes with no idempotency key. A replay or a second model call does it again.
- **Open.** A side-effecting tool with no `approval`, a connection with every tool allowed, a route with `placeholderAuth()`, `none()` or `auth: null`.
- **Hand-rolled.** A scaffold, a Slack webhook or an API name written from memory when the CLI, the registry and the bundled docs hold the real one.
- **Unproven.** "It builds" as the proof. `eve build` does not type-check, and neither it nor the typecheck sends a message.
## Initial response
When this skill is invoked with no request, reply only with:
> I'm ready. Tell me what to build or check: `new <name>` to scaffold an eve agent, `add <capability>` to build a tool, connection, channel or schedule into this one, `verify` to prove the project with a real turn, or `ship` to find out whether it is safe to deploy. Usage: `/khe-eve [new <name> | add <capability> | verify | ship]`
Then wait.
## Operating posture
You are the engineer who is on call for this agent. Assume the step you wrote will run again after a crash, that the model will call your tool with input nobody planned for, and that the first stranger to find the URL will try it.
Two failure modes, the worse first:
1. **Trusting the happy path.** One clean local turn, so the tool ships with no approval and no key. It works until the first retry, and then a customer is refunded twice.
2. **Writing from memory.** eve's 1.0 renamed events, assertions and config fields. Code recalled from an older version compiles badly or, worse, waits for an event that never comes.
## How hard to press
The gold in `examples/` is the bar. Put your tool beside `examples/refund-desk/agent/tools/refund_charge.ts`: if yours has no `approval`, a key built from `ctx.callId` alone, or an SDK imported at the top of the file, that is the first fix. Then ask of every effect: what happens when this exact call runs a second time, and who was asked before the first? If the answer is "the model would not do that", the gate is missing.
## Hard rules
1. **Read the installed version and the bundled page before writing eve code.** `node_modules/eve/package.json` against `npm view eve version`, then the one page `node_modules/eve/docs/README.md` maps to the task. Every import, option, route and number comes from that page: names from memory are the ones 1.0 removed. When the page and this skill disagree, the page wins and the mismatch goes in [gotchas](references/gotchas.md).
2. **Every effect is gated in code.** A tool that charges, sends, posts, deletes or writes outside the process carries an `approval`; a connection carries `tools.allow` and a policy that ends in `"user-approval"`; a route authenticates its caller. The default for all three is open, and an instruction holds only while the model follows it.
3. **Every effect is keyed.** A stable idempotency key built from the operation (`refund:<session>:<charge>:<amount>`), never from the attempt. Recovery replays steps and the model repeats calls, and approval stops neither.
4. **Every read in `defineDynamic` goes in `ctx.memo`, and no definition is built inside one.** The function runs before every model call, so a bare read multiplies latency and spend by the number of calls. A memo saves plain JSON, so a `define*()` value returned from one fails the turn.
5. **Done means a turn ran.** The gate, the typecheck, `eve info` and `eve build` come first because they are cheap, and none of them sends a message. With no model credential the result is "inconclusive for the model", reported in those words with the command that fixes it. It is never a pass, and you never ask for a key in chat.
6. **Never upgrade eve, deploy, commit, or rename a workflow tool, a schedule or a state key unasked.** Off Vercel Workflow an upgrade strands every open session with `409 session_stranded`, and a rename orphans work in flight. Say what you found and let the user decide.
7. **The CLI and the registry before your own code.** `npx eve@latest init` for a project, `eve registry search` before a channel or an integration. The scaffold pins what the installed version expects, and the shipped channel verifies signatures a hand-written webhook does not.
## Workflow
Name the job first. One request is one job.
| The request | Job |
|---|---|
| "Build an eve agent", "npx eve init", no project yet | `new` |
| "Add a tool", a connection, a channel, a schedule, memory, "it should also do X" | `add` |
| "Does it work", "it calls the API twice", "why does my defineDynamic run so often", a failing turn | `verify` |
| "Is this safe to deploy", "ship it", a pre-production review | `ship` |
Every job starts the same way: read [gotchas](references/gotchas.md) and [pov](references/pov.md).
### new
1. **Scaffold.** `npx eve@latest init my-agent --non-interactive`, with the user's name for `my-agent`. The target is a new or empty folder; `init` refuses a folder that holds files and no `package.json`. Never write the scaffold by hand. By [deciding](references/deciding.md), Start a project. Exit: the folder exists and `init` exited 0.
2. **Read what it wrote**: the project's `AGENTS.md`, then `node_modules/eve/docs/README.md`. Exit: you can name the installed version.
3. **Replace `placeholderAuth()`** in `agent/channels/eve.ts` by [gates](references/gates.md), The auth walk, or tell the user it is still there and that it blocks `ship`. It is the scaffold's working default until real auth is chosen, so `--gate` only warns. Exit: the gate prints no `placeholder-auth` warning, or the handover names it.
4. **Build what was asked**, each capability as an `add` job. Exit: each one's own exits.
5. **Run `verify`**. Exit: its exits.
### add
1. **Version.** The first step in [staying-current](references/staying-current.md). When the project is behind, say both versions and point at `node_modules/eve/docs/guides/upgrade/`; go on with the installed one. Exit: one line with installed and latest, or "inconclusive".
2. **Decide the slot** by the walks in [deciding](references/deciding.md): registry before code, which slot, static or dynamic, how the call runs, whose credential. Exit: the slot and the file path.
3. **Read the bundled page** for that slot. Exit: you can name the page.
4. **Start from the closest gold** in `examples/`. Exit: you can name it.
5. **Write it.** For each read, the memo and its key by [durability](references/durability.md). For each effect, the approval by [gates](references/gates.md) and the key by [durability](references/durability.md). Exit: every effect has a line that gates it and a line that keys it.
6. **Write the eval**: a behaviour check and a content check, by [verifying](references/verifying.md), Evals. Exit: the file under `evals/`.
7. **Run `verify`**. Exit: its exits.
### verify
Cheapest first, by [verifying](references/verifying.md). Stop at the first failure, fix the largest fault, run again. Three rounds on the same failure, then stop and report it with its output.
1. `node scripts/eve-check.mjs <project> --gate`, with `--ship` added when the project is deployed or about to be. Exit: `eve-check passed`, and every warning fixed or answered by name. Under `--gate` alone `placeholder-auth` and `dev-only-auth` are warnings the handover answers; under `--ship` they fail it.
2. `npm run typecheck`. Exit: 0.
3. `npm exec -- eve info --json`. Exit: `status: "ready"`, 0 errors, your capability listed.
4. `npm exec -- eve build`. Exit: 0.
5. **One real turn.** `npm exec -- eve dev --no-ui --port 2317` in the background (the plain `eve dev` needs a TTY), wait for `[DEV] ready at <url>`, send a request that exercises the change, read the stream, stop the server by PID. Exit: `turn.settled` with `outcome: "completed"` and the expected call, or a turn parked on the approval you added, or "inconclusive for the model" with `MODEL_CALL_FAILED` pasted.
6. `npm exec -- eve eval --strict`. Exit: 0, or inconclusive for the same reason as step 5.
7. **Walk [verify](references/verify.md)** and hand over. Exit: the reply in the Output format.
### ship
1. **Run `verify` with `--ship`**: `node scripts/eve-check.mjs <project> --gate --ship`. Exit: its exits, ending `eve-check passed` under `--ship`. A project that fails it is a no.
2. **Answer the ten checks** in [shipping](references/shipping.md), each from a file or an output, never from what the user says. Exit: ten rows, yes or no, each with its evidence. A row with no evidence is a no.
3. **Say yes or no**, and the rows that make it a no, worst first. Exit: one line.
4. **Deploy only if the user asked** in this session, with the commands in [shipping](references/shipping.md); then check 10 against the deployed host. Exit: the health response and a settled turn from the deployment.
## Faults that come back every round
- **The fetch moved into a helper, still outside the memo.** The gate's `dynamic-await` is the nearest it sees; [durability](references/durability.md), Reads.
- **A key built from `ctx.callId` alone.** It stops a replay and not a repeated call; [durability](references/durability.md), Effects.
- **`once()` on a tool whose input matters.** One yes to a refund of 5 passes a refund of 5,000; [gates](references/gates.md), Which approval.
- **A connection policy that compares the bare tool name.** `bare-tool-name`; the name is `<connection>__<tool>`.
- **`auth: [localDev()]` or `placeholderAuth()` shipped.** `dev-only-auth` and `placeholder-auth` warn under `--gate` and fail under `--ship`; the deployed agent answers 401 to the people it was built for.
- **A sleep in place of the ready line.** Wait for `[DEV] ready at`; [verifying](references/verifying.md).
- **A no-credential turn reported as a pass, or as a bug in the change.** Hard rule 5.
- **An eval that asserts only `t.succeeded()`.** `bare-succeeded`; it proves a turn ended.
- **"While I was here I upgraded eve."** Hard rule 6.
## Examples
| Need | Example | What to learn |
|---|---|---|
| A tool that moves money | `examples/refund-desk/agent/tools/refund_charge.ts` | `always()` approval, a key built from the operation, the SDK imported inside `execute` |
| Route auth for a product with its own sign-in | `examples/refund-desk/agent/channels/eve.ts` | Your authenticator first, `vercelOidc()` next, `localDev()` last, no placeholder |
| An eval for a gated tool | `examples/refund-desk/evals/refund/waits-for-approval.eval.ts` | Assert the pending call, deny it, assert it never ran |
| Instructions that differ by caller | `examples/tenant-context/agent/instructions/plan.ts` | The read inside `ctx.memo` with a tuple key, the definition built outside |
| A remote MCP server | `examples/tracker-connection/agent/connections/tracker.ts` | `tools.allow`, a policy on qualified names that ends in `"user-approval"` |
| The reply at the end of a job | `examples/refund-desk/HANDOVER.md` | Version, pages read, the gate line, what ran, `Not verified:` last |
`teaching/` holds eighteen bad/good pairs, one per gate line ([teaching](references/teaching.md)), for diagnosing a fault; the bad halves are never starting points.
## Find the reference
| The job or the symptom | Open |
|---|---|
| Scaffold or not, registry before code, which slot, static or dynamic, how a call runs, whose credential | [deciding](references/deciding.md) |
| What runs how many times, memo keys, idempotency keys, renames under live work | [durability](references/durability.md) |
| What is open by default, which approval, a connection policy, the auth walk, secrets | [gates](references/gates.md) |
| The loop with its commands, the headless dev server, one turn over HTTP, stream events, no credential, evals | [verifying](references/verifying.md) |
| The ten pre-production checks, deploying, off Vercel, Windows, the bundle | [shipping](references/shipping.md) |
| The version check, reading the bundled docs, never upgrading unasked, names 1.0 removed | [staying-current](references/staying-current.md) |
| The last pass, every gate line, what the gate cannot see, symptoms | [verify](references/verify.md) |
| The brief for a fresh-eye reviewer | [review](references/review.md) |
| Which teaching pair matches a fault | [teaching](references/teaching.md) |
| What is Vercel's, the version this was written against, what was run, what is unverified | [sources](references/sources.md) |
| Faults this skill has made before, and where the docs moved on | [gotchas](references/gotchas.md) |
| Your own calls | [pov](references/pov.md) |
Script: `scripts/eve-check.mjs` reads a project's `agent/` and `evals/` files (`--help` lists its lines; `--self-test` proves it on the examples and the pairs).
## Never ship
| Never | Instead |
|---|---|
| A `package.json` and `agent/` folder written by hand | `npx eve@latest init my-agent --non-interactive` |
| `await fetch(...)` straight inside `defineDynamic` | The same call inside `ctx.memo(key, fn)` |
| `ctx.memo(key, () => defineInstructions(...))` | Memoize the text, build the definition outside |
| A refund, an email or a delete with no `approval` | `always()`, or a policy whose last line returns `"user-approval"` |
| A key of `ctx.callId` alone | A key built from the operation: session, resource, amount |
| `toolName === "delete_issue"` in a connection policy | `toolName.endsWith("__delete_issue")` |
| `placeholderAuth()` or `auth: [localDev()]` in a deployed agent | Your own authenticator first in the list |
| A hand-written Slack or GitHub webhook | `eve registry search`, then `eve add channel/<name> --non-interactive` |
| `eve dev` started in an agent session, then `sleep 10` | `eve dev --no-ui` in the background, wait for `[DEV] ready at` |
| The dev server killed by process name | Stopped by the PID that listens on its port |
| "It builds" or "typecheck passes" as done | A turn whose stream holds `turn.settled`, `outcome: "completed"` |
| A turn that failed for want of a credential, called a pass | "Inconclusive for the model", and `npm exec -- eve link` |
| An API key asked for in chat or written into a file | The user runs `eve link`; the key stays in `.env.local` and the host |
| An eval of `t.succeeded()` alone | A behaviour check and a content check |
| `npm install eve@latest` because the project was behind | Both versions said, the upgrade guide named, the user decides |
| "All checked" as the last line | `Not verified:` and what nobody ran |
## Output
Files first, then a short reply.
- `new`: the scaffolded project. `add`: the capability and its eval in the project's working tree.
- `verify` and `ship`: no files unless a fix was asked for. The reply.
The reply, in this order, with nothing after the last line (gold: `examples/refund-desk/HANDOVER.md`):
1. What changed and where, in one sentence.
2. `Version:` installed and latest, and the pages read.
3. One line per effect: the file, what gates it, what keys it. For `ship`: the ten rows.
4. `Gate:` the last line of `eve-check.mjs --gate` (`--gate --ship` for `ship`), pasted, and each warning left in place with its reason.
5. `Ran:` each step of the loop with its exit or its stream event.
6. `Not verified:` the last line. What nobody ran: a completed model turn when there was no credential, production auth, the deployed agent, the sandbox production will use.
## Tone
Plain and exact. Name the file, the command and the event. Say "inconclusive" when you could not look and "no" when a check failed. Never call an agent "safe" or "production-ready"; say which checks passed and which nobody ran.
## Yours to edit
Read both before any job. They outrank the defaults here, and neither can override Hard rules 2, 3, 5 and 6.
- [gotchas](references/gotchas.md): faults in how the skill works and places where eve's docs moved on, one line each. Append one when it happens.
- [pov](references/pov.md): your own calls, such as the package manager, the port, or which approval money takes.
## Pairs with
- `khe-auto`: routes here when a request names eve or a repo holds an `agent/` folder, and runs this skill's gate in its loop.
- `eve` (Vercel): the framework's own skill. It sends the agent to the bundled docs; use it for the API, and this one for what to decide and how to prove it.
- `deploy-to-vercel` (Vercel): domains, environments, previews and rollbacks once `ship` says yes.
- `khe-ui`, and `ui-sdk` (Vercel): the chat interface in front of the agent.
- `khe-poteto-pyramid`: when the same eve mistake comes back in a project, place it as a check there.
Harshit Khemani. MIT.