How to Contribute Rules

This guide will help you understand how to add new rules to the AI Stack Directory.

1. Fork the Repository

Start by forking the repository to your GitHub account. This creates a copy of the repository that you can modify.

View Repository on GitHub

2. Adding a New Rule

If you want to submit a new rule that does not already exist in the Directory, follow these steps:

1. Locate the Rules Directory

Rules are stored in the rules/ directory as JSON files.

View rules directory →

2. Create a Rule File

Create a new JSON file in the rules/ directory with a descriptive name (e.g., typescript-senior-developer.json).

Use the following JSON structure:

{
  "title": "Your Rule Title",
  "category": "TypeScript",
  "tags": ["typescript", "react", "nextjs"],
  "content": "Your rule content here...",
  "is_official": false,
  "is_popular": false,
  "author": {
    "name": "Your Name or GitHub Username",
    "url": "https://github.com/yourusername",
    "avatar": "https://github.com/yourusername.png"
  }
}

3. Important Parameters

  • title: A clear, descriptive title for your rule
  • content: The full rule content/prompt text
  • category: The technology/framework (e.g., TypeScript, Python, Next.js)
  • tags: An array of relevant tags for searchability
  • is_official: Set to true if this is an official/verified rule (optional)
  • is_popular: Set to true if this should appear in popular filters (optional)
  • author: Object with name, url, and avatar (optional)

Your Rule Should:

  • Be accurate and related to the category
  • Be clearly worded to help developers understand and use them easily
  • Be actionable, providing steps or insights to solve common problems
  • Be tested - ensure your rule has been tested and works as expected

3. Create a Pull Request

After adding your rule:

  1. Commit your changes to your forked repository
  2. Push your changes to your fork
  3. Create a Pull Request from your fork to the main repository
  4. Provide a clear description of your rule in the PR
Create Pull Request

Quick Actions