Portwood: Skill for Claude Code

.claude/skills/canvas-designer/SKILL.md

canvas-designer is a skill for Claude Code from Portwood-Global-Solutions/Portwood. It costs 52 tokens per session (1,280 once invoked), scanned A, original, Apache-2.0.

Development instructions for Portwood's Canvas designer, a Salesforce interface for arranging visual elements on an artboard and exporting them as HTML templates. They describe how the scene model, live display, importer, and serializer must work together.

In plain words
What is it for?
Use them when changing the artboard, box model, HTML import or export, text editing, or rendering behaviour in the docGenCanvas component.
Why use it?
They prevent edits that make the canvas display differ from the generated template. The instructions also explain why the saved model, rather than the browser DOM, is the source of truth.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is Portwood-Global-Solutions/Portwood's own configuration. It tells Claude Code how to work on Portwood itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Portwood configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/qa/canvas-serializer-check.mjs.

Reuse

Borrowing it

Nothing to install: this file belongs to Portwood-Global-Solutions/Portwood. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Portwood-Global-Solutions/Portwood/main/.claude/skills/canvas-designer/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Portwood-Global-Solutions/Portwood

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for canvas-designer

README.md
[![agentmods](https://agentmods.dev/badge/skills/portwood-global-solutions/portwood/canvas-designer/github.svg)](https://agentmods.dev/skills/portwood-global-solutions/portwood/canvas-designer)
Your own site
<a href="https://agentmods.dev/skills/portwood-global-solutions/portwood/canvas-designer"><img src="https://agentmods.dev/badge/skills/portwood-global-solutions/portwood/canvas-designer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for canvas-designer

Your own site · 80×15
<a href="https://agentmods.dev/skills/portwood-global-solutions/portwood/canvas-designer"><img src="https://agentmods.dev/badge/skills/portwood-global-solutions/portwood/canvas-designer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,280 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.01280
Opus 5 $0.00026 $0.00640
Sonnet 5 $0.00010 $0.00256
Haiku 4.5 $0.00005 $0.00128

Measured 12d ago against content hash 6ebbc9713802, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

canvas-designer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/canvas-designer/SKILL.md · 113 lines

How it starts

The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Working on the Canvas designer

force-app/main/default/lwc/docGenCanvas/ — a Canva-style artboard that produces HTML templates. ~9,900 lines of client code; canvasModel.js is the scene graph and the only place that knows how it becomes HTML.

Canvas templates render through the HTML path (DocGenService.isHtmlBacked), so output is always PDF. The Apex side is two lines — there is no DocGenCanvasService.

The architecture, and why it is that way

The model is the truth. The DOM is a disposable projection.

The older designer treated the rendered DOM as the document, reading it back with innerHTML and re-parsing. Under Lightning Web Security's per-namespace sandbox that repeatedly broke: ChildNode.replaceWith is missing on proxied nodes, and cloneNode(true) silently omits browser-inserted nodes. Canvas never parses anything back out of the live tree, so there is no tree to be distorted. contenteditable survives only inside a single text box, where the browser's restructuring can't escape.

Rules that follow from this — do not break them:

  • Never read the canvas back via cloneNode or replaceWith on the live tree.
  • Never reconstruct model state from rendered DOM.
  • Boxes are plain objects with inch coordinates. Pixels appear only at render time (inches × 96 × zoom), so changing zoom can never drift the document.

Key functions in canvasModel.js

Function What it does
serialize(doc, geo) Model → HTML. Pinned boxes first, then flow boxes in y order.
deserialize(html) HTML → model, for reopening a saved document
htmlToCanvas(html, measure) The importer — arbitrary HTML → boxes
buildQueryConfig(doc) Derives a V1 Query Config from the tags actually placed
collectUsedFields(doc) Merge-tag discovery, including conditions and totals
snapBox / buildAnchorGroups Alignment guides, and box linking with cycle detection
sanitizeInline / collapseMarks Rich-text handling and brace repair

Read the full file on GitHub · 113 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 113 lines · 52 tokens per session scan A 6ebbc9713802

Subscribe to this mod's changes

canvas-designer is a skill published in the GitHub repository Portwood-Global-Solutions/Portwood (122 stars, last pushed yesterday), licensed Apache-2.0. It adds 52 tokens to every session and 1,280 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

wave-mosaic-web-theme

A web design theme that recreates the black-yt visual style with an animated canvas background and themed interface elements.

black-yt/skills · 94 tokens

impeccable

Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states.…

qiuy-collab/AutoFlow.skill · 189 tokens

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ultragoal with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 52 tokens

frontend-visual-qa

Audits already-rendered web, landing-page, HTML deck/slide, browser tool/game, dashboard/admin, design-system, and desktop UIs using real-browser or native-app journeys, inspected screenshots, DOM geometry, responsive or projection viewports, and a bundled Playwright sweep. Use after UI implementation to find…

daymade/claude-code-skills · 145 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens