# Vibe Coding(Beta)

{% hint style="info" %}
This document specifies the AI-enabled open skill specifications for rapid development on the RayNeo X3 PRO Glasses, based on the aforementioned public Android SDK.

Importing `skill.md` into your AI IDE facilitates the quick implementation of glasses-specific features such as binocular display, temple touch control, and focus management.
{% endhint %}

## skill.md Download

{% file src="<https://1105412697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb2gO457cPlXbg9GrRxvn%2Fuploads%2FBAU4RwPKovMTKiPMAKo6%2Fmercury_skills_en.zip?alt=media&token=7862316c-c65c-4ee5-8b7c-6f637e512b3e>" %}

<table><thead><tr><th width="191">Category Directory</th><th>Content Introduction</th></tr></thead><tbody><tr><td>overview</td><td>A quick understanding of the SDK's capability boundaries, core type entry points, and module positioning.</td></tr><tr><td>quickstart</td><td>Pre-integration checks, Manifest configuration, Application initialization, and implementation of basic interaction conventions.</td></tr><tr><td>core-api</td><td>Connection state monitoring, device type branching, and basic capability integration.</td></tr><tr><td>mirror-ui</td><td>Implementing BindingPair, 3D parallax, and mirrored UI structures for Activity/Fragment/Container.</td></tr><tr><td>focus-touch</td><td>TempleAction handling, focus object management, dynamic focus items, and fixed focus tracking.</td></tr><tr><td>dialog-toast</td><td>FDialog/FToast construction, pop-up focus switching and gesture event integration.</td></tr><tr><td>recyclerview</td><td>Focus-following sliding, follow-touch scrolling, SnapHelper configuration, and binocular list synchronization.</td></tr><tr><td>ext-tools</td><td>Dp/sp conversion, batch visibility control, unified logging, and implementation of debugging recommendations.</td></tr><tr><td>checklisst</td><td>Threading/Lifecycle review, risk verification and compliance self-check.</td></tr></tbody></table>

***

## MercurySDK API Reference - Abstract Index

| Type                         | Package Path         | Core Signatures (Excerpts)                            | Function                                         |
| ---------------------------- | -------------------- | ----------------------------------------------------- | ------------------------------------------------ |
| `MercurySDK`                 | `...sdk`             | `init(application: Application)`                      | SDK initialization entry point                   |
| `MobileState`                | `...sdk.api`         | `isMobileConnected(): Flow<Boolean>`                  | Mobile phone connection state monitoring         |
| `BindingPair<B>`             | `...sdk.core`        | `updateView { }` / `setLeft { }` / `checkIsLeft(...)` | Left-right layout mapping and synchronous update |
| `make3DEffect`               | `...sdk.core`        | `make3DEffect(leftView, rightView, enable, parallax)` | Binocular 3D parallax configuration              |
| `make3DEffectForSide`        | `...sdk.core`        | `make3DEffectForSide(view, isLeft, enable, parallax)` | Monocular 3D parallax configuration              |
| `BaseMirrorActivity<B>`      | `...sdk.ui.activity` | `abstract class BaseMirrorActivity<B : ViewBinding>`  | Activity-level binocular base class              |
| `FToast`                     | `...sdk.ui.toast`    | `show(...)` / `showCustom(...)`                       | Binocular Toast                                  |
| `FDialog.Builder<T>`         | `...sdk.ui.dialog`   | `setContentView(...)` / `setEventHandler(...)`        | Binocular Dialog builder                         |
| `TempleAction`               | `...sdk.touch`       | `sealed class TempleAction`                           | Gesture semantic model                           |
| `TempleActionViewModel`      | `...sdk.touch`       | `state: SharedFlow<TempleAction>`                     | Gesture event stream distribution                |
| `FocusHolder` / `FocusInfo`  | `...sdk.ui.util`     | `addFocusTarget(...)` / `currentFocus(...)`           | Universal focus item management                  |
| `FixPosFocusTracker`         | `...sdk.ui.util`     | `handleFocusTargetEvent(action)`                      | Fixed focus item switching logic                 |
| `RecyclerViewFocusTracker`   | `...sdk.ui.util`     | `handleActionEvent(it, block)`                        | Moving focus item list tracking                  |
| `RecyclerViewSlidingTracker` | `...sdk.ui.util`     | `observeOriginMotionEventStream(...)`                 | Fixed focus + follow-touch scrolling             |
| `StartSnapHelper`            | `...sdk.util`        | `StartSnapHelper(offset2Start)`                       | List start snap                                  |
| `DeviceUtil`                 | `...sdk.util`        | `isX3Device(): Boolean`                               | RayNeo X3 device judgment                        |
| `FLogger`                    | `...sdk.util`        | `d(...)` / `i(...)` / `e(...)`                        | Unified SDK logging                              |

***

#### Example of Integration (Taking Cursor as an example)

1. Open your Android project with Cursor and locate the **.cursor** folder in the project directory; create a new one if it does not exist.
2. Unzip the aforementioned **skill.md** file and drag it into the .cursor directory.

<figure><img src="https://1105412697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb2gO457cPlXbg9GrRxvn%2Fuploads%2Fagzpnuac1macxSHuJAY6%2Fimage.png?alt=media&#x26;token=6b50ad94-e9a7-40f5-8887-c730cadb3bf1" alt=""><figcaption></figcaption></figure>

3. Initiate a query in the Cursor dialog box, and the agent will reference the content of the skill file based on your specific semantics and start coding.
