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
6/2/2026
Claude Code
#rule-generation#antigravity#agent-rules#workflow-enforcement

Recommended for

Automated summary

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

How this analysis is made

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.)

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/rule-generator-mmlj2oze/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/rule-generator-mmlj2oze' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/rule-generator-mmlj2oze/download' --output '.skill-downloads/rule-generator-mmlj2oze/SKILL.md.part' && mv '.skill-downloads/rule-generator-mmlj2oze/SKILL.md.part' '.skill-downloads/rule-generator-mmlj2oze/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/rule-generator-mmlj2oze/SKILL.md' && test -s '.skill-downloads/rule-generator-mmlj2oze/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/rule-generator' && cp -R '.skill-downloads/rule-generator-mmlj2oze' '.claude/skills/rule-generator'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/rule-generator-mmlj2oze'

openskills read 'rule-generator-mmlj2oze'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/rule-generator-mmlj2oze/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills