agentleFS
VercelKnown publishervercel/eve/apps/templates/eve-chat-template/.agents/skills/eve-chat-template-eve/SKILL.md

eve-chat-template-eve

Skill5.5k starsChanged 2 months agoApache-2.0View on GitHub

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.

  • Reads credentials

Trending

Quiet since September.about the whole repository

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 4 mentionsJul 2026: 4 mentionsAug 2026: 7 mentionsSep 2026: 8 mentionsOct 2026: 0 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the vercel/eve repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about vercel/eve

The biggest 5 of 23 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 23

Talked about on GitHub and Bluesky (23 times).

On GitHub · 17

12 more on GitHub

On Bluesky · 6

1 more on Bluesky

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 5 are distinctive, and 13 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use this skill to preserve the Eve protocol and durable-session invariants while changing the chat template.

    line 10
  2. Very specific:

    Read AGENTS.md first. It requires reading the relevant guide under node_modules/eve/dist/docs/public/ before writing code.

    line 14
  3. Very specific:

    Read docs/how-the-chatbot-works.md for architecture changes and docs/setup-and-deploy.md for setup, auth, storage, or deployment changes.

    line 15
  4. Very specific:

    Keep Eve runtime code separate from product shell code: agent/ defines agent behavior.

    line 17
  5. Very specific:

    Treat an app chat row and an Eve session as different things.

    line 21
  6. Very specific:

    Do not confuse chat_event.eventIndex with SessionState.streamIndex.

    line 22
  7. Very specific:

    Keep betterAuthEveAuth, localDev(), and vercelOidc() in the Eve channel unless deliberately changing local, browser, or Vercel auth …

    line 24
  8. Very specific:

    Keep pendingUserMessage for interruption recovery.

    line 31
  9. Very specific:

    When preserving initial events, merge by prefix and compare JSON structurally.

    line 32
  10. Very specific:

    Treat message.appended.data.messageDelta as the new text.

    line 38
  11. Distinctive:

    Read the stream as NDJSON.

    line 39
  12. Very specific:

    Consider a turn settled on session.completed, session.failed, or session.waiting.

    line 40
  13. Distinctive:

    Treat composer connection toggles as per-turn intent, not connector provisioning or OAuth state.

    line 48
  14. Very specific:

    Do not parse assistant text for auth requirements.

    line 49
  15. Very specific:

    Prefer upstreaming generic Eve lifecycle needs: onSessionStarted(session), hook-level resume APIs, durable event persistence adapters, …

    line 54
  16. Distinctive:

    Keep template-specific concerns in the template: Better Auth UX, Neon/Drizzle schema, Upstash limits, sidebar pagination, Notion UI …

    line 55
  17. Distinctive:

    Do not split server events just to make coarse provider deltas look token-level.

    line 56
  18. Very specific:

    Run pnpm typecheck for protocol/type changes and pnpm build before opening a PR that touches runtime, routes, or docs examples.

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 node_modules/eve/dist/docs/public/ 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|message.appended|authorization.required|eveSession|chat_event|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 chat_event.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.
  • When preserving initial events, merge by prefix and compare JSON structurally. Do not rely on JSON.stringify key order.
  • Reset per-chat refs on route changes: event index, known initial events, stream events, resumed events, local events, pending bubbles, resume-started flags, and finalize timers.

Streaming

  • useEveAgent reduces Eve events into renderable messages; the template wraps it with a custom ClientSession to persist and resume sessions.
  • Treat message.appended.data.messageDelta as the new text. Treat messageSoFar, reduced message text, and rendered parts as cumulative.
  • Read the stream as NDJSON. Buffering until newline is normal parsing, not app-level response buffering.
  • Consider a turn settled on session.completed, session.failed, or session.waiting. Treat authorization.required as a blocked state for normal text input.
  • Treat turn.waiting as progress, not a settled turn: the turn is parked, for example while its tasks work or a running call asks a question, and resumes with the next step.started for the same turnId. Keep following the stream until one of the settling events above.
  • On disconnect, reconnect from the next unread remote stream index. On refresh mid-turn, resume from saved activeChat.session and layer resumed events until the final snapshot catches up.

Connections And Tools

  • Define local tools in agent/tools/<snake_case>.ts with defineTool(...). Tool filenames become runtime tool names, so keep them ASCII snake_case.
  • Define Vercel Connect-backed MCP connections in agent/connections/<name>.ts with defineMcpClientConnection(...) and connect(process.env.ENV_NAME ?? "local-name").
  • Treat composer connection toggles as per-turn intent, not connector provisioning or OAuth state.
  • Do not parse assistant text for auth requirements. Use authorization.required and authorization.completed events.
  • Implement Skip as a structured outcome: stop the stream, synthesize declined authorization completion plus session.waiting, apply those local events to the session, persist them, and clear pending input.

Upstream Signals

  • Prefer upstreaming generic Eve lifecycle needs: onSessionStarted(session), hook-level resume APIs, durable event persistence adapters, authorization continuation helpers, structured connection policy, and stream debug helpers.
  • Keep template-specific concerns in the template: Better Auth UX, Neon/Drizzle schema, Upstash limits, sidebar pagination, Notion UI toggles, and setup docs.
  • Do not split server events just to make coarse provider deltas look token-level. Preserve wire semantics and smooth only at the UI layer when needed.

Verification

  • Run pnpm typecheck for protocol/type changes and pnpm build before opening a PR that touches runtime, routes, or docs examples.
  • Manually verify first message, follow-up send, refresh during a response, authorization Connect/Skip, disabled input while auth is pending, and Notion enabled/disabled turns when those flows are touched.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.