Using Omni Local Model Editor to vibe-code AI Context

Using Cursor + Omni’s Local Model Editor to Auto-Generate AI Context

I’ve been experimenting with Omni’s local model editor package, and I wanted to share a workflow that’s been working really well for me: using Cursor to automatically generate AI context for my Omni models based on existing data documentation.

The Setup

First, follow the installation instructions in the @omni-co/model-local-editor package to get set up with your environment variables.

Once that’s done, create a directory for your project and initialize it:

mkdir my-omni-project
cd my-omni-project
omni-sync init <your-model-id> --branch <my-branch-name> --create-branch

Once you’ve created the branch, start the sync:

omni-sync start <your-model-id>

This pulls all your view files and topics into your IDE and establishes a live connection - any changes you make locally will automatically sync to your Omni branch.

Starting With Your Data Documentation

The key insight here is that many teams already have documentation about their data somewhere - a Google Doc, a Notion page, a wiki, an existing data dictionary. This documentation usually describes what fields mean, what the data represents, maybe some example values.

The goal is to sync that knowledge into Omni so it can be used by the Omni AI assistant. For this demo, I used Claude to quickly generate a markdown file describing the fields from some sample data, but in practice, you’d just use whatever documentation you already have. The format doesn’t really matter - as long as it describes what your fields are and what they mean, Cursor can work with it.

Using Cursor to Generate AI Context

Now for the magic part. In Cursor:

  1. Drag your data dictionary file into the chat context window

  2. Add a couple of Omni docs files to the context:

  3. Give it a simple prompt: “Taking this data dictionary and based on the Omni docs provided, write AI context to my Omni model”

Cursor then goes through each view file and:

  • Adds model-level AI context at the top level

  • Adds topic-specific context to relevant topics

  • Writes field-level descriptions for individual dimensions

  • Adds synonyms where appropriate

  • Populates sample_values with examples from the data dictionary

Handling Errors

One thing I ran into: Cursor put a colon in one of the description strings without properly quoting it, which caused a validation error. The nice thing about the local editor is you see these errors immediately in your terminal rather than having to discover them in the Omni UI.

I could have asked Cursor to fix it if the error was across multiple files, but in this case I just manually wrapped the string in quotes and it synced successfully.

Remember, this is AI generated code so you should check it for mistakes before merging. For example, I have seen it incorrectly use all_values instead of sample_values.

The Result

All my changes synced successfully to my Omni branch. When I checked the UI:

  • Model file had top-level AI context

  • Order items topic had topic-specific context

  • Each view file had proper descriptions, AI Context, synonyms, and sample values populated

Check out the video to see it live: Vibe Coding AI Context | Loom