/markout:markout-built-in-shapesfrom markout
Provides rich visual shapes (bar charts, stacked bars, alert boxes, tree hierarchies, glossaries, code blocks) for reports. Attach typed model properties instead of hand-drawing ASCII or Markdown.
Ships in markout. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Attach these types as properties; the formatter draws the right visual. The anti-pattern is
building bars/trees by hand (new string('█', n), indented dashes). Say what the data is — a
measurement, a breakdown, an alert — not how to draw it.
Markout has no reflection fallback. Every report needs an annotated model, a partial context
registering each model type, and a Serialize call that passes it — there is no Serialize(obj)
overload, and omitting the context does not compile.
using Markout;
[MarkoutContext(typeof(Dashboard))] // your model types only — the shape types below are built in
public partial class DashboardContext : MarkoutSerializerContext { }
MarkoutSerializer.Serialize(dashboard, Console.Out, DashboardContext.Default);
Default serialization is Markdown. A request for terminal or Unicode bars needs the output-format companion skill and an explicit formatter:
MarkoutSerializer.Serialize(
dashboard,
Console.Out,
new UnicodeFormatter(),
DashboardContext.Default);
Invoke markout-output-formats for plain text, ANSI, pretty tables, TSV/JSONL, or multi-format
dispatch. Do not guess a MarkoutWriterOptions.Format property or add an ANSI package unless the
requested sink specifically needs it.
[MarkoutSerializable(TitleProperty = nameof(Title))]
public class Dashboard
{
public string Title { get; set; } = "";
// Bar chart — comparative quantities.
[MarkoutSection(Name = "Timings"), MarkoutIgnoreInTable]
public List<Metric>? Timings { get; set; } // new Metric("Build", 4.2)
// Stacked/proportional bar.
[MarkoutSection(Name = "Severity"), MarkoutIgnoreInTable]
public List<Breakdown>? Severity { get; set; }
// new Breakdown("Issues", [new Slice("Critical", 3), new Slice("Low", 12)])
// Alert box. [MarkoutSkipDefault] hides it when unset.
[MarkoutIgnoreInTable, MarkoutSkipDefault]
public Callout Warning { get; set; } // new Callout(CalloutSeverity.Warning, "3 issues")
// Tree hierarchy. Children are a COLLECTION, never trailing args.
[MarkoutIgnoreInTable]
public List<TreeNode>? Deps { get; set; }
// new TreeNode("root", [new TreeNode("child")]) { Badge = "📁" }
// Term + explanation list.
[MarkoutSection(Name = "Glossary"), MarkoutIgnoreInTable]
public List<Description>? Glossary { get; set; } // new Description("API", "Application ...")
// Code block. Like Callout it is a value type, so pair it with [MarkoutSkipDefault]
// rather than making it nullable — the generator cannot unwrap a CodeSection?.
[MarkoutIgnoreInTable, MarkoutSkipDefault]
public CodeSection Snippet { get; set; } // new CodeSection("csharp", "class Foo { }")
// Table whose columns are runtime data, not attributed properties. Use it when the column
// set is only known at run time (rows projected out of a foreign schema, a heap dump, etc.).
[MarkoutSection(Name = "Metadata"), MarkoutIgnoreInTable]
public MarkoutTable? Metadata { get; set; }
// new MarkoutTable(["Property", "Value"], [["Machine", "Amd64"]])
// Caller-issued correspondence between complete ordered text sequences. Markout validates
// and presents the mapping; it never computes a diff.
[MarkoutSection(Name = "Source Diff"), MarkoutIgnoreInTable]
public MappedTextDiff? SourceDiff { get; set; }
}
MarkoutTable carries headers and rows as runtime values, so the generator does not need to know
the columns at compile time. It still flows through the serializer like a generated table —
alphabetical section order, SectionOrder overrides, RowWindow, IncludeSections, column
projection, and TSV/JSONL decomposition all apply for free. Set
DefaultSectionOrder = MarkoutSectionOrder.Data when runtime section order is meaningful. Two
things to know:
IncludeColumns) that names none
of a table's columns renders that table as nothing, because the same projection may be aimed at a
sibling section whose columns differ. Generated tables and MarkoutTable follow the same rule, and
a miss in any one table is silent. A selection that matched nothing in any table it was offered
to is a caller error, and Flush/Complete throws No columns matched projection: <names> rather
than hand back a document the caller's request never reached. A selection is its names and its
comparison, so mutating either poses a new question that must match on its own. An empty
IncludeColumns list is a caller error and is reported where the projection is offered. A
projection may be spelled with either the display header or the canonical snake_case key that
TSV/JSONL emits.headerNames list to key TSV/JSONL output on stable
names while the display headers stay human-facing:
new MarkoutTable(["Property", "Value"], ["prop", "val"], rows). A table validates itself at
construction: every row must have one cell per header, and no two columns may share a canonical
key. It is a view over the caller's arrays, not a copy, so do not mutate them afterwards.To emit a runtime-determined set of named sections — each carrying its own runtime-column table —
put the tables on title-bearing elements and [MarkoutUnwrap] the list. Each element becomes its
own level-2 section named from its runtime title, and every markout feature still applies:
[MarkoutSerializable(TitleProperty = nameof(Name))]
public class MetadataSection
{
[MarkoutIgnore] public string Name { get; set; } = ""; // drives the heading only
[MarkoutIgnoreInTable] public MarkoutTable? Body { get; set; }
}
[MarkoutSerializable]
public class MetadataDocument
{
[MarkoutUnwrap] public List<MetadataSection> Sections { get; set; } = [];
}
[MarkoutIgnoreInTable] on every shape list/property. Without it, List<Metric> etc. get
mistreated as a table of columns instead of rendering as the shape. This is the #1 shapes mistake.Breakdown property (not a list) renders as ONE labeled proportional bar — use it for a
covered-vs-uncovered coverage bar rather than a List<Breakdown>:
[MarkoutIgnoreInTable] public Breakdown Coverage { get; set; } with
new Breakdown("Coverage", [new Slice("Covered", 82), new Slice("Uncovered", 18)]). Under a Unicode/
terminal formatter this shows the group label + █ bar, not per-slice table rows.new TreeNode("root", [new TreeNode("leaf")]). Badge is an optional object-initializer property.MarkoutWriter.WriteTree(tree => ...). Pass labels and
isLastSibling; nest child callbacks. Markout owns connector glyphs and ancestor prefixes, so never
construct ├─, └─, or │ in application code.Callout and CodeSection are value types — declare them non-nullable and pair with
[MarkoutSkipDefault] so an unset one disappears. Callout? / CodeSection? does not compile.MappedTextDiff to compare text. Supply complete TextDiffSequence values and
caller-owned TextDiffChange ranges; use TextDiffContextLines only to hide unchanged context.TextDiffChangeLabel on the TextDiffChange. Markout writes it after the hunk header's @@,
groups differently labeled changes into one unlabeled hunk only when fewer than two unchanged
lines separate them (so the patch stays applicable), and never derives a label itself.TextDiffHeadings to MappedTextDiff: Before
lines that begin declarations, plus an optional fallback. Unified output writes the heading
after @@, as Git does, and a label after |. Markout never derives a heading from text.| Type | Meaning | Construct |
|---|---|---|
Metric | one measured value (bar) | new Metric("Build", 4.2) |
Breakdown + Slice | proportional composition | new Breakdown("By type", [new Slice("A", 3)]) |
Callout | alert/severity box | new Callout(CalloutSeverity.Warning, "…") |
TreeNode | hierarchy | new TreeNode("root", [children]) { Badge = "📁" } |
Description | term + text | new Description("API", "…") |
CodeSection | fenced code block | new CodeSection("csharp", "…") |
MarkoutTable | runtime-column table | new MarkoutTable(["Property", "Value"], [["Machine", "Amd64"]]) |
MappedTextDiff | mapped ordered text correspondence | new MappedTextDiff(before, after, changes) |
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (richlander/markout) — no native marketplace selected
npx claudepluginhub p/richlander-markout5 skills in this plugin
/markoutUse when generating Markdown or other structured output (plain text, ANSI, pretty tables, TSV/JSONL) from C# objects, or when diagnosing Markout source-generator errors such as MARKOUT006. Markout replaces hand-built strings in CLIs, tools, reports, and agent output. It looks like System.Text.Json source-gen but the rules differ (NO reflection fallback), so it needs a generated MarkoutSerializerContext and Markout-specific attributes. Covers the required pattern: registered models, the partial context, scalar field shaping, typed value formatters, context-wide options, table diagnostics, semantic child rows, and serialization. Route non-Markdown output to markout-output-formats; data-selected/filtered views to markout-conditional-composition; and visual bars, trees, callouts, definitions, or code blocks to markout-built-in-shapes. Composite cells are covered separately. Don't decompile the Markout assembly or web-search its API — every idiom you need is in the skills./markout-composite-cells-cardsUse when a single value must render dense in Markdown but decompose into typed columns in TSV/JSONL — before/after changes, fractions, shares, percentages, segment breakdowns, deltas and goal polarity — including MarkoutNumberFormat for Change<V> counts — or when building metric / role-matrix / verdict cards with threshold-based MarkoutEmphasis (Change<V>, Fraction, Share, Percent, Segments, Delta/Goal, MetricChange<T>, MultiSourceRow, Verdict). This is Markout's most advanced tier. Don't decompile the assembly or web-search the API — these composite types are here./markout-conditional-compositionUse when a Markout report must adapt to its data — show or hide whole sections, drop table columns that are empty/uniform, filter output to a chosen set of sections, or render one model into several shapes ("one model, many views"). This is Markout's highest-value idiom: declare the conditions with attributes instead of hand-writing if/else + StringBuilder. Don't decompile the assembly or web-search the API — the conditional idioms are here./markout-output-formatsUse when you need output other than default Markdown — plain text / Unicode, ANSI terminal (Spectre), pretty aligned tables, or TSV/JSONL exports — or when one model must serve several formats from a single render path (a CLI `--format` switch). Also covers semantic inline code that renders as Markdown code spans but decodes to plain text in TSV/JSONL. Pick the format with a formatter + MarkoutWriterOptions; never hand-build TSV/JSONL. Don't decompile the assembly or web-search the API — the multi-format idioms are all here.Other plugins' skills for the same job