javascript-astro-tailwind-css-cursorrules-prompt-f

javascript-astro-tailwind-css-cursorrules-prompt-f is a cursor rule for coding agents from PatrickJS/awesome-cursorrules. It costs 929 tokens per session, scanned A, original, CC0-1.0.

A set of JavaScript and TypeScript guidelines for building websites with Astro and Tailwind CSS. Astro is a web framework that can generate fast pages with limited browser-side JavaScript, while Tailwind provides utility classes for styling.

In plain words
What is it for?
Use it when creating Astro pages and components, dynamic routes, layouts, styles, and selectively integrated React, Vue, or Svelte components.
Why use it?
It encourages a consistent project structure, file-based routing, reusable components, and efficient page delivery.

Cursor rule

About the project

PatrickJS/awesome-cursorrules is a collection of Markdown rule files that give Cursor AI editor project-specific instructions about code, frameworks, workflows, and standards. Developers use it to find reusable guidance for shaping Cursor’s behavior in different kinds of software projects.

PatrickJS/awesome-cursorrules · 40,725 stars · on GitHub

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 rules/patrickjs/awesome-cursorrules/javascript-astro-tailwind-css-cursorrules-prompt-f
Clone the repo
git clone --depth 1 https://github.com/PatrickJS/awesome-cursorrules

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 javascript-astro-tailwind-css-cursorrules-prompt-f

README.md
[![agentmods](https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/javascript-astro-tailwind-css-cursorrules-prompt-f.svg)](https://agentmods.dev/rules/patrickjs/awesome-cursorrules/javascript-astro-tailwind-css-cursorrules-prompt-f)
Your own site
<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/javascript-astro-tailwind-css-cursorrules-prompt-f"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/javascript-astro-tailwind-css-cursorrules-prompt-f.svg" alt="Measured on agentmods" height="20"></a>
Per session 929 This file is loaded in full into every session.
When invoked 929 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.00929 $0.00929
Opus 5 $0.00464 $0.00464
Sonnet 5 $0.00186 $0.00186
Haiku 4.5 $0.00093 $0.00093

Measured yesterday against content hash 5961966a7dee, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

javascript-astro-tailwind-css-cursorrules-prompt-f 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 yesterday.

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.

rules/javascript-astro-tailwind-css-cursorrules-prompt-f.mdc · 130 lines

How it starts

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

You are an expert in JavaScript, TypeScript, and Astro framework for scalable web development.

Key Principles

  • Write concise, technical responses with accurate Astro examples.
  • Leverage Astro's partial hydration and multi-framework support effectively.
  • Prioritize static generation and minimal JavaScript for optimal performance.
  • Use descriptive variable names and follow Astro's naming conventions.
  • Organize files using Astro's file-based routing system.

Astro Project Structure

  • Use the recommended Astro project structure:
    • src/
      • components/
      • layouts/
      • pages/
      • styles/
    • public/
    • astro.config.mjs

Component Development

  • Create .astro files for Astro components.
  • Use framework-specific components (React, Vue, Svelte) when necessary.
  • Implement proper component composition and reusability.
  • Use Astro's component props for data passing.
  • Leverage Astro's built-in components like when appropriate.

Routing and Pages

  • Utilize Astro's file-based routing system in the src/pages/ directory.
  • Implement dynamic routes using [...slug].astro syntax.
  • Use getStaticPaths() for generating static pages with dynamic routes.
  • Implement proper 404 handling with a 404.astro page.

Content Management

  • Use Markdown (.md) or MDX (.mdx) files for content-heavy pages.
  • Leverage Astro's built-in support for frontmatter in Markdown files.
  • Implement content collections for organized content management.

Styling

  • Use Astro's scoped styling with tags in .astro files.
  • Leverage global styles when necessary, importing them in layouts.
  • Utilize CSS preprocessing with Sass or Less if required.
  • Implement responsive design using CSS custom properties and media queries.

Performance Optimization

  • Minimize use of client-side JavaScript; leverage Astro's static generation.
  • Use the client:* directives judiciously for partial hydration:
    • client:load for immediately needed interactivity
    • client:idle for non-critical interactivity
    • client:visible for components that should hydrate when visible
  • Implement proper lazy loading for images and other assets.
  • Utilize Astro's built-in asset optimization features.

Data Fetching

  • Use Astro.props for passing data to components.
  • Implement getStaticPaths() for fetching data at build time.
  • Use Astro.glob() for working with local files efficiently.
  • Implement proper error handling for data fetching operations.

SEO and Meta Tags

  • Use Astro's tag for adding meta information.
  • Implement canonical URLs for proper SEO.
  • Use the component pattern for reusable SEO setups.

Integrations and Plugins

  • Utilize Astro integrations for extending functionality (e.g., @astrojs/image).
  • Implement proper configuration for integrations in astro.config.mjs.
  • Use Astro's official integrations when available for better compatibility.

Build and Deployment

  • Optimize the build process using Astro's build command.
  • Implement proper environment variable handling for different environments.
  • Use static hosting platforms compatible with Astro (Netlify, Vercel, etc.).
  • Implement proper CI/CD pipelines for automated builds and deployments.

Styling with Tailwind CSS

  • Integrate Tailwind CSS with Astro @astrojs/tailwind

Tailwind CSS Best Practices

  • Use Tailwind utility classes extensively in your Astro components.
  • Leverage Tailwind's responsive design utilities (sm:, md:, lg:, etc.).
  • Utilize Tailwind's color palette and spacing scale for consistency.
  • Implement custom theme extensions in tailwind.config.cjs when necessary.
  • Never use the @apply directive

Testing

  • Implement unit tests for utility functions and helpers.
  • Use end-to-end testing tools like Cypress for testing the built site.
  • Implement visual regression testing if applicable.

Accessibility

  • Ensure proper semantic HTML structure in Astro components.
  • Implement ARIA attributes where necessary.
  • Ensure keyboard navigation support for interactive elements.

Key Conventions

  1. Follow Astro's Style Guide for consistent code formatting.
  2. Use TypeScript for enhanced type safety and developer experience.
  3. Implement proper error handling and logging.
  4. Leverage Astro's RSS feed generation for content-heavy sites.
  5. Use Astro's Image component for optimized image delivery.

Read the full file on GitHub · 130 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. yesterday First seen · 130 lines · 929 tokens per session scan A 5961966a7dee

Subscribe to this mod's changes

javascript-astro-tailwind-css-cursorrules-prompt-f is a cursor rule published in the GitHub repository PatrickJS/awesome-cursorrules (40,725 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 929 tokens to every session, about $0.0046 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-09-03.