Rule Generator

VerifiedSafe

Creates new Antigravity rules to enforce behavioral patterns, user preferences, or project conventions permanently. Triggers when the evolution observer detects a preference or when a user explicitly requests a new rule. Ensures rules are conflict-free and follow naming conventions.

Sby Skills Guide Bot
DevelopmentIntermediate
606/2/2026
Claude Code
#rule-generation#antigravity#agent-rules#workflow-enforcement

Recommended for

Our review

This meta-skill creates Antigravity rules to permanently enforce behaviors, user preferences, or project conventions.

Strengths

  • Automates creation of consistent, conflict-free rules
  • Uses a standard template for clear structure
  • Includes conflict checking against existing rules
  • Logs every new rule for traceability

Limitations

  • Requires orchestrator approval before creation
  • Cannot modify core rules 00-06
  • Depends on the quality of user-provided instructions
When to use it

When a behavioral pattern, user preference, or project convention needs to be permanently enforced within the Antigravity environment.

When not to use it

For temporary or one-off decisions that don't warrant a permanent rule, or when the proposed rule would weaken safety safeguards.

Security analysis

Safe
Quality score88/100

The skill only creates and edits rule files within the agent's internal .agent/rules/ directory. It does not execute shell commands, access networks, handle secrets, or disable safety measures. It explicitly forbids modifying core safety rules and requires orchestrator approval, ensuring a human-in-the-loop for any rule changes. No destructive or exfiltrating actions are possible.

No concerns found

Examples

Enforce Python style
Create a rule that always uses Black for Python formatting and requires type hints for all function signatures.
Avoid redundant logging
I keep asking the assistant to not print debug info unless I ask. Please create a rule that suppresses verbose logging by default.
Project-specific API pattern
Create a rule for our project: all API endpoints must follow the pattern /api/v2/{resource} and return JSON with an envelope format.

name: rule-generator description: "Creates new Antigravity rules when a behavioral pattern, user preference, or project convention needs to be enforced permanently. Triggers when the evolution observer detects a preference, or when the user explicitly asks for a new rule."

Rule Generator (Meta-Skill)

Goal

Create properly formatted Antigravity rules that are clear, actionable, and do not conflict with existing rules.

Instructions

Step 1: Define the Rule

Before creating the file, clarify:

  • What behavior to enforce: What should the agent always do (or never do)?
  • Why it matters: What goes wrong if this rule is not followed?
  • Source: Where did this rule come from? (user preference, error prevention, project convention)

Step 2: Check for Conflicts

Read all existing rules in .agent/rules/:

  • Does any existing rule contradict this new one?
  • Does any existing rule already cover this? (in which case, update it instead of creating a new one)
  • If there is a conflict, present both rules to the orchestrator and ask which takes priority

Step 3: Write the Rule File

Create a new file in .agent/rules/ with the naming convention:

  • Core rules (00-06): NEVER modify these
  • Project-specific rules: start numbering from 10- onwards (e.g., 10-python-style.md, 11-api-conventions.md)
  • This leaves room for future core rules (07-09)

Use the template in resources/rule-template.md.

Step 4: Log and Inform

  • Append to .agent/knowledge/evolution-log.md
  • Tell the orchestrator:
    • What the new rule does (plain English)
    • Why it was created
    • That it is now active in all future interactions
    • Where to find it (.agent/rules/<filename>)

Constraints

  • NEVER modify rules 00 through 06 — these are the Ground Zero core
  • NEVER create rules that weaken safety (e.g., "skip quality checks," "ignore errors")
  • ALWAYS get orchestrator approval before creating a rule
  • Rules must be phrased as clear imperatives ("Always do X," "Never do Y," "When X happens, do Y")
  • Avoid vague rules ("Try to be clean" — what does "clean" mean? Be specific.)
Related skills