.agents/skills/gridstack-skilld/SKILL.md
ALWAYS use when writing code importing "gridstack". Consult for debugging, best practices, or modifying gridstack, gridstack.js.
npx skillsauth add em-jones/staccato-toolkit gridstack-skilldInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
[email protected]Tags: latest: 12.4.2
References: package.json • README • Docs • Issues • Releases
Use skilld search "query" -p gridstack instead of grepping .skilld/ directories. Run
skilld search --guide -p gridstack for full syntax, filters, and operators.
This section documents version-specific API changes — prioritize recent major/minor releases.
BREAKING: CSS variables migration (v12.0.0) — Removed dynamic stylesheet generation; all column
sizing now uses browser CSS variables. gridstack-extra.css no longer exists or is needed. Custom
column CSS classes no longer required source
BREAKING: ES5 support removed (v12.1.0) — Dropped ES5 support entirely; v12 no longer distributes ES5 versions. IE and older browsers no longer supported source
BREAKING: Legacy column options removed (v12.1.0) — Removed disableOneColumnMode,
oneColumnSize, and oneColumnModeDomSort options. Use columnOpts: { breakpoints: [...] }
instead source
NEW: .grid-stack-dragging CSS class (v12.3.0) — Added to grid container when any child is being
dragged; enables cursor:grabbing styling during drag operations
source
NEW: updateOptions(o: GridStackOptions) method (v11.5.0+) — Update partial grid options after
initialization without recreating the grid. Method does not mutate the input object
source
NEW: Subgrid event propagation (v12.1.0) — Nested grid events now propagate to the topmost parent
grid. Access el.gridstackNode.grid to identify which grid originated the event
source
NEW: prepareDragDrop(el, force?) method (v11.5.0) — Force re-creation of drag/drop event
bindings for an element. Useful after DOM modifications source
NEW: GridStack.updateCB callback (v12.2.1) — Called after widget is updated during load()
operations (distinct from creation). Use for post-update framework integration
source
NEW: Custom resize handle target (v12.4.1) — Added support for custom resize div element targeting, allowing control over which elements trigger resize behavior source
ENHANCED: save(columnCount?) parameter (v12.3.1) — Save grid layout for a specific column count.
Nested grids now use container's saved column count for consistency
source
BEHAVIORAL: updateOptions() input not mutated (v12.1.0) — Unlike some setters, updateOptions()
now only processes specified fields without modifying the input object
source
Also changed: resizeToContent() nested grid fix v12.1 · resizeToContentCheck() blocking
behavior v12.1 · Touch device event fix v12.4.2 · Custom resize div handling v12.4.1 · minRow
option constraints v12.2.2 · Widget re-initialization position fix v12.4.1
Use batchUpdate() when adding multiple widgets to prevent unnecessary layout recalculations and
get a single change event — wrap multiple addWidget() calls between batchUpdate(true) and
batchUpdate(false) source
Use updateOptions() to modify grid options after creation instead of recreating the grid —
supports partial option updates without side effects source
No need for gridstack-extra.css in v12+ — CSS variables eliminated the need for custom column
classes. Nested grids automatically use column sizing source
Define nested grids via API options and GridStack.addGrid() rather than initializing from DOM —
the library focuses on dynamic API-based nesting for better control and compatibility
source
Enable float(true) for grids with large widget counts (>200) — float:true provides
significantly better performance than float:false for dense layouts
source
Check isIgnoreChangeCB() when implementing dirty flags or tracking state changes — returns true
during column changes, sizeToContent, or loading operations
source
Call prepareDragDrop(el) after framework-rendered content is added to widgets — necessary for
Angular, React, and Vue when adding content dynamically after initial grid creation
source
Use .grid-stack-dragging CSS class selector to customize cursor during drag operations — the
grid automatically adds this class during drag, allowing for cursor: grabbing styling
source
Set layout: 'list' option for nested grids to control reflow behavior during parent resize —
prevents unwanted reordering of items in subgrids source
Use el.gridstackNode.grid to identify which grid (parent or nested) sent an event — nested grid
events now propagate to the topmost grid, allowing centralized event handling
source
Pass column parameter to save() when using responsive layouts — ensures serialized layout
preserves responsive behavior across different breakpoints and screen sizes
source
Avoid transform: scale() CSS on grid containers when dragging widgets between grids — causes
position tracking to fail when dragging items out and back in due to unscaled coordinate tracking
source
GridStack is a drag-and-drop responsive dashboard grid library with zero external dependencies.
Start with GridStack.init() to convert a .grid-stack container into a responsive layout engine.
Initialize & add widgets:
const grid = GridStack.init();
grid.addWidget({ w: 2, h: 2, content: "Widget" });
Load from JSON:
grid.load([
{ x: 0, y: 0, w: 2, h: 2 },
{ x: 2, y: 0, w: 3, h: 2 },
]);
Save/restore layout:
const saved = grid.save(); // Serialize current layout
grid.load(saved); // Restore later
grid.column(12) or grid.cellHeight(70)grid.makeSubGrid(el). Drag between
parent/child grids seamlesslycolumnOpts: {breakpoints: [{w: 768, c: 1}]}.on('added', 'removed', 'dragstop', 'resizestop'), etc.Works directly with Angular, React, Vue, Ember, Knockout. Use GridStack.renderCB to control
widget content creation in your framework.
innerHTML is no longer set by GridStack for security. Use GridStack.renderCB() or
createWidgetDivs()gridstack-extra.css removed—CSS vars handle all column counts nowReferences: GridStack.init(), Events, Demos
<!-- /skilld:custom -->tools
<!--VITE PLUS START--> # Using Vite+, the Unified Toolchain for the Web This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, but it invokes Vite through `vp dev` and `vp build`. ## Vite+ Workflow `vp` is a global binary that handles the full development lifecycle. Run `vp help` to pr
development
Guide for building performant data tables. Uses tanstack-table for table logic (sorting, filtering, pagination) and tanstack-virtual for rendering large datasets efficiently.
development
Expert guidance for building observable, expressive, and fault-tolerant TypeScript applications using the effect-ts/effect ecosystem. Covers Effect<A, E, R> type, error management, dependency injection via Layers, observability (logging, metrics, tracing), concurrency with Fibers, retry/scheduling, Schema validation, Streams, and Sinks.
tools
Complete E2E (end-to-end) and integration testing skill for TypeScript/NestJS projects using Jest, real infrastructure via Docker, and GWT pattern. ALWAYS use this skill when user needs to: **SETUP** - Initialize or configure E2E testing infrastructure: - Set up E2E testing for a new project - Configure docker-compose for testing (Kafka, PostgreSQL, MongoDB, Redis) - Create jest-e2e.config.ts or E2E Jest configuration - Set up test helpers for database, Kafka, or Redis - Configure .env.e2e environment variables - Create test/e2e directory structure **WRITE** - Create or add E2E/integration tests: - Write, create, add, or generate e2e tests or integration tests - Test API endpoints, workflows, or complete features end-to-end - Test with real databases, message brokers, or external services - Test Kafka consumers/producers, event-driven workflows - Working on any file ending in .e2e-spec.ts or in test/e2e/ directory - Use GWT (Given-When-Then) pattern for tests **REVIEW** - Audit or evaluate E2E tests: - Review existing E2E tests for quality - Check test isolation and cleanup patterns - Audit GWT pattern compliance - Evaluate assertion quality and specificity - Check for anti-patterns (multiple WHEN actions, conditional assertions) **RUN** - Execute or analyze E2E test results: - Run E2E tests - Start/stop Docker infrastructure for testing - Analyze E2E test results - Verify Docker services are healthy - Interpret test output and failures **DEBUG** - Fix failing or flaky E2E tests: - Fix failing E2E tests - Debug flaky tests or test isolation issues - Troubleshoot connection errors (database, Kafka, Redis) - Fix timeout issues or async operation failures - Diagnose race conditions or state leakage - Debug Kafka message consumption issues **OPTIMIZE** - Improve E2E test performance: - Speed up slow E2E tests - Optimize Docker infrastructure startup - Replace fixed waits with smart polling - Reduce beforeEach cleanup time - Improve test parallelization where safe Keywords: e2e, end-to-end, integration test, e2e-spec.ts, test/e2e, Jest, supertest, NestJS, Kafka, Redpanda, PostgreSQL, MongoDB, Redis, docker-compose, GWT pattern, Given-When-Then, real infrastructure, test isolation, flaky test, MSW, nock, waitForMessages, fix e2e, debug e2e, run e2e, review e2e, optimize e2e, setup e2e