voxel51/fiftyone-skills/fiftyone-develop-plugin

Claude Code and agent skill by voxel51/fiftyone-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Develops custom FiftyOne plugins (operators and panels) from scratch. Use when creating plugins, extending FiftyOne with custom operators, building interactive panels, or integrating external APIs.

Install

npx vskill@latest install voxel51/fiftyone-skills/fiftyone-develop-plugin

SKILL.md

Develop FiftyOne Plugins

TL;DR — Read This First

Step 1: Decide what you're building.

GoalTypeRead next
Run a computation, process samples, trigger actionsOperatorPYTHON-OPERATOR.md
Persistent panel in the grid, simple/form UIPython PanelPYTHON-PANEL.md
Persistent panel in the grid, rich/interactive UIHybrid PanelHYBRID-PLUGINS.md + JAVASCRIPT-PANEL.md
Panel that opens inside the sample modalJS Modal PanelJAVASCRIPT-PANEL.md

Step 2: Read that file NOW — before generating any code. Each file contains patterns that are not in SKILL.md. Missing them causes the most common failures (wrong default= usage, handler binding errors, panel not appearing in App).

If something isn't rendering or you hit an error: Read TROUBLESHOOTING.md for the one-shot diagnostic command, reload vs restart table, and the top 5 error patterns with exact fixes.

For input types, Panel UI components reference, and a minimal working example: Read QUICK-REFERENCE.md.

Step 3: Clone the official plugins repo for reference patterns:

bash
git clone https://github.com/voxel51/fiftyone-plugins.git /tmp/fiftyone-plugins 2>/dev/null || true

Step 4: Install your plugin by placing it (or symlinking it) in the plugins directory:

bash
PLUGINS_DIR=$(python -c "import fiftyone as fo; print(fo.config.plugins_dir)")
# Convention: use underscores in the directory name (e.g. myorg_my_plugin) for shell compatibility
# The @org/name URI lives only inside fiftyone.yml — the directory name doesn't need to match
ln -s /path/to/my_plugin "$PLUGINS_DIR/my_plugin"

Step 5: Launch in debug mode so you see all server logs:

bash
fiftyone app debug <dataset-name>

Key Directives

ALWAYS follow these rules:

1. Understand before coding

Ask clarifying questions. Never assume what the plugin should do.

2. Plan before implementing

Present file structure and design. Get user approval before generating code.

3. Search existing plugins for patterns
bash
# Clone official plugins for reference
git clone https://github.com/voxel51/fiftyone-plugins.git /tmp/fiftyone-plugins 2>/dev/null || true
# Search for similar patterns
grep -r "keyword" /tmp/fiftyone-plugins/plugins/ --include="*.py" -l
python
list_plugins(enabled=True)
list_operators(builtin_only=False)
get_operator_schema(operator_uri="@voxel51/brain/compute_similarity")
4. Test locally before done
bash
# Get plugins directory
PLUGINS_DIR=$(python -c "import fiftyone as fo; print(fo.config.plugins_dir)")
# Develop plugin in plugins directory
cd $PLUGINS_DIR/my-plugin

Write tests:

  • Python: pytest for operators/panels
  • JavaScript: vitest for React components

Verify in FiftyOne App before done.

5. Test complex logic outside the plugin first

If the plugin wraps non-trivial processing (model inference, image transforms, external APIs), verify that logic works as standalone Python before integrating it into the plugin:

python
# Test independently first
result = my_processing_fn(sample_path)
print(result) # confirm correctness
# Only then wrap in execute()
def execute(self, ctx):
result = my_processing_fn(ctx.dataset.first().filepath)
...

This prevents debugging two systems (plugin framework + custom logic) at once.

6. Iterate on feedback

Run server separately to see logs:

bash
# Terminal 1: Python logs
python -m fiftyone.server.main
# Terminal 2: Browser at localhost:5151 (JS logs in DevTools console)
bash
fiftyone app debug # logs printed to shell; use with a dataset:
fiftyone app debug <dataset-name>

For automated iteration, use Playwright e2e tests:

bash
npx playwright test

Refine until the plugin works as expected.

Critical Patterns

Gotcha 1 — default= must never reference state (causes infinite render loops)
python
# WRONG — triggers a render loop: schema changes → re-render → schema changes → ...
def render(self, ctx):
panel = types.Object()
panel.str("threshold", default=ctx.panel.get_state("threshold")) # ← NEVER do this
# CORRECT — pass a literal; read state separately for display logic
def render(self, ctx):
panel = types.Object()
panel.str("threshold", default="0.5") # literal only
current = ctx.panel.get_state("threshold", "0.5") # read separately if needed

The default= value is part of the schema the frontend uses to decide whether to re-render. If it changes between renders (because state changed), the frontend re-dispatches, which re-renders, infinitely.

Gotcha 2 — Event handlers must be bound instance methods, not static methods
python
# WRONG — @staticmethod strips __self__, breaking the handler URI silently
@staticmethod
def on_click(ctx):
...
panel.btn("btn", label="Go", on_click=MyPanel.on_click) # ← broken
# CORRECT — regular instance method
def on_click(self, ctx):
...
panel.btn("btn", label="Go", on_click=self.on_click) # ← works

The framework reads handler.__self__.uri to build the operator-trigger URI. A @staticmethod has no __self__, so the wiring silently fails and button clicks do nothing.

Gotcha 3 — Missing register(p) is a silent failure
python
# WRONG — plugin loads, no error, but ZERO operators appear in the App
import fiftyone.operators as foo
class MyPanel(foo.Panel):
...
# forgot register() entirely — or it raises an exception silently
python
# CORRECT — must explicitly register every operator and panel
def register(p):
p.register(MyPanel)
p.register(MyOperator) # each class must be listed

The plugin loader calls module.register(self) after importing __init__.py. If the function is missing, raises an exception, or simply doesn't call p.register(YourClass) for a class, that class is never inserted into the operator registry. The App shows the plugin as enabled in list_plugins() — no error, no warning — but the operator or panel is completely invisible. This is the most common cause of "my panel doesn't appear in the + New panel menu."

Convention on directory naming: Use myorg_my_plugin (underscores, no @ or -) for clarity and shell compatibility. This is convention, not a hard requirement — the loader derives the module name from fiftyone.yml's name: field and sanitizes it automatically. The @org/name URI belongs in fiftyone.yml; the directory just needs to contain that file.

Operator Execution
python
# Chain operators (non-delegated operators only, in execute() only, fire-and-forget)
ctx.trigger("@plugin/other_operator", params={...})
# UI operations
ctx.ops.notify("Done!")
ctx.ops.set_progress(progress=0.5) # keyword required — first positional arg is label, not progress
View Selection
python
# Use ctx.target_view() to respect user's current selection and filters
view = ctx.target_view()
# ctx.dataset - Full dataset (use when explicitly exporting all)
# ctx.view - Filtered view (use for read-only operations)
# ctx.target_view() - Filtered + selected samples (use for exports/processing)
Store Keys (Avoid Collisions)
python
# ctx.store() already scopes by dataset_id internally — no need to embed dataset name.
# Use a plugin-unique name to avoid collisions with other plugins on the same dataset.
def _get_store_key(self):
return self.config.name.split("/")[-1] # e.g. "my_panel"
store = ctx.store(self._get_store_key())
Panel State vs Execution Store
python
# ctx.panel.state - Transient (resets when panel reloads)
# ctx.store() - Persistent (survives across sessions)
def on_load(self, ctx):
ctx.panel.state.selected_tab = "overview" # Transient
store = ctx.store(self._get_store_key())
ctx.panel.state.config = store.get("user_config") or {} # Persistent
Delegated Execution

Use for operations that: process >100 samples or take >1 second.

python
@property
def config(self):
return foo.OperatorConfig(
name="heavy_operator",
allow_delegated_execution=True,
default_choice_to_delegated=True,
)
Progress Reporting
python
@property
def config(self):
return foo.OperatorConfig(
name="progress_operator",
execute_as_generator=True,
)
def execute(self, ctx):
total = len(ctx.target_view())
for i, sample in enumerate(ctx.target_view()):
# Process sample...
yield ctx.trigger("set_progress", {"progress": (i+1)/total})
yield {"status": "complete"}
Custom Runs (Auditability)

Use Custom Runs for operations needing reproducibility and history tracking:

python
# Create run key (must be valid Python identifier - use underscores, not slashes)
run_key = f"my_plugin_{self.config.name}_v1_{timestamp}"
# Initialize and register
run_config = ctx.dataset.init_run(operator=self.config.name, params=ctx.params)
ctx.dataset.register_run(run_key, run_config)

See PYTHON-OPERATOR.md for full Custom Runs pattern. See EXECUTION-STORE.md for advanced caching patterns. See HYBRID-PLUGINS.md for Python + JavaScript communication.

Workflow

Phase 1: Requirements

Understand what the user needs to accomplish:

  1. "What problem are you trying to solve?"
  2. "What should the user be able to do?" (user's perspective)
  3. "What information does the user provide?"
  4. "What result does the user expect to see?"
  5. "Any external data sources or services involved?"
  6. "How will this fit into the user's workflow?"
Phase 2: Design
  1. Search existing plugins for similar patterns
  2. Choose the right panel architecture:
  • Modal panel (appears in sample modal) → Use JS Panel + Python Operators. See JAVASCRIPT-PANEL.md — Modal Panels. Do NOT use composite_view=True — it produces "Unsupported View" errors for modal panels.
  • Grid panel with rich UI → Use hybrid (Python + JavaScript). See HYBRID-PLUGINS.md.
  • Grid panel with simple UI → Use Python-only. See PYTHON-PANEL.md.
  1. Create plan with:
  • Plugin name (@org/plugin-name)
  • File structure
  • Operator/panel specs
  • Input/output definitions
  1. Get user approval before coding

See PLUGIN-STRUCTURE.md for file formats.

Phase 3: Generate Code

Before writing any code, read the reference file for your plugin type:

Building…Read this file first
Operator[PYTHON-OPERATOR.md](PYTHON-OPERATOR.md) — input types, execution patterns, placement
Python panel[PYTHON-PANEL.md](PYTHON-PANEL.md) — layout containers, state/data/store, event lifecycle
JS/hybrid panel[JAVASCRIPT-PANEL.md](JAVASCRIPT-PANEL.md) + [HYBRID-PLUGINS.md](HYBRID-PLUGINS.md) — React components, Python↔JS bridge
Persistent storage[EXECUTION-STORE.md](EXECUTION-STORE.md) — TTL caching, cross-session state
Something not rendering / errors[TROUBLESHOOTING.md](TROUBLESHOOTING.md) — one-shot diagnostic, top 5 errors, reload vs restart
Input types, Panel UI components, minimal example[QUICK-REFERENCE.md](QUICK-REFERENCE.md) — lookup tables and copy-paste starting point

Create these files:

FileRequiredPurpose
fiftyone.ymlYesPlugin manifest
__init__.pyYesPython operators/panels
requirements.txtIf depsPython dependencies
package.jsonJS onlyNode.js metadata
src/index.tsxJS onlyReact components

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
25
Repository forks
4
7-day trend score
16

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 31 Mar 2026, 8 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/voxel51/fiftyone-skills/fiftyone-develop-plugin/badge)](https://verified-skill.com/skills/voxel51/fiftyone-skills/fiftyone-develop-plugin)

Something wrong with this skill or its page? Tell us.