rewind: Instructions file for Codex

AGENTS.md

rewind AGENTS.md is an instructions file for Codex, OpenCode from pdugan20/rewind. It costs 1,460 tokens per session, scanned A, original, MIT.

A project guide for Rewind, a personal-data aggregation service that collects information from services such as Strava, Last.fm, and Plex. It explains its work modes, development commands, and system architecture.

In plain words
What is it for?
It helps maintain the data sync service, REST API, image delivery service, database migrations, and MCP server.
Why use it?
It tells the coding assistant when to make a focused change and when to use stricter checks, while identifying operations that require approval.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is pdugan20/rewind's own configuration. It tells Codex and OpenCode how to work on rewind itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rewind configures →

Reuse

Borrowing it

Nothing to install: this file belongs to pdugan20/rewind. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/pdugan20/rewind/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/pdugan20/rewind

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 rewind AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/pdugan20/rewind/agents-md/github.svg)](https://agentmods.dev/instructions/pdugan20/rewind/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/pdugan20/rewind/agents-md"><img src="https://agentmods.dev/badge/instructions/pdugan20/rewind/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rewind AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/pdugan20/rewind/agents-md"><img src="https://agentmods.dev/badge/instructions/pdugan20/rewind/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,460 This file is loaded in full into every session.
When invoked 1,460 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01460 $0.01460
Opus 5.5 $0.00584 $0.00584
Sonnet 5.5 $0.00292 $0.00292
Haiku 4.5 $0.00146 $0.00146

Measured 4d ago against content hash 03156f579eea, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rewind AGENTS.md scanned grade A with 0 findings 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 4d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 93 lines

How it starts

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

Rewind

Work modes

  • Default to exploration for UI, documentation, prototypes, and small changes. Make focused edits directly; do not require a formal spec, separate plan, worktree, or TDD.
  • Apply production rigor when the user explicitly asks to ship, harden, prepare a release, or use strict TDD. Match verification to risk and obey any stronger test requirements below.
  • Ask before deployments, remote D1 migrations, production-data changes, live API mutations, releases, or security-rule changes. A user request naming the exact mutation and target counts as approval for that operation.

Personal data aggregation service. Syncs data from Strava, Last.fm, Discogs, Plex, Letterboxd, and Instapaper into Cloudflare D1, serves via REST API at api.rewind.rest with an image CDN at cdn.rewind.rest. MCP server published as rewind-mcp-server on npm, deployed as a Cloudflare Worker at mcp.rewind.rest.

Read the nested guide before editing in its directory. Claude loads it automatically when it reads a file there; Codex loads it only when started inside that directory.

  • mcp-server/AGENTS.md: the MCP package's Node 22 and 24 support, its commands, manifest and docs regeneration, and release-please versioning.

Development Commands

npm run dev          # Start local dev server (wrangler dev)
npm run deploy       # Deploy to Cloudflare Workers
npm run db:generate  # Generate Drizzle migrations from schema changes
npm run db:migrate   # Apply migrations to local D1
npm run db:remote    # Apply migrations to remote D1
npm run db:studio    # Open Drizzle Studio (local D1)
npm run lint         # ESLint
npm run format       # Prettier
npm run lint:claude  # claudelint (validate agent instruction files)
npm test             # Vitest

Agent configuration

  • AGENTS.md is the canonical cross-agent guide. Claude Code reads it directly, so there is no CLAUDE.md.
  • Repository skills live in .agents/skills. Claude consumes those same files through symlinks in .claude/skills; do not maintain a second copy.
  • Keep domain procedures such as adding and finding media project-scoped. General design, delivery, review, and hardening workflows come from the global agent-tooling setup.
  • See .agents/skills/README.md for the project inventory and mutation boundaries.

Read the full file on GitHub · 93 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. 4d ago Changed · +6 lines · +81 tokens per session 03156f579eea
  2. 6d ago Changed · +4 tokens per session b9b1fc6aac73
  3. 23d ago Changed · -69 lines · -905 tokens per session 2f4e57aaf5d7
  4. 2mo ago First seen · 156 lines · 2,280 tokens per session scan A dc0501345c47

Subscribe to this mod's changes

rewind AGENTS.md is an instructions file published in the GitHub repository pdugan20/rewind (6 stars, last pushed yesterday), licensed MIT. It adds 1,460 tokens to every session, about $0.0058 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

rewind AGENTS.md compared with instructions from other repositories

rewind AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rewind AGENTS.mdpdugan20/rewindInstructions file6yesterdayMITA1,460Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode