home / skills / bdambrosio / cognitive_workbench / mc-map-visualize

This skill generates a zoomable HTML visualization of a spatial map, highlighting walkability, hazards, resources, and observation confidence for debugging and

npx playbooks add skill bdambrosio/cognitive_workbench --skill mc-map-visualize

Review the files below or copy the command above to add this skill to your agents.

Files (2)
Skill.md
2.1 KB
---
name: mc-map-visualize
type: python
description: "Generates zoomable HTML visualization of the spatial map showing walkability, hazards, resources, and observation confidence."
situational: false
---

# Minecraft Map Visualize Tool

Generates an interactive HTML visualization of the cell-based SpatialMap. Displays mapped cells with color-coded walkability, hazards, resources, and observation confidence.

## Purpose

Visualize spatial map for debugging, analysis, and planning review. Interactive HTML allows panning, zooming, and layer toggling. Shows cell details on hover.

## Input

- `target` or `map_name`: Map name (default: agent-specific)
- `output_file`: Optional output file path (default: auto-generated in /tmp)

## Output

Returns uniform_return format with:
- `value`: Summary text with file path
- `data`: `{success, map_name, file_path, cell_count, stats}`

Also opens generated HTML file in default browser.

## Visualization Features

Interactive canvas:
- Pan: Click and drag
- Zoom: Mouse wheel
- Hover: Shows cell details

Layer toggles:
- Walkable: Show walkability coloring
- Hazards: Highlight hazard cells (red)
- Resources: Highlight resource cells (gold)
- Confidence: Color by observation confidence

Color scheme:
- Green/surface colors: Walkable cells
- Gray: Blocked cells
- Red: Hazard cells
- Gold: Resource cells
- Blue: Water
- Orange: Lava

Cell borders:
- Green border: Step-up movement
- Yellow border: Drop risk
- Dashed border: Inferred (not directly observed)

Sidebar:
- Map statistics
- Bounds information
- Movement class distribution
- Surface type distribution

## Behavior & Performance

- Generates self-contained HTML file
- Auto-opens in default browser
- Exports JSON data for external analysis
- Works with maps of any size (canvas scales)

## Guidelines

- Use after mc-map-update to visualize mapped area
- Toggle layers to focus on specific aspects
- Hover over cells for detailed properties
- Export JSON for programmatic analysis

## Usage Examples

Visualize current map:
```json
{"type":"mc-map-visualize"}
```

With specific output file:
```json
{"type":"mc-map-visualize","output_file":"/tmp/my_map.html"}
```

Overview

This skill generates a zoomable, interactive HTML visualization of a SpatialMap showing walkability, hazards, resources, and observation confidence. It produces a self-contained file that opens in your browser and includes layer toggles, hover details, and exported JSON for further analysis.

How this skill works

The tool reads a cell-based SpatialMap (by target or map_name) and renders each cell to an HTML canvas with color-coding for walkability, hazards, resources, water, lava, and confidence. The output includes interactive controls for panning, zooming, and toggling layers, plus a sidebar with map statistics and bounds. It writes a standalone HTML file (and JSON export) and optionally opens it in the default browser.

When to use it

  • After mapping updates to inspect coverage and gaps
  • When debugging navigation, hazards, or resource placement
  • To review observation confidence and inferred cells
  • Before planning to verify walkable routes and drop risks
  • When generating a shareable visualization for analysis or reports

Best practices

  • Run after mc-map-update to visualize the latest data
  • Toggle individual layers to focus on specific map aspects
  • Hover on cells to read detailed properties before acting
  • Export the JSON output for automated analysis or backups
  • Use descriptive output_file names and an accessible output folder

Example use cases

  • Quickly visualize a freshly mapped area to confirm walkable corridors
  • Locate and highlight hazard clusters (lava, dangerous drops) for route planning
  • Inspect resource nodes and their surrounding confidence to decide mining targets
  • Share an interactive HTML map with teammates for collaborative planning
  • Export cell data as JSON and feed it into a path-planning or analytics pipeline

FAQ

What inputs does the visualizer accept?

Provide a target or map_name (defaults to the agent-specific map) and optionally an output_file path. If not provided, the file is auto-generated in /tmp.

Does the HTML file require external assets or a server?

No. The visualizer produces a self-contained HTML file that opens locally without a server and includes an exported JSON for external use.