Agent skill · vercel
eve-chat-template-eve
Work safely on Eve-specific internals in the Eve chat template. Use when changing the Eve agent, withEve routes, eveChannel auth, useEveAgent, ClientSession/SessionState, persisted event logs, stream/resume behavior, connection authorization, Vercel Connect MCP connections, local Eve tools, or upstream Eve API assumptions.
What it needs
About 3k tokens when loaded.
What this skill does
Eve Template Runtime Overview Use this skill to preserve the Eve protocol and durable-session invariants while changing the chat template. First Pass Read AGENTS.md first. It requires reading the relevant guide under nodemodules/eve/docs/ before writing code. Read docs/how-the-chatbot-works.md for architecture changes and docs/setup-and-deploy.md for setup, auth, storage, or deployment changes. Search with rg "useEveAgent ClientSession SessionState content.delta interaction.opened eveSession chatevent streamIndex continuationToken defineMcpClientConnection defineTool". Keep Eve runtime code separate from product shell code: agent/ defines agent behavior; app/components/agent-chat.tsx bridges Eve to the web UI; lib/db/ persists app state. Core Model Treat an app chat row and an Eve session as different things. The app row owns URL, title, user ownership, pendingUserMessage, stored eveSession, and event rows. Eve owns the remote durable session and stream cursor. Do not confuse chatevent.eventIndex with SessionState.streamIndex. The first orders local Postgres rows; the second resumes /eve/v1/session/:sessionId/stream. Preserve same-origin Eve routes mounted by withEve(nextConfig): POST /eve/v1/session, POST /eve/v1/session/:sessionId, and GET /eve/v1/session/:sessionId/stream?startIndex=n. Keep betterAuthEveAuth, localDev(), and vercelOidc() in the Eve channel unless deliberately changing local, browser, or Vercel auth behavior. Persistence And Resume Persist SessionState immediately after Eve returns sessionId and continuationToken; do not wait for the stream to finish. Persist each stream event as it arrives, then use the final snapshot as the canonical cleanup pass. Upsert events by local eventIndex; on final snapshot, delete rows beyond the final event length. Keep pendingUserMessage for interruption recovery. Mark it before sending, consume it once in the session page, hide it after a settled event, and clear it after snapshot or authorization skip. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills vercel/eve-chat-template-eve