sagarshah.dev AGENTS.md

A project instruction file for a personal portfolio built with Next.js, a framework for web applications. It records the exact framework version, coding conventions, allowed dependencies, commands, and verification rules.

In plain words
What is it for?
Use it before changing the portfolio's code, especially when checking the required Node.js version, editing the React interface, adding dependencies, or running the verification command.
Why use it?
It warns agents that this project uses newer conventions that may differ from familiar Next.js examples. Following the listed checks helps catch type, style, design-token, link, timing, and build problems.

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

Made for: Codex, OpenCode.

Per session 2,226 This file is loaded in full into every session.
When invoked 2,226 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.02226 $0.02226
Opus 5 $0.01113 $0.01113
Sonnet 5 $0.00445 $0.00445
Haiku 4.5 $0.00223 $0.00223

Measured 3d ago against content hash 335bfeed2df3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sagarshah.dev 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 3d 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 · 49 lines

How it starts

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

This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in node_modules/next/dist/docs/ before writing any code. Heed deprecation notices.

sagarshah.dev v2

Single-page portfolio (live at sagarshah.dev). Next.js 16.2.12 (App Router, Turbopack default) · React 19 · TypeScript 5.9 strict · Tailwind CSS v4 (CSS-first — there is no tailwind.config.*; the theme lives in src/app/globals.css via @theme). Package manager: npm. Node >= 22.18 required — scripts/check-*.mjs import .ts files relying on Node's built-in type stripping.

Deliberately minimal dependencies: no UI/animation/state libraries. Runtime deps beyond the framework are only lucide-react, clsx, tailwind-merge, @next/third-parties, @vercel/analytics + @vercel/speed-insights. Keep it that way.

Commands

  • npm run dev — dev server (never add --turbopack; it is the Next 16 default)
  • npm run verifythe gate: tsc --noEmit && eslint . && check-tokens && check-anchors && check-duration && next build. Run before declaring any task done.
  • npm run typecheck / npm run lint — individual steps (next lint no longer exists in Next 16; lint is bare eslint)
  • npm run check:durationnode:assert checks for src/lib/duration.ts; the closest thing to unit tests. There is no test framework. It also asserts total career length stays in [120, 144) months — around late 2027 this starts failing verify by design (staleness alarm: revisit the "decade" copy and the bounds; do not patch duration.ts to silence it).
  • npm run icons:generate — rebuilds the public/ PWA icons from a 1024px master (Next's vendored @vercel/og + sharp). Not part of verify. Its hardcoded rgb() literals are deliberate — Satori resolves no CSS variables and check-tokens scans only src/ — do not "fix" them into tokens.
  • Lighthouse: npm run build && npm start, then npm run lh:mobile / npm run lh:desktop (reports land in .next/lighthouse/, wiped by each build). Never audit the dev server — if /tokens returns 200 you are on dev and every number is wrong.
  • Prettier (+ prettier-plugin-tailwindcss) is editor-only: no format script, not in verify.

Read the full file on GitHub · 49 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. 3d ago First seen · 49 lines · 2,226 tokens per session scan A 335bfeed2df3

Subscribe to this mod's changes

sagarshah.dev AGENTS.md is an instructions file published in the GitHub repository shahsagarm/sagarshah.dev (108 stars, last pushed 29d ago), licensed MIT. It adds 2,226 tokens to every session, about $0.0111 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-30.