Skip to content

feat: add @deck.gl-community/visgl-skills — AI agent skills for deck.gl#534

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/create-visgl-skills-module
Draft

feat: add @deck.gl-community/visgl-skills — AI agent skills for deck.gl#534
Copilot wants to merge 2 commits intomasterfrom
copilot/create-visgl-skills-module

Conversation

Copy link
Contributor

Copilot AI commented Feb 26, 2026

New module providing typed helpers that let AI coding agents (Claude Code, Openclaw, Copilot, etc.) construct deck.gl visualisations with minimal boilerplate — either via programmatic factory functions or fully JSON-serializable noodle descriptors.

Module structure

  • src/layer-skills.ts — Factory functions returning plain LayerDescriptor objects for the six most common layer types (ScatterplotLayer, PathLayer, PolygonLayer, TextLayer, IconLayer, HeatmapLayer), all with typed options and sensible defaults
  • src/noodles.ts — JSON-serializable layer recipe system; field accessors encoded as dot-path strings ("meta.size") that hydrateNoodle resolves to runtime functions; validateNoodle provides pre-flight error reporting
  • src/deck-builder.ts — Fluent DeckBuilder that composes layers + view state into a single DeckConfig
  • src/viewport-skills.tscreateViewState, getBoundingBox, fitViewport (Web Mercator zoom fit)
  • src/data-skills.tscreateColorAccessor (linear interpolation), createRadiusAccessor, flattenGeoJSON, extractPositions

Key design: noodles

The noodle system is the core AI-agent primitive. An agent emits pure data; the runtime hydrates it:

import {createNoodle, hydrateNoodle, validateNoodle} from '@deck.gl-community/visgl-skills';
import {ScatterplotLayer} from '@deck.gl/layers';

// Agent produces this as plain JSON — no callbacks, no runtime execution
const noodle = createNoodle('ScatterplotLayer', {
  data: cities,
  position: 'coordinates', // resolved to d => d.coordinates at hydration time
  radius: 'population',    // resolved to d => d.population
  fillColor: [255, 0, 128],
  radiusScale: 0.001,
});

const {valid, errors} = validateNoodle(noodle);
const layer = new ScatterplotLayer(hydrateNoodle(noodle));

No new runtime dependencies — peers only on @deck.gl/core and @deck.gl/layers.

Original prompt

Make a new module called visgl-skills that are all Claude Code / Openclaw / Agent skills for deck.gl that simplify the agents interaction and construction of deckgl , consider using noodles


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…oodles, and DeckBuilder

Co-authored-by: charlieforward9 <62311337+charlieforward9@users.noreply.github.com>
Copilot AI changed the title [WIP] Add visgl-skills module for agent interaction with deck.gl feat: add @deck.gl-community/visgl-skills — AI agent skills for deck.gl Feb 26, 2026
@ibgreen
Copy link
Collaborator

ibgreen commented Mar 1, 2026

Happy to engage on this
We have a deck.gl/JSON module that implements much of this. See the playground example in deck.gl website
I also feel that we should get this to a point where it can be used naturally by LLMs to generate deck visualizations.
As one example, I have been playing with adding zod schemas for our layers to further improve the experience.

@charlieforward9
Copy link
Collaborator

charlieforward9 commented Mar 1, 2026

Ive been getting very deep into the noodles.gl AI assistant - which also uses a JSON format for linking config to layer schemas. Also been inspired by @ryanbaumann 2025 summit session.

It feels like there should be a discussion between what @chrisgervang and @akre54 are doing with the node operators in noodles and the idea you have to add zod schemas directly to deck.

I got started with googlemaps/platform-ai#63 to explore the AI map language

@akre54
Copy link

akre54 commented Mar 1, 2026

Thanks for the ping @charlieforward9!

To give a bit of context, one of the original goals of Noodles.gl's json format was to encode program structure and type information to drive UI (like generating a color picker for color types) and to enable complex data pipelines (filtering, aggregating, joining) that the standard Deck json schema doesn't natively support.

Those goals are still interesting, but they're somewhat orthogonal to what this PR is trying to do.

On the broader question of LLM ergonomics: I'm not sure the skills/intermediate-representation approach is the right direction these days. The consensus seems to be that agentic coding tools like Claude Code work best when they can read clean documentation and write native code directly. A json layer in-between tends to add complexity that the model then has to reason around. What actually moves the needle for LLMs using a library is closer to llms.txt / clean markdown docs, good TypeScript types, and dense worked examples.

Building an intermediate json spec makes a lot of sense for UI-driven low-code tools. But for LLM code generation, letting agents write pure ts backed by good type definitions and agent-facing docs is probably the better path forward.

Ib can you share more about the Zod direction? That seems compelling

charlieforward9 added a commit that referenced this pull request Mar 8, 2026
Adds a new module that handles both approaches discussed in #534:

- Pattern A (native TypeScript): typed factory functions for all common
  layer types with sensible defaults, backed by llms.txt reference docs
  for LLM code generation (addresses akre54's docs-first feedback)
- Pattern B (JSON descriptors): fully serializable layer configs with
  dot-path accessors, validateDescriptor, and hydrateDescriptor for
  low-code UIs and server-side LLM output (the noodle approach)

Also includes DeckBuilder fluent compositor, viewport helpers
(fitViewport, getBoundingBox), and a comprehensive llms.txt that
serves as the single agent-facing reference for both patterns.

14/14 tests passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
charlieforward9 added a commit that referenced this pull request Mar 8, 2026
Adds a new module that handles both approaches discussed in #534:

- Pattern A (native TypeScript): typed factory functions for all common
  layer types with sensible defaults, backed by llms.txt reference docs
  for LLM code generation (addresses akre54's docs-first feedback)
- Pattern B (JSON descriptors): fully serializable layer configs with
  dot-path accessors, validateDescriptor, and hydrateDescriptor for
  low-code UIs and server-side LLM output (the noodle approach)

Also includes DeckBuilder fluent compositor, viewport helpers
(fitViewport, getBoundingBox), and a comprehensive llms.txt that
serves as the single agent-facing reference for both patterns.

14/14 tests passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants