Eve Chat Template Eve skill for Claude

Work safely on Eve-specific internals in the Eve chat template.

When Claude uses it

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.

Eve Chat Template Eve SKILL.md

The full skill file from thedotmack/claude-mem (Apache-2.0).

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/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|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 content.delta.data.delta as the new text for its partId. Treat reduced message text and rendered parts as cumulative; content.completed carries a part's whole value.
  • Read the stream as NDJSON. Buffering until newline is normal parsing, not app-level response buffering.
  • Consider a turn settled on an event endsTurn from eve/client accepts: turn.settled, session.ended, or a turn.paused awaiting a person. Treat a sign-in interaction.opened (request.kind: "sign-in") as a blocked state for normal text input.
  • Treat a turn.paused awaiting only calls as progress, not a settled turn: the turn waits on its tasks and resumes with turn.resumed 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 sign-in interaction.opened and interaction.settled events.
  • Implement Skip as a structured outcome: stop the stream, synthesize a declined interaction.settled plus a cancelled turn.settled, apply those local events to the chat, persist them, and clear pending input. The chat's next message starts a new session.

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.

How to install Eve Chat Template Eve

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit thedotmack/claude-mem/integrations/eve/template/.agents/skills/eve-chat-template-eve#main ~/.claude/skills/eve-chat-template-eve

Codex

npx degit thedotmack/claude-mem/integrations/eve/template/.agents/skills/eve-chat-template-eve#main ~/.codex/skills/eve-chat-template-eve

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Eve Chat Template Eve skill do?

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.

+How do I install Eve Chat Template Eve in Claude Code?

Copy the skill folder into ~/.claude/skills/eve-chat-template-eve, for example with "npx degit thedotmack/claude-mem/integrations/eve/template/.agents/skills/eve-chat-template-eve#main ~/.claude/skills/eve-chat-template-eve". Claude Code loads it automatically and uses it when a task matches.

+Does Eve Chat Template Eve work with ChatGPT or Codex?

Yes. Eve Chat Template Eve uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/eve-chat-template-eve. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Eve Chat Template Eve free?

Eve Chat Template Eve is published on GitHub by thedotmack under the Apache-2.0 license, which allows free use.

Related software development skills

  1. Code Review

    Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's…

    mattpocock/skills★ 327k
  2. Using Agent Skills

    Discovers and invokes agent skills. Use when starting a session, or when you need to decide which skill or workflow applies to the piece of…

    addyosmani/agent-skills★ 119k
  3. Build

    Fully automate a coding task with make-plan, do, and babysit.

    thedotmack/claude-mem★ 118k
  4. Handoff

    Generate a HANDOFF.md that captures goal, current state, files touched, failed attempts, and next steps — so a fresh Claude session can…

    thedotmack/claude-mem★ 118k
  5. Learn Codebase

    Prime a codebase by reading every source file in full. Use when starting work on a new or unfamiliar project, or when the user asks to…

    thedotmack/claude-mem★ 118k
  6. Oh My Issues

    Cluster a GitHub issue backlog by root cause into a small set of plan-master issues, redirect children with a standardized comment, and…

    thedotmack/claude-mem★ 118k
  7. Pathfinder

    Map a codebase into feature-grouped flowcharts, identify duplicated concerns across features, and propose a unified architecture.

    thedotmack/claude-mem★ 118k
  8. Smart Explore

    Token-optimized structural code search using tree-sitter AST parsing.

    thedotmack/claude-mem★ 118k
  9. Standup

    Facilitate a read-only standup across git worktrees, branches, or PRs to compare changes and produce one consolidation plan.

    thedotmack/claude-mem★ 118k

See all software development skills →

More skills from thedotmack

  1. Host Observer

    Use this when fulfilling claude-mem observer jobs on Grok Bot: reply only skip_summary or one full observation XML, never prose.

    thedotmack/claude-mem★ 118k
  2. How It Works

    Explain how claude-mem captures observations, when memory injection kicks in, and where data lives.

    thedotmack/claude-mem★ 118k

All skills by thedotmack →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.