rewind AGENTS.md

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

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/pdugan20/rewind/agents-md
Clone the repo
git clone --depth 1 https://github.com/pdugan20/rewind

Made for: Codex, OpenCode.

Per session 2,280 This file is loaded in full into every session.
When invoked 2,280 The same file — it is already loaded in full.
Security scan A 0 findings. 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.02280 $0.02280
Opus 5 $0.01140 $0.01140
Sonnet 5 $0.00456 $0.00456
Haiku 4.5 $0.00228 $0.00228

Measured 2d ago against content hash dc0501345c47, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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 · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 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.

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.md is only a compatibility shim.
  • 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.

Architecture Overview

Read the full file on GitHub · 156 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. 2d 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 (5 stars, last pushed 8d ago), licensed MIT. It adds 2,280 tokens to every session, about $0.0114 per session on Opus 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.