Skip to main content
rule

astro-typescript-cursorrules-prompt-file — Cursor rule: install

This Cursor rule sets working conventions for Astro, TypeScript, and TailwindCSS, with a slash command for composing Git commits.

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/astro-typescript-cursorrules-prompt-file.mdc
Open on GitHub

What astro-typescript-cursorrules-prompt-file does

The rule guides Astro work with strict TypeScript settings and TailwindCSS as the styling system. It asks for modular, reusable Astro components with clear separation of concerns. Source files should begin with a one-line path and filename comment; other comments should explain purpose. The rules also call for modular code, DRY practices, and attention to performance.

It adds /commit, which prepares a Conventional Commits message with a type and optional scope, keeps it within 60 characters, and returns the complete git commit command. The metadata uses globs: **/* with alwaysApply: false. Cursor will not use this rule until it is saved at .cursor/rules/astro-typescript-cursorrules-prompt-file.mdc.

What it helps with

  • enforce strict TypeScript in an Astro project
  • keep Astro components modular and reusable
  • standardize styling with TailwindCSS
  • generate a paste-ready Conventional Commit command
  • add consistent path comments to source files

Example prompts for the agent

  • Review this diff and prepare a commit with /commit.
  • Create a concise Conventional Commit for the current changes and return the full git commit command.
  • Suggest a lowercase commit type with an optional scope for this diff using /commit.

How to install astro-typescript-cursorrules-prompt-file

Manually: put the files in place

.cursor/rules/astro-typescript-cursorrules-prompt-file.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about astro-typescript-cursorrules-prompt-file

How do I install astro-typescript-cursorrules-prompt-file in Cursor?

Save the rule file at .cursor/rules/astro-typescript-cursorrules-prompt-file.mdc in your Cursor project.

What does astro-typescript-cursorrules-prompt-file do?

It sets conventions for Astro, TypeScript, TailwindCSS, component structure, and source comments. It also adds /commit for Conventional Commit messages and the matching Git command.

What does the /commit command generate?

It creates a Conventional Commits message with a type and optional scope, keeps it within 60 characters, and prints a complete git commit command ready for the terminal.

Source text

astro-typescript-cursorrules-prompt-file.mdc · CC0-1.0
---
description: "Cursor rules for Astro development with TypeScript integration."
globs: **/*
alwaysApply: false
---
{
  "rules": {
    "commit_message_guidelines": {
      "description": "Guidelines for creating conventional commit messages.",
      
      "format": {
        "description": "The format for commit messages using the conventional commits spec.",
        "body": "[optional scope]: \n\n[optional body]\n\n[optional footer(s)]"
      },
      
      "enabled": true,
      
      "rules": [
        {
          "description": "Always suggest a conventional commit with a type and optional scope in lowercase letters."
        },
        {
          "description": "Keep the commit message concise and within 60 characters."
        },
        {
          "description": "Ensure the commit message is ready to be pasted into the terminal without further editing."
        },
        {
          "description": "Provide the full command to commit, not just the message."
        }
      ],
      
      "examples": [
        {
          "prompt": "<diff_context> /commit",
          "response": "git commit -m 'feat: add responsive navbar with TailwindCSS'"
        }
      ]
    },
    
    "development_guidelines": {
      "description": "Guidelines for developing code with Astro, TypeScript, and TailwindCSS.",
      
      "enabled": true,
      
      "rules": [
        {
          "description": "Enforce strict TypeScript settings, ensuring type safety across the project."
        },
        {
          "description": "Use TailwindCSS for all styling, keeping the utility-first approach in mind."
        },
        {
          "description": "Ensure Astro components are modular, reusable, and maintain a clear separation of concerns."
        }
      ]
    },
    
    "coding_style": {
      "description": "Guidelines for maintaining consistent coding style.",
      
      "enabled": true,
      
      "rules": [
        {
          "description": "Code must start with path/filename as a one-line comment."
        },
        {
          "description": "Comments should describe purpose, not effect."
        },
        {
          "description": "Prioritize modularity, DRY principles, and performance."
        }
      ]
    },
    
    "custom_slash_commands": {
      "description": "Custom slash commands.",
      
      "enabled": true,
      
      "commands": [
        {
          "name": "/commit",
          "description": "Generate a Git commit message using the conventional commits spec.",
          "enabled": true
        }
      ]
    }
  }
}

© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set210

blender-python-addon Cursor rule for writing Blender Python add-ons. Enforces clean operator lifecycles, structured panels, and safe Blender API calls. ★ 41,024repo stars beefreesdk This Cursor rule sets out Beefree SDK installation, proxy authentication, UI container setup, configuration, and callbacks for web projects. ★ 41,024repo stars beefreesdk-nocode-content-editor-cursorrules-prompt-file A Cursor rule that guides the agent when embedding Beefree SDK no-code editors for emails, pages and popups into a web app. ★ 41,024repo stars automl-hyperparameter-optimization Enforces disciplined AutoML and hyperparameter search in Python projects. It requires fixed baselines, leakage-free validation, and explicit tracking. ★ 41,024repo stars ascii-simulation-game-cursorrules-prompt-file A Cursor rule that frames an observer-only ASCII simulation: 10x10 grid, turn-based play, logs for nearly everything. Useful if you are building something in the spirit of Conway's Game of Life. ★ 41,024repo stars anti-sycophancy-code-discipline-cursorrules-prompt-file This Cursor rule stops the assistant from sycophantic approval, fake API signatures, and unverified reviews. It keeps refactoring disciplined and forces evidence-based checks. ★ 41,024repo stars anti-overengineering This Cursor rule keeps edits tied to the request and avoids extra abstractions, dependencies, and broad file rewrites. ★ 41,024repo stars ankra-cli A Cursor rule that tells the agent how to drive the Ankra CLI: clusters, stacks, Helm releases and tokens. ★ 41,024repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor