Airsc is free for everyone. If it helps you, support it with $2–$20.

Support
Cursor ruleSafeAI & LLM featuresSome setup

ai-agent-unity-rules

Common-ka · Common-ka/ai-agent-unity-rules

Provides production-ready AI configuration rules for Unity 6.2+ projects, universally supporting Cursor IDE and Google Antigravity with an auto-sync workflow.

🎮 Production-ready AI rules for Unity 6.2+. Single Source of Truth for Cursor (.cursor) and Google Antigravity (.agent) with auto-sync workflow.

40 stars6License: MITUpdated 10 months ago0 opens

Preview

▍

What you can do with it

  • Implement consistent AI coding standards across Unity projects using Cursor.
  • Synchronize AI agent rules between Cursor and Google Antigravity automatically.
  • Leverage AI for C# game development with predefined best practices.

Safety check

Safe

No risky patterns found in the files we scanned.

Automated scan of the repo files. Always review code you run.

From the README

Unity AI Agent Rules (Cursor + Antigravity)

📋 Description

The Single Source of Truth for Unity AI assistance.

This repository provides production-ready configuration rules for Unity 6.2+ projects. It is designed to be universal, automatically supporting both:

  1. Cursor IDE (via native .mdc format)
  2. Google Antigravity (via synced .agent/rules format)

We use a "write once, deploy everywhere" approach: rules are defined in Cursor's format and automatically converted for Antigravity Workspace using a custom CI/CD workflow.

🚀 Quick Start

Requirements

  • Unity 6.2 or higher
  • IDE: Cursor IDE OR Google Antigravity Workspace
  • .NET SDK for C# development

Installation

Option A: Automatic Setup (Recommended)

Simply clone this repository into the root of your Unity project. The AI agents will automatically detect their respective configuration folders.

cd YourUnityProject
git clone https://github.com/Common-ka/ai-agent-unity-rules.git

Option B: Manual Setup

For Cursor Users:

  1. Copy the .cursor/ folder to your project root.
  2. Copy .vscode/settings.json to your project's .vscode/ folder.

For Antigravity Users:

  1. Copy the .agent/ folder to your project root.
  2. Ensure .agent/rules/ contains the .md files.

🛠 How it Works (Sync Workflow)

This repository uses a Uni-Directional Data Flow to keep rules in sync.

graph LR
    A[.cursor/rules/*.mdc] -- python script --> B(.agent/rules/*.md)

  1. Source: Rules are authored in .cursor/rules/ using the modern .mdc format.
  2. Sync: A Python script (sync_rules.py) automatically converts these files into standard Markdown for Antigravity.
  3. Automation: A GitHub Action runs on every push to ensure .agent/rules are always up to date.

📄 License

MIT License - see LICENSE

View source on GitHub