astro-typescript-cursorrules-prompt-file — правило для Cursor
Правило задаёт Cursor стандарты для Astro, TypeScript и TailwindCSS, а также добавляет слэш-команду для подготовки Git-коммитов.
.cursor/rules/astro-typescript-cursorrules-prompt-file.mdcЧто делает astro-typescript-cursorrules-prompt-file
Правило направляет разработку Astro-проектов с TypeScript и TailwindCSS. Оно требует строгих настроек TypeScript, предлагает держать компоненты Astro модульными и разделять зоны ответственности. Для стиля кода задаёт комментарий с путём и именем файла в первой строке, объяснение цели комментариев и применение принципов DRY.
В наборе есть слэш-команда /commit: она формирует сообщение в формате Conventional Commits, добавляет тип и необязательную область, укладывается в 60 символов и сразу выводит полную команду git commit. В метаданных указаны globs: **/* и alwaysApply: false. Правило не применится, пока файл не сохранён по пути .cursor/rules/astro-typescript-cursorrules-prompt-file.mdc.
Какие задачи решает
- задать строгие правила TypeScript для Astro
- направить стилизацию компонентов через TailwindCSS
- разделить Astro-компоненты по зонам ответственности
- сформировать готовую команду Conventional Commit
- закрепить формат комментариев в исходниках
Примеры запросов агенту
- Проверь этот diff и подготовь коммит через
/commit. - Сформируй короткое сообщение Conventional Commit для изменений в этом файле и выведи полную команду
git commit. - Предложи коммит с типом и областью в нижнем регистре для текущих изменений, используя
/commit.
Как установить astro-typescript-cursorrules-prompt-file
Вручную: положить файлы
.cursor/rules/astro-typescript-cursorrules-prompt-file.mdcВо frontmatter: description, globs, alwaysApply
Вручную: положить файлы
.claude/rules/astro-typescript-cursorrules-prompt-file.mdПоле paths во frontmatter ограничивает файлы: globs из источника → paths
AGENTS.md
Codex читает AGENTS.md: вставьте текст правила туда
Вручную: положить файлы
.github/instructions/astro-typescript-cursorrules-prompt-file.instructions.mdПоле applyTo задаёт, к каким файлам применять: globs из источника → applyTo
Вручную: положить файлы
.devin/rules/astro-typescript-cursorrules-prompt-file.mdВручную: положить файлы
.clinerules/astro-typescript-cursorrules-prompt-file.mdПо шагам, с командами для каждой платформы: Cursor rules: файлы .mdc, четыре режима и замена .cursorrules
Вопросы о astro-typescript-cursorrules-prompt-file
Как установить astro-typescript-cursorrules-prompt-file в Cursor?
Сохраните файл правила по пути .cursor/rules/astro-typescript-cursorrules-prompt-file.mdc в проекте Cursor.
Что делает astro-typescript-cursorrules-prompt-file?
Правило задаёт нормы для Astro, TypeScript, TailwindCSS и оформления кода. Оно также добавляет /commit для подготовки Conventional Commit и полной команды Git.
Как работает команда /commit?
Она предлагает сообщение с типом и необязательной областью, ограничивает его 60 символами и выводит команду git commit, готовую к вставке в терминал.
Исходный текст
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