przeprogramowani/ai-rules-builder
关于
快速生成“Rules for AI”✨
人工智能与机器学习可以做什么
- Build AI Rules: Create customized rule sets for different editors (Copilot, Cursor, Windsurf)
- Export Options: Easily copy to clipboard or download as markdown files
- Smart Import: Automatically generate rules by dropping package.json or requirements.txt files
- Editor Integration: Provides programmatic access to rules via an MCP Server for integration with AI assistants in editors like Cursor
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文10xRules.ai by 10xDevs

Create so called "rules for AI" written in Markdown, used by tools such as GitHub Copilot, Cursor and Windsurf, through an interactive, visual interface.
Features
- Build AI Rules: Create customized rule sets for different editors (Copilot, Cursor, Windsurf)
- Export Options: Easily copy to clipboard or download as markdown files
- Smart Import: Automatically generate rules by dropping package.json or requirements.txt files
- Editor Integration: Provides programmatic access to rules via an MCP Server for integration with AI assistants in editors like Cursor
Getting Started
Installation
npm installDevelopment
npm run devBuild
npm run build
Local Supabase Setup
- Install Supabase CLI
Check Supabase docs for local setup reference.
brew install supabase/tap/supabase
Start Supabase (requires local Docker)
supabase startVerify Supabase is running
supabase status
Dotenv
Create .env.local file and add the following variables:
PUBLIC_ENV_NAME=local
SUPABASE_URL=http://localhost:54321
SUPABASE_PUBLIC_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
CF_CAPTCHA_SITE_KEY=1x00000000000000000000AA
CF_CAPTCHA_SECRET_KEY=1x0000000000000000000000000000000AA
# Email delivery via Resend (used by Supabase SMTP)
# Get your API key from https://resend.com
RESEND_API_KEY=re_xxxxxxxxxxxxx
Tech Stack
- Astro 5
- TypeScript 5
- React 18.3
- Tailwind 4
- Zustand
- Lucide React
Project Components
This repository contains multiple key components:
- AI Rules Builder UI (Root): The main Astro/React application providing the web interface for creating and managing AI rules.
- MCP Server (
./mcp-server): A Cloudflare Worker implementing the Model Context Protocol (MCP). This server allows AI assistants (like Cursor, Claude, etc.) to programmatically access the defined AI rules via specific tools (listAvailableRules,getRuleContent). This enables integration with editors for fetching context-aware coding guidelines. For detailed setup, usage, and planned features, see the MCP Server README.
Feature Flags
The project uses a feature flags system to separate deployments from releases. Feature flags can be used to control functionality availability based on the environment (local, integration, prod). The system supports flags for:
- API endpoints
- Astro pages
- UI components visibility
For detailed documentation about feature flags implementation, see .ai/feature-flags.md.
Testing
This project uses a comprehensive testing stack including unit tests and end-to-end tests.
Unit Testing with Vitest
Unit tests are implemented using Vitest with JSDOM for browser environment simulation and React Testing Library for component testing.
Available commands:
# Run unit tests
npm run test
# Run tests in watch mode
npm run test:watch
# Run tests with UI
npm run test:ui
# Generate coverage report
npm run test:coverage
End-to-End Testing with Playwright
E2E tests are implemented using Playwright with the Page Object Model pattern for maintainable tests.
Available commands:
# Run E2E tests
npm run test:e2e
# Run E2E tests with UI
npm run test:e2e:ui
# Generate test code with codegen
npm run test:e2e:codegen
Test Structure
tests/unit/- Unit teststests/setup/- Test setup filese2e/- End-to-end testse2e/page-objects/- Page Object Model classese2e/fixtures/- Test fixtures and data
CI/CD Integration
Tests are automatically run in the CI/CD pipeline using GitHub Actions. See .github/workflows/tests.yml for configuration.
Contributions
Send updates to:
src/data/dictionaries.tssrc/data/rules/...
Important: Introduce translations for new rules in src/i18n/translations.ts, otherwise the unit test will fail.
How to Write Effective Rules
When contributing new rules, please:
- Be specific: "Use React.memo for expensive components" not "Optimize components"
- Make it actionable: Provide clear guidance that can be immediately applied
- Include placeholders: Use
{{placeholder_text}}for project-specific values - Follow conventions: Match the style and structure of existing rules
- Focus on best practices: Rules should represent industry standards, not personal preferences
See examples in src/data/rules/ directory for each technology stack.
10xDevs - launching soon 🚀
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Damian 💻 |
pawel-twardziak 💻 |
Michal Dudziak 🚧 |
Artur Laskowski 💻 |
Michaelzag 💻 |
Piotr Porzuczek 💻 |
Michał Michalczuk 💻 |
Paweł Gnat 💻 |
Kacper Kłosowski 💻 |
We're recognizing all contributors with all-contributors. Feel invited to collaborate!
探索相关项目
加载中…