Skip to content

Skill: publish a map view of a space as a Claude artifact #199

Closed

Description

@mindsocket

Goal

A skill in the Claude plugin (plugin/skills/) that publishes a map view of a space as a private Claude artifact, refreshes its data, and reads comments left on the artifact. The renderer, template page and export command live in structured-context-map-views; this skill is the agent-facing steps. Plan and evidence: mindsocket/structured-context-map-views#17.

Steps the skill carries

  1. Run structured-context-map-views export <space> (map-views#18) for the graph, validation results, schema id and applicable map view definitions as one JSON document.
  2. Fetch the template artifact.html for a pinned map-views version (from the npm package via jsDelivr) and publish it unchanged with the Artifact tool, declaring only the db capability (map-views#19).
  3. Write the export into the artifact db with write_db (one spaces/<space> document, JSON as strings). Refreshing a space is the same write with the document's current if_version; the page does not change.
  4. Reading comments: a thread's [location] reads like button "<view>/<nodeId>: <type> <title>…" (map-views#20 makes the host's labelling exact). Look the node up in the spaces/<space> document to get its fields, parent and validation messages. The location is the card even when the comment is on a child element of the card; parameter values (orientation, overlay level) are not in it, so ask if they matter.
  5. A one-line note that the space's content is stored in the artifact and its database. No confirmation gate.

Decisions already taken

Findings the skill should encode

  • Comments reach the agent only as [location] (accessible name of the element) and the [anchored at] DOM path. Page-invented anchor names (customAnchors) and onSendToClaude did not work for the viewer tested, so the skill must not suggest them.
  • Per-document size limit of the artifact db is unknown; for a large space the skill should chunk (write_db batches of 50) and say so.
  • Needs the Artifact tool; not usable from a plain CLI session.

Definition of done (this repo)

  • New skill under plugin/skills/; update the command list in plugin/skills/structured-context/SKILL.md if it should be discoverable from there; troubleshooting entries for the failures seen (blank page from a duplicate React, db unavailable, doc missing).
  • docs/: one short mention where map views are described, if any; keep detail in the skill.
  • Plugin version bumps via the pre-commit hook; do not edit it.

Blocked by

map-views#18 (export), #19 (template and host), and ideally #20 (data-node-id). Write the skill as if these are released, test against local checkouts until they are.

Activity

  1. added a commit that references this issue on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions