astro-modular: Instructions file for Codex

AGENTS.md

astro-modular AGENTS.md is an instructions file for Codex, OpenCode from davidvkimball/astro-modular. It costs 8,328 tokens per session, scanned C, original, MIT.

A contributor guide for Astro Modular, a website theme where users write blog content in Obsidian, a note-taking app, and publish it through Astro.

In plain words
What is it for?
Editing the Astro theme, configuring the site, working with content in the Obsidian vault, and deploying to services such as Netlify, Vercel, GitHub Pages, or Cloudflare Workers.
Why use it?
It explains the project structure and its unusual use of an Obsidian vault as the content system, along with important Astro template rules.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; mentions AGENTS.md.

This is davidvkimball/astro-modular's own configuration. It tells Codex and OpenCode how to work on astro-modular 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 astro-modular configures →

Reuse

Borrowing it

Nothing to install: this file belongs to davidvkimball/astro-modular. 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/davidvkimball/astro-modular/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/davidvkimball/astro-modular

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 astro-modular AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/davidvkimball/astro-modular/agents-md/github.svg)](https://agentmods.dev/instructions/davidvkimball/astro-modular/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/davidvkimball/astro-modular/agents-md"><img src="https://agentmods.dev/badge/instructions/davidvkimball/astro-modular/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 astro-modular AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/davidvkimball/astro-modular/agents-md"><img src="https://agentmods.dev/badge/instructions/davidvkimball/astro-modular/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8,328 This file is loaded in full into every session.
When invoked 8,328 The same file — it is already loaded in full.
Security scan C 1 finding. 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.08328 $0.08328
Opus 5.5 $0.03331 $0.03331
Sonnet 5.5 $0.01666 $0.01666
Haiku 4.5 $0.00833 $0.00833

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

Security

Grade C, and why

astro-modular AGENTS.md scanned grade C 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 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

9. **Never use destructive commands** (`rm -rf`, `git reset --hard`, force push)
AGENTS.md · 782 lines

How it starts

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

AGENTS.md — Astro Modular (Astro + Obsidian blog theme)

Source of truth for AI agents (Claude Code, Cursor, etc.) working in this repo. Read this entire file before making changes. It captures the things that are non-obvious about how Astro Modular is structured.

If the answer to "how does X work?" isn't here and it took you more than one round of investigation, add it here when you figure it out.


What Astro Modular is

Astro Modular is an Astro blog theme designed for Obsidian users, by David V. Kimball. The src/content/ folder is a real Obsidian vault — users write in Obsidian, commit, and publish.

Stack:

  • Astro 7.x. Netlify / Vercel / GitHub Pages / Cloudflare Workers friendly.
  • HTML comments cannot live inside a JSX expression. Astro 7's compiler rejects {cond ? ( followed by <!-- ... -->, and a {/* ... */} sibling next to an element in the same branch is equally invalid, because the branch must be a single expression. Put the comment INSIDE the element ({/* ... */} as a child) or ABOVE the whole expression (<!-- ... --> at template level). Astro 5 tolerated both.
  • Obsidian vault as CMS. src/content/.obsidian/ is committed, with a curated plugin set.
  • Swup for client-side page transitions (NOT Astro's ClientRouter).
  • Tailwind 4 via @tailwindcss/vite, plus custom theme variables (17+ built-in color themes, switchable at runtime). Three v4 rules that are easy to trip over:
    • @apply inside an .astro <style> block needs @reference "<path>/global.css"; at the top of that block. Component styles compile in isolation and cannot see the theme context otherwise, and the build fails with "Cannot apply unknown utility class".
    • Base element styles in global.css must stay inside @layer base. v4 emits utilities into @layer utilities, and unlayered CSS outranks every layer, so a bare body { @apply bg-... } silently overrides the utility classes written on the element itself.
    • @apply x y !important is v3 syntax. In v4 the bang attaches per utility: @apply x! y!.
    • The JS config is still in use via @config "../../tailwind.config.mjs" in global.css. It derives fonts from siteConfig and maps the runtime theme variables, neither of which ports to a CSS-first @theme block.
  • Vanilla JS only — no React, no jQuery.
  • Modular by design — almost every feature toggles via siteConfig in src/config.ts.

Read the full file on GitHub · 782 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 · +3 lines · +433 tokens per session c5856c6ed591
  2. 26d ago Changed · +1 lines · +55 tokens per session c7150bdf53d3
  3. 27d ago Changed · +9 lines · +401 tokens per session f8f0e37a7ab0
  4. 1mo ago Changed · +5 lines · +140 tokens per session 41797b37f49f
  5. 2mo ago Changed · +33 lines · +454 tokens per session 5b24d7f6779d
  6. 2mo ago First seen · 731 lines · 6,845 tokens per session scan C f2865b9d62de

Subscribe to this mod's changes

astro-modular AGENTS.md is an instructions file published in the GitHub repository davidvkimball/astro-modular (235 stars, last pushed 5d ago), licensed MIT. It adds 8,328 tokens to every session, about $0.0333 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

astro-modular AGENTS.md compared with instructions from other repositories

astro-modular AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
astro-modular AGENTS.mddavidvkimball/astro-modularInstructions file2355d agoMITC8,328Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,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