tote AGENTS.md

tote AGENTS.md is an instructions file for Codex, OpenCode from yusufkaraaslan/tote. It costs 1,642 tokens per session, scanned A, original, MIT.

Development instructions for Tote, an Electron desktop app that combines web-based AI tabs, shared project folders, and terminal sessions. Electron is a framework for building desktop apps with web technologies.

In plain words
What is it for?
Use them when changing Tote's setup wizard, workspace management, file handling, provider sessions, terminal support, settings, or its vanilla JavaScript interface.
Why use it?
They document how the app's workspaces, downloads, settings, terminal sessions, and installer behave. This helps prevent changes from using the wrong project folder or breaking communication between the app's parts.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/yusufkaraaslan/tote/agents-md
Clone the repo
git clone --depth 1 https://github.com/yusufkaraaslan/tote

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tote AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/yusufkaraaslan/tote/agents-md.svg)](https://agentmods.dev/instructions/yusufkaraaslan/tote/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/yusufkaraaslan/tote/agents-md"><img src="https://agentmods.dev/badge/instructions/yusufkaraaslan/tote/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,642 This file is loaded in full into every session.
When invoked 1,642 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01642 $0.01642
Opus 5 $0.00821 $0.00821
Sonnet 5 $0.00328 $0.00328
Haiku 4.5 $0.00164 $0.00164

Measured today against content hash 40a601205d9a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tote AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Terminals must stay real PTYs (node-pty) — piping through child_process breaks TUI agents. node-pty's prebuilt `spawn-helper` must be executable (postinstall chmods it; asarUnpack for packaged builds) or spawns fail wi
AGENTS.md · 27 lines

How it starts

The opening of the file, as written. The whole thing — 27 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tote — agent notes

Electron hub app: web LLM tabs + shared workspace folder + docked CLI-agent terminals.

  • Run: npm install && npm start (postinstall copies xterm assets to src/renderer/vendor).
  • Main process: src/main/ (sessions per provider partition, downloads → ACTIVE workspace's inbox/, Downloads-folder bridge for native apps (macOS only; copies, and only files the quarantine xattr attributes to a known LLM app), app launcher, IPC, node-pty). Setup wizard logic lives in src/main/installer.js (system checks, Claude Desktop MCP binding, MCP snippet) + the #wizard-* section of src/renderer/app.js.
  • CLI profiles carry an install command (npm -g) used by the wizard; keep package names accurate when adding profiles. Wizard installs self-heal: the run's output is buffered and src/renderer/npmfix.js (pure, npm test covers it) detects npm's blocked-install-scripts warning (retry with --allow-scripts=…) and EACCES on a root-owned global prefix (setup:fixNpmPrefix points npm at ~/.local only when prefixPlan says that's safe); each mend runs at most once.
  • Workspaces are two-level: one global + project spaces in config/workspaces.json. All file ops resolve the ACTIVE space at call time via WorkspaceManager.getRoot() — never cache the root. Spaces are managed from the top strip's right-click menu and the Workspaces section of Settings (add / rename / change folder / remove → workspaces:* IPC); ids are stable across rename/re-point.
  • Renderer: src/renderer/ vanilla JS, no bundler. Bridge surface = window.tote (see src/preload/preload.js).
  • Providers, CLI profiles, workspaces and apps are data, not code: defaults in config/*.json, runtime copies in userData. Prefer adding entries there over hardcoding.
  • Never give the renderer nodeIntegration. New capabilities go through ipcMain handlers in main.js + preload wrappers.
  • Keep all workspace file access inside WorkspaceManager.resolveSafe (path-escape guard).
  • Terminals must stay real PTYs (node-pty) — piping through child_process breaks TUI agents. node-pty's prebuilt spawn-helper must be executable (postinstall chmods it; asarUnpack for packaged builds) or spawns fail with posix_spawnp failed.
  • A GUI launch (Finder/Dock/.desktop) gives the app a minimal PATH, so codex/claude/npm are missing even though they work in a terminal. ptyManager.js runs every CLI profile through $SHELL -l -i -c 'exec …', and adoptLoginShellPath() in main.js adopts the login shell's PATH at startup for the wizard checks and local services. Don't exec profile commands directly on POSIX.
  • Webview popups (OAuth) must open in-app so they share the provider partition; only non-http schemes go to the system browser. UA = Electron's real UA minus Electron/Tote tokens — never a hardcoded foreign UA.
  • Views are per-workspace: web tabs are instances stored in views.json (+ menu opens providers, duplicates allowed), terminals tagged with wsId; showWorkspaceViews() restores a space's setup on switch.
  • Layout: a tiling tree of panes, not docks. Web views, terminals and the files tree are equal leaves in one binary tree; the pure engine is src/renderer/layout.js (window.TileTree, covered by npm test) and applyTiles() in app.js turns the tree into rects. #tiles is flat: a pane element is created once per content instance and never reparented — reparenting a <webview> reloads the guest and loses page state.
  • Strip order is the registry list order; a tab drag calls workspaces:reorderWorkspaceManager.reorder(ids), which only rewrites the order in workspaces.json (active space, entry fields and watchers untouched) and re-appends any id the renderer omitted.
  • Temp spaces carry temp: true + lastUsed and live under settings.scratchRoot (default ~/tote/scratch). discardTemp() is the only function in Tote that deletes user files — temp-only, inside-the-root-only, never the last space — and remove() still never touches the disk. promote() moves the folder and keeps the id so views.json survives; the sweep runs at launch only. Pure parts are in src/main/scratch.js, tested by scripts/test-scratch.js (run by npm test).
  • Each space holds groups — virtual desktops with their own tree (views.json: groups[] + activeGroup), switched from #group-bar or Cmd/Ctrl+Alt+1…9. Other groups' webviews and PTYs stay alive and hidden. Walk persisted trees with groupsOf(V), never V.tiling.
  • The files tree is a dock: insertRoot pins it to the whole left edge at the width it had when closed (filesRatio, per space); splitTarget() and openPane keep content panes out of it.
  • Files dropped on a terminal pane are typed in as shell-escaped paths (acceptFileDrop), never sent — and every other drop is swallowed, because Chromium's default is to navigate the window to the file. Paths come from webUtils.getPathForFile (File.path is gone since Electron 32), with will-navigate in main.js as the backstop.
  • Files are panes: clicking one opens leaf kind doc, whose ref is an instance (views.json: docs: [{id, path, mode}]), not a path — a click retargets the pane you have, Cmd/Ctrl-click opens a second. Only those three fields persist; unsaved buffers never reach disk. Text and code are editable with Cmd/Ctrl+S, markdown and SVG render with a src|view toggle (MOD+E), images and PDFs are read-only, and anything else still goes to the system app. readDoc in workspace.js is the single classify-and-read channel; docKind also stamps every tree node.
  • Rendered markdown comes from src/renderer/markdown.js (pure, npm test covers it) and is built with createElementnever innerHTML. The parser keeps raw HTML literal and filters hrefs to http(s)/mailto/relative, which is what makes that safe; keep both rules if you ever swap the parser out.
  • A doc pane re-reads its own file on workspace:changed (the ping has no path): clean panes reload silently, dirty ones show the changed on disk bar, and "keep mine" lets the next save overwrite.
  • Any splitter or pane drag must toggle body.dragging so webviews don't eat mouse events. Fit xterm before ptySpawn and ptyResize after, or TUIs render at 80×24. Shift+Enter needs the attachCustomKeyEventHandler in spawnTerm that sends LF (\n, the Ctrl+J byte) — xterm's default CR is indistinguishable from Enter, so agents submit instead of adding a line. That handler also maps Shift+arrows/Home/End to xterm's scrollback (bare arrows belong to the agent's history), passing them through on the alternate screen.

Read the full file on GitHub · 27 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +1 lines · +156 tokens per session 40a601205d9a
  2. 4d ago First seen · 26 lines · 1,486 tokens per session scan A 2e79b1b39a51

Subscribe to this mod's changes

tote AGENTS.md is an instructions file published in the GitHub repository yusufkaraaslan/tote (5 stars, last pushed yesterday), licensed MIT. It adds 1,642 tokens to every session, about $0.0082 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens