New machine setup (Claude Code)
Clone the repo, open Claude Code in it — the rest happens on its own (#661). This page says what lives in git, what the first session does, and the few things that can never be in git.
What the repo carries
- Rules and hooks —
CLAUDE.md,AGENTS.md,.claude/settings.jsonhooks (standards digest, owner-brief reply rule, branch-guard, widget-design gate, stop-gate). - Skills and agents —
.claude/skills/*,.claude/agents/*. - Plugins —
enabledPlugins+extraKnownMarketplacesin.claude/settings.json(andrej-karpathy-skills,codex). - Effort defaults —
effortLeveland per-modelmodelSettingsin.claude/settings.json. - MCP —
.mcp.json: theplaywrightserver (browser proofs), approved for the project byenabledMcpjsonServers. Its profile folder is${USERPROFILE}/.claude/playwright-profile.
What the first session does
The SessionStart hook (.claude/hooks/session-context.mjs → machine-setup.mjs):
- Installs the plugins the project enables but this machine lacks. A fresh Claude config reads
enabledPluginsbut fetches nothing, andclaude plugin installfails with “not found in marketplace” until the marketplace is added — so the hook adds each marketplace from its declared source, then installs the plugin (about 20 s, once). They load from the next session. - Wires the pre-push gate — the absolute hook wrapper under
.git/ttn-gates/(#430), when the clone has none. - Names what is missing in one line — secrets and CLI logins, by existence only. A value is never read, printed or committed.
On a complete machine the hook is silent. Proven with an empty CLAUDE_CONFIG_DIR (only the login
copied in): session 1 installed both plugins; session 2 loaded them, the playwright MCP, the project
skills and agents (05_tasks/proof/661/).
What can never be in git
| Secret / login | Used by | Where it comes from |
|---|---|---|
Supabase access token — ~/.supabase/access-token | migrations, schema-drift, prod reads | Supabase → Account → Access tokens (owner) |
Telegram bot — 02_app/shopify-app/playwright-debug/.secrets.env | proof to the owner’s Telegram | copy from the owner’s machine |
Vercel token — ~/.tryvio/vercel-token | env-drift, prod-verify, deploy-local | Vercel → Account → Tokens |
Smoke-store password — ~/.tryvio/smoke-store-password | prod-smoke widget check | owner |
| GitHub CLI login | issues, PRs, land.mjs labels | gh auth login |
| Vercel CLI login | vercel env, deploy fallback | npx vercel login |
| Figma API key | the figma-mcp server | stays a user-scope MCP server — its key is an argument, so it is not in .mcp.json |
Env vars with the same names (SUPABASE_ACCESS_TOKEN, VERCEL_TOKEN, TELEGRAM_BOT_TOKEN,
SMOKE_STORE_PASSWORD, GH_TOKEN) count as present.
Memory — beside the repo, one day at a time
Owner decision 2026-09-30: memory is a shared folder NEXT TO the checkout, and it must not keep growing.
- Where:
../tryitnow-memory/, a clone of the orphanclaude-memorybranch of this repo (no app code, no workflows, no Vercel link — a push there deploys and runs nothing). Claude keeps a repo’s memory in~/.claude/projects/<derived>/memory/; that folder is a directory junction to the shared one, so every console and worktree reads one memory. A new machine clones it on its first session; the first run on a machine that already has memory migrates it and keeps the old folder as a dated backup. - Layout:
MEMORY.md(the index Claude loads — under 150 lines / 20 KB; Claude reads only its first ~25 KB, and it was 36 KB before this), one durable fact per file,days/YYYY-MM-DD.mdfor the day’s progress and decisions,days/archive/for summarised days. - Sync (hooks, no commands): SessionStart pulls; every Stop commits what changed and pushes at most
every 10 minutes. A file that looks like it holds a key (Figma, GitHub, Supabase, Shopify, JWT, private
key…) is NOT committed and the turn is told which file — never the value. Two machines editing the same
file merge with
*.md merge=union. - Daily rollover: the first session of a new day — exactly one console, by a lock — is asked to run a
background summary: yesterday’s journal becomes at most 10 carried-over lines in today’s file, durable
facts move to their topic files, finished items leave
MEMORY.md, yesterday goes to the archive.