@hybridlabor-api/bdb-antigravity-skills 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hybridlabor-api/bdb-antigravity-skills",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Optimized Antigravity skills and MCP pack for BDB DEV",
5
5
  "main": "installer.js",
6
6
  "bin": {
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: bdb-adobe-suite-mcp
3
+ description: Utilizes the Adobe Suite MCP servers (adobe_mcp.py and adobe_uxp_mcp) to automate Photoshop, Illustrator, Premiere Pro, and After Effects using ExtendScript and UXP WebSocket bridges.
4
+ ---
5
+
6
+ # Adobe Creative Suite MCP — Integration and AI Guide
7
+
8
+ This skill file instructs AI agents on how to control Adobe Creative Suite applications (Photoshop, Illustrator, After Effects, and Premiere Pro) using both ExtendScript (`adobe_mcp.py`) and UXP WebSocket (`adobe_uxp_mcp`) bridges.
9
+
10
+ ## 1. Overview and Pipeline Value
11
+
12
+ The **Adobe Suite MCP integrations** combine two distinct automation strategies for Creative Cloud applications:
13
+ 1. **ExtendScript Bridge (`adobe_mcp.py`):** Uses OS-level scripting (AppleScript `osascript` on macOS; PowerShell COM objects on Windows) to send JSX code directly to Photoshop, Illustrator, and After Effects. This runs without installing plugins.
14
+ 2. **UXP (Unified Extensibility Platform) Bridge (`adobe_uxp_mcp`):** Connects to Photoshop and Premiere Pro via a local WebSocket server (default port `8080`). This provides modern, fast, and sandboxed JS API interactions but requires UXP developer plugins to be active in the application.
15
+
16
+ ---
17
+
18
+ ## 2. System Instructions
19
+
20
+ ### Tool Selection Matrix
21
+ When asked to automate Photoshop, choose between the two interfaces based on application state:
22
+ - If UXP plugins are connected, use `adobe-uxp-mcp` tools (`ps_get_active_document`, `ps_add_layer`).
23
+ - If UXP is unavailable, fall back to ExtendScript tools (`ps_add_text_layer`).
24
+
25
+ ### OS Platform Routing
26
+ The ExtendScript bridge dynamically routes script payloads:
27
+ - **macOS:** Targets application bundle IDs (e.g. `id "com.adobe.Photoshop"`) using AppleScript `do javascript` / `DoScript`.
28
+ - **Windows:** Instantiates COM interfaces (e.g., `Photoshop.Application`, `Illustrator.Application`, `AfterFX.Application`) using PowerShell and processes transient `.jsx` scripts.
29
+
30
+ ---
31
+
32
+ ## 3. Available Tools and API Parameters
33
+
34
+ ### ExtendScript Tools (`adobe_mcp.py`)
35
+ - **`ps_add_text_layer(text: string, font_size?: int)`**: Adds a new text layer with contents to the active Photoshop file.
36
+ - **`ae_render_active_comp()`**: Appends the active composition to the After Effects render queue and kicks off the render.
37
+ - **`ai_draw_rectangle(width?: float, height?: float, red?: int, green?: int, blue?: int)`**: Spawns a document in Illustrator (if empty) and draws a filled path rectangle.
38
+
39
+ ### UXP Tools (`adobe_uxp_mcp`)
40
+ - **`ps_get_active_document`**: Retrieves the file name of the frontmost document in Photoshop.
41
+ - **`ps_add_layer(name: string)`**: Adds a new layer in Photoshop.
42
+ - **`pr_get_active_sequence`**: Retrieves the active sequence name from the Premiere Pro project.
43
+
44
+ ---
45
+
46
+ ## 4. Code Recipes and Prompt Cookbook
47
+
48
+ ### Recipe 1: Draw Custom Vector Layout in Illustrator
49
+ Generate a filled RGB path inside Adobe Illustrator via the ExtendScript bridge:
50
+
51
+ ```json
52
+ // Tool Call: ai_draw_rectangle
53
+ {
54
+ "width": 500.0,
55
+ "height": 250.0,
56
+ "red": 0,
57
+ "green": 128,
58
+ "blue": 255
59
+ }
60
+ ```
61
+
62
+ ### Recipe 2: UXP Photoshop Layer Control
63
+ Retrieve the active document name, check context, and add a layer via UXP:
64
+
65
+ ```json
66
+ // Step 1: Read active file name
67
+ // Tool Call: ps_get_active_document
68
+
69
+ // Step 2: Create a layer named "Background_Tint"
70
+ // Tool Call: ps_add_layer
71
+ {
72
+ "name": "Background_Tint"
73
+ }
74
+ ```
75
+
76
+ ### Recipe 3: Batch rendering a composition (After Effects ExtendScript)
77
+ Queue and render:
78
+
79
+ ```json
80
+ // Tool Call: ae_render_active_comp
81
+ {}
82
+ ```
83
+
84
+ ---
85
+
86
+ ## 5. Troubleshooting and Connection Details
87
+
88
+ ### Configuration and Ports
89
+ - **UXP WebSocket Port:** `8080` (Standard WebSocket connection `ws://localhost:8080`)
90
+ - **Bridge Setup:**
91
+ - *ExtendScript:* Requires zero installation beyond standard macOS or Windows system settings.
92
+ - *UXP Server:* Start the server (`node mcps/adobe_uxp_mcp/index.js`). Then open Photoshop/Premiere and load the respective plugin folder located in `mcps/adobe_uxp_mcp/plugins/` using the **Adobe UXP Developer Tool (UDT)**.
93
+
94
+ ### Common Errors and Fixes
95
+ 1. **`Adobe Application is not connected to the UXP MCP Bridge`**
96
+ - *Cause:* The UXP plugin has not been loaded via the UXP Developer Tool.
97
+ - *Fix:* Launch the Adobe UXP Developer Tool, click **Add Plugin**, navigate to `mcps/adobe_uxp_mcp/plugins/photoshop/manifest.json`, and click **Load**.
98
+ 2. **`COM Object Instantiation Failed (Windows)`**
99
+ - *Cause:* Adobe software is not registered correctly in the Windows Registry, or is running with different privilege elevations.
100
+ - *Fix:* Ensure the targeted Adobe application is open and registered. Run your CLI terminal with administrator privileges if User Account Control (UAC) blocks COM access.
101
+ 3. **`osascript User interaction is not allowed`**
102
+ - *Cause:* macOS Accessibility permissions are blocking terminal commands from driving GUI applications.
103
+ - *Fix:* Add Terminal / Cursor / Claude to **Accessibility** and **Automation** folders in Privacy & Security settings.
104
+ 4. **`Port 8080 already in use`**
105
+ - *Cause:* The UXP WebSocket server conflicts with a running Docker container or Web developer server.
106
+ - *Fix:* Edit the `WS_PORT` constant inside `adobe_uxp_mcp/index.js` and matching plugin configs to utilize an alternate port (e.g. `8888`).
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: bdb-after-effects-mcp
3
+ description: Utilizes the After Effects MCP servers (after-effects-mcp and ae-mcp) to create compositions, layers, masks, keyframe animations, and run ExtendScript.
4
+ ---
5
+
6
+ # After Effects MCP — Integration and AI Agent Guide
7
+
8
+ This skill file instructs AI agents on how to control Adobe After Effects using the Node.js `after-effects-mcp` and Go `ae-mcp` integrations. It details ExtendScript scripting, layer manipulation, keyframe animation, and troubleshooting steps.
9
+
10
+ ## 1. Overview and Pipeline Value
11
+
12
+ The **After Effects MCP Server** integrations enable AI assistants to programmatically control Adobe After Effects (2022+). They automate title design, motion graphics layouts, layer adjustments, mask path generations, and visual effects pipelines.
13
+
14
+ ### Architecture
15
+ - **JSX Script Bridge:** Because After Effects lacks a native REST API, control is achieved using an ExtendScript (`.jsx`) panel.
16
+ - **`after-effects-mcp` (Node.js):** Writes commands to a local temp file. An AE panel script (`mcp-bridge-auto.jsx`) polls this file every few seconds, executes the script via AE's JavaScript engine, and writes the output back to disk.
17
+ - **`ae-mcp` (Go):** Exposes similar ExtendScript bridges and includes a **Manim Integration** to render mathematical equations using Python's Manim package and import them into AE as transparent WebP animations.
18
+
19
+ ---
20
+
21
+ ## 2. System Instructions
22
+
23
+ ### Workflow Priorities
24
+ 1. **Enable Scripting Preferences:** After Effects must have **"Allow Scripts to Write Files and Access Network"** enabled (`Preferences -> Scripting & Expressions`).
25
+ 2. **Verify the Bridge Panel is Open:** Ensure the `mcp-bridge-auto.jsx` panel is loaded in After Effects (`Window -> mcp-bridge-auto.jsx`) and that the "Auto-run commands" checkbox is checked. Without it, commands will hang.
26
+ 3. **Handle coordinates safely:** After Effects uses a 2D coordinate system originating from the top-left corner `[0,0]` of the active composition.
27
+ 4. **ExtendScript Fallback:** If a high-level tool cannot perform a complex layer relationship task, write a custom script and execute it via the `run-script` tool.
28
+
29
+ ---
30
+
31
+ ## 3. Available Tools and API Parameters
32
+
33
+ ### Node-based `after-effects-mcp` Tools
34
+
35
+ | Tool | Parameters | Description |
36
+ | :--- | :--- | :--- |
37
+ | **`create-composition`** | `name: string`, `width: int`, `height: int`, `frameRate: float`, `duration: float` | Spawns a new comp in the active project. |
38
+ | **`run-script`** | `script: string` | Evaluates arbitrary ExtendScript code inside the AE DOM. |
39
+ | **`get-results`** | None | Reads the result of the last executed script. |
40
+ | **`setLayerProperties`** | `layerIndex: int`, `properties: object` | Adjusts position `[x,y,z]`, scale `[x,y,z]`, opacity, rotation, 3D status, or blendMode. |
41
+ | **`setLayerKeyframe`** | `layerIndex: int`, `propertyName: string`, `time: float`, `value: any` | Creates a keyframe on a layer property at a specified timeline position. |
42
+ | **`setLayerExpression`** | `layerIndex: int`, `propertyName: string`, `expression: string` | Binds a Javascript expression to a target property (e.g. `wiggle(5, 20)`). |
43
+ | **`createCamera`** | `name: string`, `zoom: float` | Adds a 3D camera layer to the active composition. |
44
+ | **`setLayerMask`** | `layerIndex: int`, `maskName: string`, `points: float[][]` | Configures mask paths, feathering, expansion, and opacity. |
45
+
46
+ ### Go-based `ae-mcp` Tools
47
+ - Includes identical layer creation wrappers.
48
+ - **`generate-manim-render(code: string)`**: Executes Python Manim to render math equations and imports them as WebP clips into the project assets folder.
49
+
50
+ ---
51
+
52
+ ## 4. Code Recipes and Prompt Cookbook
53
+
54
+ ### Recipe 1: Standard Kinetic Typography
55
+ Create a composition, add a text layer, center it, and apply a scale wiggle expression:
56
+
57
+ ```json
58
+ // Step 1: Create Comp
59
+ // Tool: create-composition(name="TitleAnimation", width=1920, height=1080, frameRate=29.97, duration=5.0)
60
+
61
+ // Step 2: Write ExtendScript to add a text layer
62
+ // Tool: run-script(script="var comp = app.project.activeItem; var textLayer = comp.layers.addText('HELLO BDB OS'); textLayer.property('Position').setValue([960, 540]);")
63
+
64
+ // Step 3: Apply Wiggle to Scale
65
+ // Tool: setLayerExpression(layerIndex=1, propertyName="Scale", expression="wiggle(2, 15)")
66
+ ```
67
+
68
+ ### Recipe 2: Custom Text Ingest from File
69
+ To batch-generate subtitles or title cards using `run-script`:
70
+
71
+ ```javascript
72
+ // Call tool: run-script(script="...")
73
+ var comp = app.project.activeItem;
74
+ if (comp && comp instanceof CompItem) {
75
+ app.beginUndoGroup("Create Titles");
76
+ var titles = ["Design", "Develop", "Deploy"];
77
+ for (var i = 0; i < titles.length; i++) {
78
+ var textLayer = comp.layers.addText(titles[i]);
79
+ textLayer.property("Position").setValue([960, 200 + (i * 200)]);
80
+ textLayer.startTime = i * 1.5;
81
+ textLayer.outPoint = (i + 1) * 1.5;
82
+ }
83
+ app.endUndoGroup();
84
+ "Successfully created " + titles.length + " text layers.";
85
+ } else {
86
+ "Error: No active composition.";
87
+ }
88
+ ```
89
+
90
+ ---
91
+
92
+ ## 5. Troubleshooting and Connection Details
93
+
94
+ ### Configuration and Setup
95
+ - **ExtendScript Panel:** The bridge operates via `mcp-bridge-auto.jsx`.
96
+ - **Install Panel:**
97
+ ```bash
98
+ # run installer script from the after-effects-mcp folder
99
+ npm run install-bridge
100
+ ```
101
+ This places the script inside After Effects' ScriptUI Panels folder.
102
+ - **Active Communication:** Node MCP runs locally using standard stdio. Ensure the client config file is properly wired up:
103
+ ```json
104
+ "AfterEffectsMCP": {
105
+ "command": "node",
106
+ "args": ["/Users/timrennings/bdb-dev-optimized-antigravity-skills/mcps/after-effects-mcp/build/index.js"]
107
+ }
108
+ ```
109
+
110
+ ### Common Errors and Fixes
111
+ 1. **`Adobe Script Error: Security setting does not allow this script to write files`**
112
+ - *Fix:* In After Effects, go to `Preferences -> Scripting & Expressions` and check the box **"Allow Scripts to Write Files and Access Network"**.
113
+ 2. **`Commands are hanging / No response from server`**
114
+ - *Cause:* The bridge UI panel is closed in After Effects, or the "Auto-run" checkbox is disabled.
115
+ - *Fix:* Navigate to `Window -> mcp-bridge-auto.jsx` in the top menu and verify that the panel is open and actively polling (indicated by status prints in the panel window).
116
+ 3. **`ExtendScript undefined variable or Layer index out of bounds`**
117
+ - *Cause:* ExtendScript arrays in After Effects are **1-indexed** for layers (`comp.layer(1)`) while the Node tools layer indices might be 0-indexed depending on the tool call translation. Ensure you map boundaries carefully.
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: bdb-blender-mcp
3
+ description: Utilizes the Blender MCP server and addon to build 3D assets, apply materials, inspect scenes, and script bpy.
4
+ ---
5
+
6
+ # Blender MCP — Integration and AI Agent Guide
7
+
8
+ This skill file instructs AI agents on how to interact with the Blender MCP server and addon. It details scene manipulation, Python code execution (`bpy`), external asset retrieval, and troubleshooting workflows.
9
+
10
+ ## 1. Overview and Pipeline Value
11
+
12
+ The **Blender MCP Server** connects AI models to Blender (3.0+) via a local TCP socket bridge. In the BDB OS workflow, this integration speeds up low-poly layouts, scene prototyping, material assignment, rendering, and programmatic asset generation.
13
+
14
+ ### Architecture
15
+ - **Blender Addon (`addon.py`):** Runs inside Blender, creating a socket server (default port `9876`) that executes incoming requests on Blender's main thread using the Blender Python API (`bpy`).
16
+ - **MCP Server Bridge:** A Node.js or Python-based subprocess (`blender-mcp`) connecting to the addon socket, presenting a clean tool layout to the AI.
17
+ - **Generative AI & API Integrations:** Integrates with Poly Haven (materials, HDRIs, models), Sketchfab, Hyper3D Rodin, and Hunyuan3D for AI-assisted asset drafting.
18
+
19
+ ---
20
+
21
+ ## 2. System Instructions
22
+
23
+ ### Workflow Priorities
24
+ 1. **Connect First:** Ensure Blender is open and the MCP Addon is actively running (click "Connect to Claude" in the Sidebar's **BlenderMCP** tab).
25
+ 2. **Read the Scene:** Proactively query the active scene layout using introspection tools before placing meshes.
26
+ 3. **Save Work Proactively:** Running arbitrary script commands can crash the active Blender session. Always instruct the user to back up their project before running custom code.
27
+ 4. **Clean Code Structure:** When using `execute_blender_code`, write standard `bpy` script blocks. Delete reference meshes (like the default Cube) programmatically if the prompt asks for a clean slate.
28
+
29
+ ---
30
+
31
+ ## 3. Available Tools and API Parameters
32
+
33
+ | Tool | Parameters | Description |
34
+ | :--- | :--- | :--- |
35
+ | **`get_scene_info`** | None | Returns document structure, active camera, render settings, and a list of all scene objects. |
36
+ | **`create_mesh`** | `type: string`, `location?: float[]`, `scale?: float[]`, `rotation?: float[]`, `name?: string` | Spawns primitive shapes: Cube, Sphere, Cylinder, Cone, Torus, Grid, Monkey, Plane. |
37
+ | **`delete_object`** | `name: string` | Removes a named object from the database. |
38
+ | **`modify_object`** | `name: string`, `location?: float[]`, `scale?: float[]`, `rotation?: float[]` | Applies transformations to objects. |
39
+ | **`create_material`** | `name: string`, `color: float[]`, `metallic?: float`, `roughness?: float` | Creates and configures a Principled BSDF material. |
40
+ | **`apply_material`** | `object_name: string`, `material_name: string` | Binds a material to a target mesh. |
41
+ | **`execute_blender_code`** | `code: string` | Evaluates arbitrary Python scripts in Blender using the full `bpy` library. |
42
+ | **`search_polyhaven`** | `query: string`, `type: string` | Queries HDRIs, textures, or models from the Poly Haven API. |
43
+ | **`import_polyhaven_asset`** | `asset_id: string`, `type: string` | Downloads and imports Poly Haven items directly into the viewport. |
44
+ | **`generate_hyper3d_model`** | `prompt: string` | Triggers Hyper3D Rodin API to draft a model and load it. |
45
+
46
+ ---
47
+
48
+ ## 4. Code Recipes and Prompt Cookbook
49
+
50
+ ### Recipe 1: Standard Material Setup and Assignment
51
+ Create a metallic red material and assign it to a newly spawned cylinder:
52
+
53
+ ```json
54
+ // Step 1: Create the cylinder
55
+ // Tool: create_mesh(type="cylinder", location=[0, 0, 2], name="RedColumn")
56
+
57
+ // Step 2: Create red material
58
+ // Tool: create_material(name="MetallicRed", color=[0.8, 0.05, 0.05, 1.0], metallic=0.9, roughness=0.1)
59
+
60
+ // Step 3: Apply to object
61
+ // Tool: apply_material(object_name="RedColumn", material_name="MetallicRed")
62
+ ```
63
+
64
+ ### Recipe 2: Run Custom Python Script via execute_blender_code
65
+ Generate a procedural spiral of spheres using `bpy`:
66
+
67
+ ```python
68
+ # Call tool: execute_blender_code(code="...")
69
+ import bpy
70
+ import math
71
+
72
+ # Clear default objects
73
+ bpy.ops.object.select_all(action='SELECT')
74
+ bpy.ops.object.delete(use_global=False)
75
+
76
+ # Build spiral
77
+ count = 30
78
+ radius = 5.0
79
+ height_step = 0.2
80
+ angle_step = 0.3
81
+
82
+ for i in range(count):
83
+ angle = i * angle_step
84
+ x = math.cos(angle) * radius
85
+ y = math.sin(angle) * radius
86
+ z = i * height_step
87
+
88
+ # Add sphere
89
+ bpy.ops.mesh.primitive_uv_sphere_add(radius=0.5, location=(x, y, z))
90
+ sphere = bpy.context.active_object
91
+ sphere.name = f"SpiralSphere_{i}"
92
+ ```
93
+
94
+ ---
95
+
96
+ ## 5. Troubleshooting and Connection Details
97
+
98
+ ### Configuration and Ports
99
+ - **Default TCP Port:** `9876` (Bypasses stdio when communicating with the Blender Addon).
100
+ - **Environment Variables:**
101
+ - `BLENDER_HOST`: Local/remote address of the Blender application (default: `localhost`).
102
+ - `BLENDER_PORT`: Port number of the socket listener (default: `9876`).
103
+
104
+ ### Telemetry Control
105
+ To disable usage telemetry, set the environment variable:
106
+ ```bash
107
+ DISABLE_TELEMETRY=true
108
+ ```
109
+ Or toggle the Consent checkbox in the Addon settings inside Blender:
110
+ `Edit -> Preferences -> Add-ons -> Interface: Blender MCP`
111
+
112
+ ### Connection Verification
113
+ Ensure the Blender Addon is actively listening on port `9876`:
114
+ ```bash
115
+ # Check if Blender is holding the socket
116
+ lsof -i :9876
117
+ ```
118
+
119
+ ### Common Errors and Fixes
120
+ 1. **`Cannot connect to Blender Addon at localhost:9876`**
121
+ - *Cause:* The addon is installed but not running, or connection was closed.
122
+ - *Fix:* In Blender, press `N` to open the sidebar, click the **BlenderMCP** tab, and toggle **Connect to Claude** ON.
123
+ 2. **`Missing API Keys for Hyper3D or Sketchfab`**
124
+ - *Fix:* Add the API keys directly in the Add-on preferences page in Blender (`Edit -> Preferences -> Add-ons -> Blender MCP`) or inject them as environment variables (e.g. `BLENDERMCP_HYPER3D_API_KEY`) prior to starting the MCP client.
125
+ 3. **`execute_blender_code fails due to Context`**
126
+ - *Cause:* Blender operators (`bpy.ops`) often require a specific active context (e.g., Edit Mode vs Object Mode, or an active selection).
127
+ - *Fix:* Ensure your Python script sets the active object or overrides context if necessary before executing operators:
128
+ ```python
129
+ bpy.context.view_layer.objects.active = target_obj
130
+ ```
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: bdb-computer-use-mcp
3
+ description: Utilizes the computer-use-mcp server to control the OS desktop via mouse, keyboard, window focus, accessibility trees, and scripting.
4
+ ---
5
+
6
+ # Computer Use MCP — Integration and AI Agent Guide
7
+
8
+ This skill file instructs AI agents on how to control macOS, Windows, or Linux desktop environments using the high-performance `computer-use-mcp` server. It details tool hierarchy, accessibility automation, scripting, window focus strategies, and troubleshooting steps.
9
+
10
+ ## 1. Overview and Pipeline Value
11
+
12
+ The **Computer Use MCP Server** leverages a Rust NAPI module to interact directly with OS APIs (CoreGraphics/AppKit on Mac; Win32/COM on Windows; X11 on Linux). It serves as the ultimate fallback when structured application APIs do not exist. Agents use it to configure settings, install dependencies, click modal dialogs, copy coordinates, and interact with graphical interfaces.
13
+
14
+ ### Architecture
15
+ - **In-Process native execution:** Avoids shell hopping by using direct OS calls inside Node.js.
16
+ - **Ordered Automation:**
17
+ 1. *Scripting first:* Use AppleScript/JXA (macOS) or PowerShell (Windows).
18
+ 2. *Accessibility second:* Query and interact with elements using Accessibility APIs (AX UI Automation).
19
+ 3. *Coordinate Clicks last:* Use screenshots and pixel coordinates only as a fallback.
20
+
21
+ ---
22
+
23
+ ## 2. System Instructions
24
+
25
+ ### Workflow Priorities
26
+ 1. **Discovery first:** Always call `get_tool_guide` or `get_app_capabilities` to evaluate if the target app supports AppleScript/PowerShell or Accessibility trees.
27
+ 2. **Accessibility over Coordinates:** Use `click_element` or `set_value` instead of mapping pixel coordinates from a screenshot. It survives window resizes, retina scaling, and display moves.
28
+ 3. **Window Focus Strategies:**
29
+ - Use `strict` focus for keyboard inputs. This forces the server to verify the target window is frontmost and visible before typing, preventing key drops.
30
+ - Use `prepare_display` to automatically hide background apps that might steal focus or pop up notifications during execution.
31
+ 4. **Retroactive Inspection:** If a screenshot shows small text or dense detail, call `zoom` with a cropped coordinate box to view full-resolution assets.
32
+
33
+ ---
34
+
35
+ ## 3. Available Tools and API Parameters
36
+
37
+ Exposes 58 native tools. Key tools include:
38
+
39
+ ### Discovery and Scripting
40
+ - **`get_tool_guide(task_description: string)`**: Plans if JXA, AppleScript, AX UI Automation, or pixel click is recommended.
41
+ - **`run_script(language: string, script: string)`**: Executes JXA, AppleScript, or PowerShell.
42
+ - **`get_app_capabilities(bundle_id: string)`**: Queries scriptable, accessible, or active state.
43
+
44
+ ### Accessibility (AX UI Automation)
45
+ - **`get_ui_tree(target_app?: string, target_window_id?: int)`**: Returns a JSON structure of active UI roles and labels.
46
+ - **`click_element(role: string, label: string)`**: Performs a semantic click on a button or menu.
47
+ - **`set_value(role: string, label: string, value: string)`**: Sets values in text fields directly.
48
+ - **`fill_form(fields: array, target_app?: string)`**: Sets multiple text fields in a single call.
49
+ - **`list_menu_bar(bundle_id: string)`**: Lists menu items and keyboard shortcuts.
50
+
51
+ ### Mouse and Keyboard
52
+ - **`screenshot(width?: int, quality?: int, target_window_id?: int)`**: Captures the viewport.
53
+ - **`left_click(coordinate: int[], target_app?: string)`**: Simulates a left-click.
54
+ - **`type(text: string, press_enter?: boolean, target_app?: string)`**: Enters text.
55
+ - **`key(text: string, target_app?: string)`**: Triggers combinations (e.g. `command+s`).
56
+
57
+ ### Windows and Displays
58
+ - **`list_windows(bundle_id?: string)`**: Queries all visible windows.
59
+ - **`activate_window(window_id: int)`**: Places focus on a targeted window.
60
+ - **`list_spaces()`**: Interacts with macOS Spaces or Windows Virtual Desktops.
61
+
62
+ ---
63
+
64
+ ## 4. Code Recipes and Prompt Cookbook
65
+
66
+ ### Recipe 1: Retrieve and Interact with Photoshop AX Tree
67
+ Instead of taking a screenshot and clicking coordinates, find the "New Layer" button semantically:
68
+
69
+ ```json
70
+ // Step 1: Probe Photoshop Capabilities
71
+ // Tool: get_app_capabilities(bundle_id="com.adobe.Photoshop")
72
+
73
+ // Step 2: Get Window list to target the correct window ID
74
+ // Tool: list_windows(bundle_id="com.adobe.Photoshop")
75
+
76
+ // Step 3: Semantic Click on the New Layer Button
77
+ // Tool: click_element(role="AXButton", label="New Layer", target_app="com.adobe.Photoshop")
78
+ ```
79
+
80
+ ### Recipe 2: Run JXA (Javascript for Automation) Script on macOS
81
+ Create a new note in Apple Notes and write text programmatically:
82
+
83
+ ```javascript
84
+ // Tool: run_script(language="javascript", script="...")
85
+ // Script content:
86
+ var Notes = Application("Notes");
87
+ var newNote = Notes.Note({
88
+ body: "<h1>BDB OS Integration Checklist</h1><p>Automated desktop test complete.</p>"
89
+ });
90
+ Notes.folders.byName("Notes").notes.push(newNote);
91
+ Notes.activate();
92
+ ```
93
+
94
+ ---
95
+
96
+ ## 5. Troubleshooting and Connection Details
97
+
98
+ ### Configuration and Setup
99
+ - **MacOS Permissions Required:** You must grant **Accessibility** access to the parent application (e.g. Terminal, Cursor, or Claude Desktop) in `System Settings -> Privacy & Security -> Accessibility`.
100
+ - **Linux Packages Required:**
101
+ ```bash
102
+ sudo apt-get install -y xdotool wmctrl xclip scrot
103
+ ```
104
+
105
+ ### Common Errors and Fixes
106
+
107
+ 1. **`FocusFailure: Target window is not frontmost`**
108
+ - *Cause:* The `strict` focus strategy detected another application stole active focus.
109
+ - *Fix:* Switch your `focus_strategy` to `prepare_display` to auto-hide background applications, or call `activate_window` first.
110
+ 2. **`spawn uvx ENOENT / command not found`**
111
+ - *Cause:* The client (GUI) did not inherit terminal shell PATH settings.
112
+ - *Fix:* Configure your client to use the absolute path of `npx` or wrap it with `cmd /c` on Windows:
113
+ ```json
114
+ "command": "npx",
115
+ "args": ["--yes", "--prefer-offline", "@zavora-ai/computer-use-mcp"]
116
+ ```
117
+ 3. **`Accessibility tree AXError: API Disabled`**
118
+ - *Cause:* System Sandbox is blocking accessibility inspector calls.
119
+ - *Fix:* Relaunch the parent application (Cursor/Claude Code) and verify the Accessibility toggle is active in your OS System Preferences.
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: bdb-davinci-mcp
3
+ description: Utilizes the DaVinci Resolve MCP servers to control timeline editing, media analysis, color grading, and Fusion/Fairlight scripting.
4
+ ---
5
+
6
+ # DaVinci Resolve MCP — Integration and AI Agent Guide
7
+
8
+ This skill file instructs AI agents on how to interface with the DaVinci Resolve MCP Server integrations (including `davinci-resolve-mcp` and `davinci-mcp-professional`). It details page requirements, media analysis, edit loops, versioning pipelines, and troubleshooting steps.
9
+
10
+ ## 1. Overview and Pipeline Value
11
+
12
+ The **DaVinci Resolve MCP Server** exposes the complete scripting API of DaVinci Resolve Studio (18.5 to 21+) to AI models. In the BDB OS workflow, this server acts as an intelligent assistant that can automate timeline assembly, perform source-safe audio/video analysis, manage color grade metadata (CDLs/LUTs/stills), write timeline markers, and compile extension scripts.
13
+
14
+ ### Architecture
15
+ - **Local Scripting API:** Communicates with Resolve via the official external Python scripting interface.
16
+ - **Two Operational Modes:**
17
+ - *Compound Mode (Default):* Exposes 32 structured tools containing 136 guarded workflow kernels. Keeps the model's context footprint lean.
18
+ - *Granular Mode (`--full`):* Exposes 341 tools representing a one-to-one mapping of every Resolve scripting API method.
19
+ - **Local Control Panel:** Includes a browser dashboard (`venv/bin/python -m src.control_panel`) for visual inspection, timeline rollback, and manual analysis review.
20
+
21
+ ---
22
+
23
+ ## 2. System Instructions
24
+
25
+ ### Page Requirements
26
+ Resolve is page-centric. Many tool calls will fail if the application is on the wrong page. Always verify or transition the page before invoking page-specific tools:
27
+
28
+ | Workflow | Page Required | Transition Command |
29
+ | :--- | :--- | :--- |
30
+ | **Media Ingest / Bins** | Media | `resolve_control(action="open_page", params={"page": "media"})` |
31
+ | **Timeline Assembly / Edits** | Edit or Cut | `resolve_control(action="open_page", params={"page": "edit"})` |
32
+ | **Color Grading / LUTS / CDL** | Color | `resolve_control(action="open_page", params={"page": "color"})` |
33
+ | **Audio Configuration** | Fairlight | `resolve_control(action="open_page", params={"page": "fairlight"})` |
34
+ | **Effects / Compositing** | Fusion | `resolve_control(action="open_page", params={"page": "fusion"})` |
35
+ | **Render Setup / Queues** | Deliver | `resolve_control(action="open_page", params={"page": "deliver"})` |
36
+
37
+ ### Media Analysis and Visual Verification (host_chat_paths)
38
+ 1. **Source Media Safety:** Never transcode, modify, or create derivatives of original camera files. Write report files only to the `davinci-resolve-mcp-analysis` scratch directory.
39
+ 2. **Visual Analysis Flow:**
40
+ - `analyze_clip` or `analyze_bin` extracts keyframes to disk and returns a deferred payload with `frame_paths` and a verification token.
41
+ - The AI agent must read these image frames, generate a structured description, and finalize the analysis by calling `media_analysis(action="commit_vision", params={clip_id, visual, vision_token})`.
42
+ - **Do not skip `commit_vision`**; doing so leaves the clip in a `pending_host_vision_analysis` error state.
43
+
44
+ ### Evidence-Based Editing (`edit_engine`)
45
+ Every timeline edit operates on a **Plan → Confirm → Execute** loop:
46
+ - `plan_tighten` or `plan_selects` calculates trims (e.g., dead air removal from transcription evidence) and returns a `plan_id`.
47
+ - The user must review this plan (optionally via the browser UI).
48
+ - Run `execute_tighten(plan_id)` with a verification token to write the edits to a new timeline version.
49
+
50
+ ---
51
+
52
+ ## 3. Available Tools and API Parameters
53
+
54
+ Key tools on the compound server include:
55
+
56
+ | Tool | Action | Parameters | Description |
57
+ | :--- | :--- | :--- | :--- |
58
+ | **`resolve_control`** | `launch`, `get_page`, `open_page`, `api_truth`, `quit` | `page?: string` | Manages active page contexts and Resolve application states. |
59
+ | **`project_manager`** | `list`, `get_current`, `create`, `load`, `save`, `import_project`, `export_project`, `lint`, `apply_spec` | `name?: string`, `path?: string`, `spec?: object` | Handles project CRUD, backup archives, health linting, and declarative YAML specs. |
60
+ | **`media_pool`** | `get_clips`, `import_media`, `move_clips`, `setup_multicam_timeline`, `get_selected` | `paths?: string[]`, `target_path?: string` | Organizes media pool folders, imports files, and sets up multi-cam stacks. |
61
+ | **`media_pool_item`** | `get_metadata`, `set_metadata`, `get_clip_property`, `set_clip_color`, `get_audio_mapping` | `clip_id: string`, `key: string`, `value?: any` | Sets search tags, notes, track mapping, and clip colors in Resolve. |
62
+ | **`media_analysis`** | `plan`, `coverage_report`, `analyze_clip`, `detect_sync_events`, `publish_clip_metadata`, `commit_vision`, `build_embeddings`, `find_similar` | `clip_id?: string`, `kinds?: string[]`, `vision_token?: string` | Handles visual keyframing, audio transcriptions, sync detection, and semantic vector indexing. |
63
+ | **`edit_engine`** | `plan_selects`, `execute_selects`, `plan_tighten`, `execute_tighten`, `plan_swap`, `execute_swap` | `plan_id?: string`, `timeline_name?: string`, `alternate_index?: int` | Plans and executes video trimming, select reels, and alternate take swaps. |
64
+ | **`timeline_versioning`** | `begin_run`, `end_run`, `archive_current`, `list_versions`, `diff_versions`, `diff_timelines` | `timeline_name?: string`, `reason?: string` | Records edit logs, structures version diffs, and rolls back edits. |
65
+ | **`script_plugin`** | `run_inline`, `execute`, `safe_install_extension`, `safe_remove_extension` | `source: string`, `language: string` | Authoring utility that runs or installs custom Lua/Python script extensions. |
66
+
67
+ ---
68
+
69
+ ## 4. Code Recipes and Prompt Cookbook
70
+
71
+ ### Recipe 1: CDL Grade Backup and Export
72
+ Snapshot a clip's grade, inspect CDL, and export a look:
73
+
74
+ ```json
75
+ // Step 1: Switch to Color page
76
+ // Tool: resolve_control(action="open_page", params={"page": "color"})
77
+
78
+ // Step 2: Snapshot active item's grade
79
+ // Tool: timeline_item_color(action="grade_version_snapshot", params={"version_name": "BeforeAdjustment"})
80
+
81
+ // Step 3: Set CDL parameters for mild primary grade adjustment
82
+ // Tool: timeline_item_color(action="safe_set_cdl", params={"slope": [1.05, 1.0, 0.95], "offset": [0.01, 0.0, -0.01]})
83
+ ```
84
+
85
+ ### Recipe 2: Run Inline Scripting for Batch Meta Change
86
+ Use `run_inline` to quickly rename clips matching a specific prefix inside the Media Pool:
87
+
88
+ ```json
89
+ // Tool: script_plugin(action="run_inline", params={"language": "python", "source": "..."})
90
+ // Source value:
91
+ import sys
92
+ resolve = BmdResolveAPI()
93
+ projectManager = resolve.GetProjectManager()
94
+ project = projectManager.GetCurrentProject()
95
+ mediaPool = project.GetMediaPool()
96
+ rootFolder = mediaPool.GetRootFolder()
97
+
98
+ def rename_clips(folder):
99
+ for clip in folder.GetClipList():
100
+ name = clip.GetName()
101
+ if name.startswith("CAM_A_"):
102
+ clip.SetClipProperty("Clip Name", name.replace("CAM_A_", "AngleA_"))
103
+ for subfolder in folder.GetSubFolderList():
104
+ rename_clips(subfolder)
105
+
106
+ rename_clips(rootFolder)
107
+ print("Rename complete")
108
+ ```
109
+
110
+ ---
111
+
112
+ ## 5. Troubleshooting and Connection Details
113
+
114
+ ### Configuration and Ports
115
+ - **Application Port:** Controlled via system environment variables. Resolve communicates natively with the local Python runtime.
116
+ - **Control Panel Dashboard:** `http://localhost:5000` (by default) or path printed upon running:
117
+ ```bash
118
+ venv/bin/python -m src.control_panel
119
+ ```
120
+ - **Requirements:**
121
+ 1. **DaVinci Resolve Studio** (Scripting APIs are blocked in the free version).
122
+ 2. **External Scripting Mode:** Go to DaVinci Resolve -> Preferences -> System -> General, set "External scripting using" to **Local** or **Developer**.
123
+ 3. **Python Registry (Windows):** Python must be installed system-wide for Resolve to find it in the registry (pyenv or virtual environments will not work if the host installer isn't registered).
124
+
125
+ ### Diagnostic Connection Verification
126
+ Test if the local Python bridge can reach Resolve:
127
+ ```bash
128
+ # Verify the Python scripting modules are discoverable
129
+ python -c "import DaVinciResolveScript as dvr; print(dvr.scriptapp('Resolve'))"
130
+ ```
131
+
132
+ ### Common Errors
133
+ 1. **`Resolve is not running or scripting is disabled`**
134
+ - Ensure the Studio version is active.
135
+ - Verify that preferences are set to "External scripting using: Local".
136
+ 2. **`Visual Analysis stuck in pending_host_vision_analysis`**
137
+ - The agent has not called the `commit_vision` tool with the results of visual frame descriptions. Check the manifest files in your scratch analysis directory to recover the token.
138
+ 3. **`Fusion.Execute() returns False or no-op`**
139
+ - Resolve 20+ has limitations with remote execution of Lua scripts. Use the `run_inline` tool which leverages a temporary file fallback mechanism.