p4-plan-comment-html-format

A guide to writing comments and multiline fields as sanitized HTML, the markup used to add structure such as links, lists, and code blocks to text. It covers P4 Plan's desktop and web clients.

In plain words
What is it for?
Use it when posting or editing comments, setting multiline custom fields, or writing bug descriptions and reproduction steps.
Why use it?
It helps ensure formatting survives the server's HTML cleaning and displays correctly in both clients.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/perforce/p4plan-mcp/comment-html-format
Any agent
npx skills add perforce/p4plan-mcp --skill comment-html-format
Clone the repo
git clone --depth 1 https://github.com/perforce/p4plan-mcp

Made for: Claude Code, Codex.

Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,032 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00058 $0.02032
Opus 5 $0.00029 $0.01016
Sonnet 5 $0.00012 $0.00406
Haiku 4.5 $0.00006 $0.00203

Measured 2d ago against content hash b488bb2d72be, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

p4-plan-comment-html-format scanned grade A with 1 finding 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 2d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

<pre><code>curl -X POST /api/login \
skills/comment-html-format/SKILL.md · 140 lines

How it starts

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

Comment & Multiline HTML Format

P4 Plan treats comment text and multiline field values as sanitized HTML. The server runs every payload through a whitelist sanitizer — anything outside the allow-list below is silently stripped. Both the Qt desktop client and the React web client render the stored result.

Plain text without any tags is a legal special case: it is valid HTML, so the sanitizer accepts it and the server stores it as-is. Anything with formatting, lists, links, code blocks, or @mentions must use the documented HTML subset below.

This skill covers the format. For @user references inside this HTML, see the mentions skill.

When to use

Read this skill before calling any of:

  • post_commenttext is sanitized HTML
  • update_commenttext is sanitized HTML
  • set_custom_fieldvalue is sanitized HTML when the column type is Multiline Text
  • create_item / update_itemdetailedDescription and stepsToReproduce are sanitized HTML (Bug only)

Wire format

The wire format is always sanitized HTML. Two practical shapes:

  • Plain prose with line breaks (no tags needed): send raw text such as Hello\nworld. Plain text is valid HTML; the sanitizer accepts it unchanged, and the server stores it as-is.
  • Anything formatted (bold, lists, links, mentions, code blocks, tables): wrap in <html><body>...</body></html> and use the allowed tags below. The server sanitizes and minimizes — if the wrapped content reduces to plain text after sanitization (for example only <p> and <br> with no formatting), the envelope is stripped on storage.

Allowed tags

Tag Use for Notes
<p> Paragraph Default block. Don't put CSS on it (margin/color all stripped).
<br> Line break inside a paragraph
<strong>, <b> Bold Use semantic <strong>.
<em>, <i> Italic Use semantic <em>.
<u> Underline
<s>, <del> Strikethrough
<span> Inline color/highlight only Only place where inline color / background-color survive.
<a href="..."> Hyperlink Use for @mentions (see mentions skill). External links allowed.
<blockquote> Quoted text Browser-default styling on web; indented in Qt.
<pre>, <code> Code block / inline code <pre><code>...</code></pre> for multi-line. Qt converts to its configured code font.
<ul>, <ol>, <li> Lists Add inline style="margin-top:0px;margin-bottom:0px" on <ul>/<ol> for clean Qt rendering. <ol type="...">/start honored.
<table>, <thead>, <tbody>, <tfoot>, <tr>, <td>, <th>, <caption>, <colgroup>, <col> Tables Use border attribute on <table> and style="border-collapse:collapse" for cross-client borders.
<img src="hansoft://..."> Embedded image Only hansoft:// URLs render in Qt. External URLs render in the web client only. Avoid for cross-client comments.

Read the full file on GitHub · 140 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. 2d ago First seen · 140 lines · 58 tokens per session scan A b488bb2d72be

Subscribe to this mod's changes

p4-plan-comment-html-format is a skill published in the GitHub repository perforce/p4plan-mcp (4 stars, last pushed 3mo ago), licensed MIT. It adds 58 tokens to every session and 2,032 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

p4-code-review

P4 code review workflows — discover, create, vote, comment, transition, and manage reviews via P4 MCP tools. Use when: creating reviews, voting, commenting, transitioning review states, managing participants, or tracking review activity in P4.

perforce/p4mcp-server · 55 tokens

p4-file-operations

P4 file operations — query content, history, annotations, diffs, and modify files (add, edit, delete, move, sync, resolve) via P4 MCP tools. Use when: reading file content, viewing history, comparing revisions, adding or editing files, syncing, resolving conflicts, or reconciling workspace changes in P4.

perforce/p4mcp-server · 76 tokens

p4-stream-workflows

P4 stream workflows — creation, branching, merging, copying, integration, switching, and spec management via P4 MCP tools. Use when: creating streams, branching, merging, copying between streams, integrating changes, switching workspaces, or managing stream specs in P4.

perforce/p4mcp-server · 61 tokens

p4-changelist-management

P4 changelist workflows — create, list, submit, shelve, unshelve, and manage changelists and shelved files via P4 MCP tools. Use when: creating changelists, editing files, shelving, unshelving, submitting, organizing changes, or managing pending work in P4.

perforce/p4mcp-server · 71 tokens

p4-workspace-setup

P4 workspace setup and management — create, configure, sync, and switch workspaces via P4 MCP tools. Use when: creating workspaces, configuring client specs, syncing files, switching workspaces, or checking workspace status in P4.

perforce/p4mcp-server · 56 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens