astro-site

astro-site is a cursor rule for Cursor from ctxs-ai/ctxs.ai. It costs 0 tokens per session (520 once invoked), scanned A, original, MIT.

Frontend project rules for building the ctxs.ai site with Astro, React, and Tailwind CSS. Astro builds the site, React handles interactive parts, and Tailwind CSS supplies styling utilities.

In plain words
What is it for?
Use them when adding or changing Astro pages, React components, Tailwind styles, or API endpoints in the site.
Why use it?
They give coding agents a consistent place for pages, components, layouts, styles, and interactive behavior.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use them when adding or changing Astro pages, React components, Tailwind styles, or API endpoints in the site.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/ctxs-ai/ctxs.ai/astro-site
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.

Clone the repo
git clone --depth 1 https://github.com/ctxs-ai/ctxs.ai

Made for: Cursor.

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-site

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/ctxs-ai/ctxs.ai/astro-site"><img src="https://agentmods.dev/badge/rules/ctxs-ai/ctxs.ai/astro-site.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 520 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00520
Opus 5 $0.00000 $0.00260
Sonnet 5 $0.00000 $0.00104
Haiku 4.5 $0.00000 $0.00052

Measured 9d ago against content hash f8ff72f46ea4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

astro-site 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 9d 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.

.cursor/rules/astro-site.mdc · 59 lines

How it starts

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

ctxs.ai Site/Frontend

This part of the project implements the web interface for ctxs.ai using Astro with React components and Tailwind CSS for styling.

Architecture Overview

The site follows Astro's file-based routing system with these key directories:

  • site/src/pages/: Contains route definitions and page components
  • site/src/components/: Reusable UI components (both Astro and React)
  • site/src/layouts/: Page layouts and templates
  • site/src/lib/: Utility functions and helpers
  • site/src/styles/: Global styles and Tailwind configuration

Technology Stack

  • Framework: Astro - A modern static site builder with island architecture
  • UI Components: React 19 (with JSX/TSX)
  • Styling: Tailwind CSS 4 with custom components using shadcn/ui architecture
  • Deployment: Cloudflare Pages (configured with Astro Cloudflare adapter)

Development Patterns

Component Guidelines

  • Prefer Astro components (.astro) for static UI elements and page layouts
  • Use React components (.tsx) for interactive elements that require client-side JavaScript
  • Follow the component structure in site/src/components/ui/ for consistent styling

API endpoints

  • Add export const prerender = false to the beginning of API endpoints so that they are deployed as server functions

Styling Approach

  • Use Tailwind utility classes for styling
  • UI components follow the shadcn/ui pattern for consistency and maintainability
  • Custom styles should be added to the appropriate files in site/src/styles/

Data Fetching

  • The site interfaces with the context system to display markdown files
  • API routes are defined in site/src/pages/api/
  • Context data is fetched and rendered through the components in site/src/components/

Best Practices

  1. Use TypeScript for type safety and better developer experience
  2. Keep components small and focused on a single responsibility
  3. Follow Astro's performance patterns by minimizing client-side JavaScript
  4. Maintain accessibility standards in all UI components
  5. Use the existing UI component library rather than creating custom styles

Read the full file on GitHub · 59 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. 9d ago First seen · 59 lines · 0 tokens per session scan A f8ff72f46ea4

Subscribe to this mod's changes

astro-site is a cursor rule published in the GitHub repository ctxs-ai/ctxs.ai (27 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 520 tokens. 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.