Context
Context snippets for your agents. Bookmark this page and copy what you need into a brief, instruction file, or skill.
Agent token efficiency
Practical guidance for reducing total agent cost per verified task.
Adapted from Kinopee's agent token guide, licensed under CC BY 4.0.
---
name: agent-token-efficiency
description: Use when writing or reviewing Devin briefs, playbooks, AGENTS.md or other instruction files, or when advising on cutting agent cost (ACUs or tokens), for Yohann or for Aloomii agent-adoption clients.
---
# Agent token efficiency
Condensed from "A Design Guide to Minimizing Token Consumption in AI Agents" by Kinopee (https://github.com/kinopeee/ai-agent-token-guide), CC BY 4.0. This is adapted for Devin and leaves out the Claude Code/Codex-only settings (cache prefixes, reasoning-effort profiles, CLI config).
Goal: the lowest total cost per task that passes verification, at the same quality and completion time. Cost per message or the shortest prompt is not the goal.
## Writing a brief or prompt (Devin session, playbook, child session)
- Name the target files/functions, the reproduction steps, the constraints and the decision criteria up front. Leaving them vague causes rounds of exploration and clarification.
- Give completion criteria and the exact check to run (test command, URL, expected output). Leave the done condition to the agent only when that is intended.
- Split large work into verifiable units and settle the key design decisions before implementation starts.
- Don't cut the spec's meaning to save tokens. A short but ambiguous brief costs more in rework.
- Ask for a plan first only on ambiguous or high-impact changes. Small fixes go straight through.
- Start a new session when the task changes, and carry over only the needed state (goal, constraints, verification results, exact errors, next action).
## Instruction files (AGENTS.md, knowledge, rules, skills)
- Keep always-on instructions short. Move situational detail into on-demand skills or files that a trigger loads.
- Audit regularly for instructions that are outdated, duplicated or written for older models.
- Turn prompts that worked into playbooks or skills rather than retyping them.
- Remove MCP servers and plugins that nobody uses.
## While working
- Read only what's needed: a partial read for known files, grep for strings, code search or LSP for references.
- Trim noisy tool output (passing test lists, build logs) but keep failure diagnostics, the exit status and the path to the full log.
- Hand deterministic work (formatting, lint fixes, bulk fetching and aggregation) to scripts, pre-commit and CI, so intermediate data never reaches the model.
- Verify in stages: quick diagnostics after edits, related tests per unit of work, the full suite once before completion. Don't re-verify unchanged code.
- If the same failure repeats, change the hypothesis or report the task as incomplete instead of looping.
- Use subagents/child sessions only when the work is independent and isolating it saves more than the startup and integration cost. Simple searches don't qualify.
- Final reports: don't restate diffs or full files that are already in the PR.
## Measuring
- Primary metric: total cost per passed task (ACUs per merged, working PR), counting retries, child sessions and work that gets sent back.
- Take a baseline first, then change one thing at a time under the same conditions.
- Count the full cost of cheap-model failures and review time.
- Token counts, estimated cost, plan allowance and the actual bill are different numbers. Don't mix them up.
## Avoid
- Cutting necessary error info or spec meaning in the name of brevity.
- Running the full test suite after every edit.
- Bundling several cost-cutting changes together, so a quality drop can't be traced to one of them.
- Keeping unneeded history or long shared instructions just to protect a cache hit rate.
Build a downhill browser game (devkick 005)
A starting prompt for a playable browser game with tested physics, generated assets and a Cloudflare Pages deploy.
From the devkick 005 build guide.
---
name: downhill-browser-game
description: Use when building a downhill browser game with Devin, Three.js and Vite, with generated assets and a Cloudflare Pages deploy.
---
# Build a downhill browser game (devkick 005)
From the devkick 005 build guide (https://devkick.com/005/).
Build a browser game with Three.js + Vite: a downhill [snowboard / go-kart / sled] run on a procedurally generated 1 km course with jumps and checkpoints. Write the physics yourself at a fixed 120 Hz step (gravity on slope, drag, grip limits, jumps, crashes, respawn) and add Vitest tests for top speed, stopping distance, and an autopilot that can reach the finish. Controls: WASD/arrows, Space to jump, plus touch buttons for mobile. Start with grey boxes and get it fun. Then swap in Meshy models for the player, vehicle and props, and a Rosebud AI skybox (keep every prompt in an assets manifest). Use ElevenLabs for sound effects, music and a few voice lines. Optionally, use Modal to batch-generate the assets and to host a small leaderboard API. Show a finish time, add a "Built with Devin" credit, and deploy to Cloudflare Pages on every merge to main. Open a PR after each working milestone.
Build a horror browser game like Floor 13 (devkick 005)
A starting prompt for a first-person apartment horror game with procedural floors, searchable rooms and pursuing monsters.
From the Floor 13 build guide. This is a starting brief, not the game's original development transcript.
---
name: floor13-browser-game
description: Use when building a first-person apartment horror browser game with Devin, Three.js and Vite, generated assets, automated tests and a Cloudflare Pages deploy.
---
# Build a horror browser game like Floor 13 (devkick 005)
From the Floor 13 build guide (https://devkick.com/005/#floor13-build-guide). Play the work-in-progress example at https://devkick.com/floor13/.
This is a starting brief inspired by Floor 13, not its original development transcript.
Build a first-person horror browser game with Three.js + Vite. The player starts on floor 13 of an apartment building and must reach the ground floor. Generate reproducible floor layouts with furnished apartments, turning corridors and one valid way down. Let players open doors, cupboards, drawers and fridges to search for batteries, keys and tools. Give residents useful or misleading clues. Monsters lurk behind some doors, react to noise, break out and pursue the player; provide readable warning signs, hiding places and a look-behind control. Make the rules learnable rather than relying only on jump scares.
Start with grey boxes and one complete, playable floor: walk, search, find the exit and descend. Use custom collision and movement code. Add seed-based automated tests for reachable exits, door clearances, inventory and monster behaviour. Then add more floors, residents, sound and creatures in small working milestones. Inspect real gameplay and rendered animation as well as running tests; do not treat scripted captures as proof of smooth real-time or phone performance.
Use Meshy AI for original monster, resident and prop models, and ElevenLabs for spatial horror effects, music and resident voice lines. Ask before spending generation credits. Keep prompts, source files and provenance in an asset manifest; optimise browser models and check their scale, pivots, floor contact and doorway clearance. Optional alternatives: use Rosebud AI to prototype a scene, or Modal to run batch asset scripts. A backend is not required for the single-player game.
Provide keyboard/mouse controls, a pause menu, captions and volume controls. Add touch controls only with real-device testing before claiming mobile support. Preserve the full gameplay frame in a short promo and end with the play URL.
Build with Vite and deploy the static output to Cloudflare Pages. If hosted under a subpath, use relative asset URLs and verify models and audio load from that path. Document and run the install, test and build commands from a fresh checkout. A milestone is done only when the player can search a room, evade a monster and descend through a reachable exit without console errors. Open a PR after each working milestone, run build and gameplay checks, and get approval before publishing a new build. Do not migrate to Unity or Roblox as part of this browser-game brief.
Questions, answered
How do I use a context snippet?
Copy the full snippet into an agent brief, instruction file, or skill. The copy button includes the frontmatter, instructions, and source attribution.
Can I bookmark a specific snippet?
Yes. Use Copy link to copy a direct URL to the snippet, then bookmark or share that URL.