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.
.cursor/rules/astro-typescript-cursorrules-prompt-file.mdcWhat 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 commitcommand. - 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.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/astro-typescript-cursorrules-prompt-file.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/astro-typescript-cursorrules-prompt-file.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/astro-typescript-cursorrules-prompt-file.mdManually: put the files in place
.clinerules/astro-typescript-cursorrules-prompt-file.mdStep 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