astro-modular AGENTS.md

astro-modular AGENTS.md is an instructions file for Codex, OpenCode from davidvkimball/astro-modular. It costs 6,845 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

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/davidvkimball/astro-modular/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 6,845 This file is loaded in full into every session.
When invoked 6,845 The same file — it is already loaded in full.
Security scan C 1 finding. 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.06845 $0.06845
Opus 5 $0.03423 $0.03423
Sonnet 5 $0.01369 $0.01369
Haiku 4.5 $0.00685 $0.00685

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

How it starts

The opening of the file, as written. The whole thing — 731 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 + custom theme variables (17+ built-in color themes, switchable at runtime).
  • Vanilla JS only — no React, no jQuery.
  • Modular by design — almost every feature toggles via siteConfig in src/config.ts.

Core philosophy: Content lives in Obsidian. Standard markdown links, wikilinks, Obsidian embeds, callouts, and tags should work identically in Obsidian and on the live site. Don't take shortcuts that break Obsidian-native behavior.


Cardinal rules

  1. NEVER edit files in src/content/ without explicit user permission. Posts, pages, projects, docs, frontmatter — all belong to the user. Only edit config, components, layouts, utilities, scripts, and plugins.
  2. Use pnpm, not npm. Scripts: pnpm run <script>.
  3. Use entry.id, NEVER entry.slug. slug is removed in Astro v6 and returns undefined. Folder-based entries have IDs like 'folder-name', NOT 'folder-name/index'.
  4. Never disable the Astro dev toolbar (devToolbar.enabled: true in astro.config.mjs). The pnpm module-loading errors in the console are cosmetic.
  5. Never disable vite.server.fs.strict. Security boundary.
  6. Never use console.log() in production code. Use src/utils/logger.ts.
  7. Never hardcode colors. Use Tailwind classes that reference theme variables (primary-*, highlight-*) with dark: variants. The theme system has 17+ color themes — hardcoded colors break all of them.
  8. Never remove or rename // [CONFIG:KEY] comment markers in src/config.ts. The Astro Modular Settings Obsidian plugin uses them to edit config from inside the vault.
  9. Never use destructive commands (rm -rf, git reset --hard, force push) without explicit approval. Investigate root causes.
  10. Match existing patterns. This codebase already solves most problems consistently. Search before inventing.

Read the full file on GitHub · 731 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 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 (225 stars, last pushed 9d ago), licensed MIT. It adds 6,845 tokens to every session, about $0.0342 per session on Opus 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.