Template Skill (shared)
This is the single source of truth for the visual chrome of every HTML report produced by
the parent skills earnings-call-summary, peer-analysis, public-information-book, and
sector-analysis and others. It owns:
- Design tokens (
--navy, --accent, --gray-* / --g*, --text, --positive, --negative,
--neutral).
- The CSS reset.
- Body and page base styling. The canonical defaults are
body { font-size: 13px } and
.page { max-width: 900px }; ECS / SA inherit them as-is, PA overrides max-width to
1050px, and PIB overrides both (font-size: 12.5px, max-width: 920px).
- Both cover variants (
cover-simple for PIB / SA; cover-multi for ECS / PA).
- TOC styling (
.toc-page, .toc-heading, .toc-list, .toc-num, .toc-label, .toc-dots).
- Section styling (
.section, .section-heading, .section-content and its descendants).
- The canonical pastel
.outlook-badge (stable / positive / negative / review / na).
- Anchor base styling.
- Footer styling (
.report-footer, .footer-logo).
- Print rules.
- The HTML scaffolds for the document head, both covers, the TOC block, the section block, the
sources-section wrapper, the footer, and the outlook-badge.
The canonical CSS and the literal HTML markup contracts live in
assets/template.html. This SKILL.md describes the rules; the asset
file ships the verbatim implementation. Parent skills must read both files before emitting.
When to read this skill
Read this skill from a parent skill before emitting any HTML report. Parent skills must
contain a directive near the top of their SKILL.md instructing the agent to read both
this file and assets/template.html. The pairing is identical to the skills/shared/citations/
contract — every HTML report touches both shared skills.
Lookup-order rule (non-negotiable)
Whenever the agent is about to author CSS, an HTML scaffold, a class name, a design token, or
any visual chrome that the parent skill does not itself define, it must consult this shared
template skill first and only fall back to inventing markup if the shared layer also does
not cover the need. Do not silently restyle anything the shared skill owns; do not invent CSS or
HTML scaffolding for elements the shared skill already provides.
Output contract (single global rules)
- Every emitted HTML report inlines the contents of
<style id="shared-template-css"> from
assets/template.html between the /* BEGIN shared-template-css ... */ and
/* END shared-template-css */ CSS-comment markers in the parent template's <style>
block. Parent templates ship only the marker comments; they never duplicate the rules.
- Every emitted HTML report uses the literal markup from the matching
<template> snippet for
the document head, cover (one of cover-simple / cover-multi), TOC, section block,
sources-section wrapper, and footer. Class names and attribute order are invariant.
- Each parent skill picks exactly one cover variant. Variants do not mix within a single
report.
- Per-skill CSS overrides (see "Per-skill overrides" below) live above the marker region
in the parent template's
<style> block — never inside it, and never as duplicated copies
of shared rules.
1. Document head (snippet document-head)
The shared document-head snippet is the literal contract for the top of the parent template:
<!DOCTYPE html>, the <html> / <head> / <meta> / <title> boilerplate, and the
<style> block that contains:
- Skill-specific overrides (see below).
- The
/* BEGIN shared-template-css ... */ marker region.
- The
/* BEGIN shared-citations-css ... */ marker region.
Then <body> opens with <div class="page">, which wraps the cover, TOC, report body, and
footer. Substitute {report_title}.
2. Cover (snippets cover-simple and cover-multi)
Two variants. Each parent skill uses exactly one:
| variant |
used by |
shape |
cover-simple |
public-information-book, sector-analysis |
1-column navy cover, top "logo + title" / bottom .cover-meta. |
cover-multi |
earnings-call-summary, peer-analysis |
2-region grid: .cover-top with navy .cover-left + optional .cover-strip image + .cover-bar-top; .cover-bottom is an optional landscape band. |
Cover-multi rules:
- Add the
has-cover-image class to .cover-top and/or .cover-bottom only when an <img>
is populated in .cover-strip / .cover-landscape. Without the class, the strip and bar
are hidden by the canonical CSS.
.cover-companies lists per-skill chips. PA marks the target entity with
class="company-chip target"; ECS lists the issuer first.
- The
.cover-companies-label text is per-skill (e.g. PEERS, COMPANIES).
- Cover-image content (the
<img> URLs) is per-skill data; the wrapper classes are shared.
Cover-simple rules:
- One
.cover-meta row at the bottom; populate as many <span><strong>Label:</strong> value</span>
pairs as the parent skill needs. PIB always emits Type: Public Information Book.
3. Table of contents (snippet toc-block)
The TOC scaffold is identical across all four skills. Each parent fills the <ul class="toc-list">
with one <li> per section it emits, in document order, using the .toc-num / .toc-label /
.toc-dots pattern. The trailing TOC entry always points to the Citations block
(#{prefix}-sources-anchor, label Citations).
4. Section block (snippet section-block)
Every titled section in the report body uses the <div class="section" id="{prefix}-section-{slug}">
<div class="section-heading"> + <div class="section-content"> shape. The body of
.section-content is skill-specific (paragraphs, tables, lists, charts).
The <div id="{prefix}-cite-{slot}"></div> placeholder inside .section-content is opt-in
and only relevant to skills that consume the per-section citation recap from
skills/shared/citations/. Skills that do not opt in omit the placeholder.
5. Sources-section wrapper (snippet sources-section-block)
This is the same wrapper that skills/shared/citations/ defines as <template id="sources-section">,
re-shipped here so the document scaffold stays self-contained. The wrapper anchors the TOC link
target via id="{prefix}-sources-anchor" and contains #{prefix}-sources for the rows. The
rows themselves (.source-item) are owned by skills/shared/citations/, not by this skill.
6. Report footer (snippet report-footer)
The footer is identical across all four skills: navy .report-footer band with the Moody's
Agentic Solutions logo on the left and the report date on the right. Substitute {YYYY-MM-DD}.
7. Outlook badge (snippet outlook-badge)
The canonical visual treatment is pastel background + colored text. Five variants ship in
the canonical CSS:
| class |
when to use |
stable |
issuer-level outlook is STA/Stable. |
positive |
outlook is POS/Positive. |
negative |
outlook is NEG/Negative. |
review |
outlook is RUR/On Review (also catches "Watch" semantics). |
na |
outlook unknown / not applicable; renders muted gray. |
The label text is uppercased by CSS so the inner text can be mixed-case (e.g. Stable).
PIB previously shipped a solid-fill variant (background: var(--positive); color: #fff) for
its outlook badges. That carve-out is removed — PIB now inherits the canonical pastel
variant from this shared skill, and parent templates must not re-define .outlook-badge rules.
8. Per-skill overrides
These rules are intentionally NOT in the canonical CSS. Each parent template keeps them above
the marker region (and only those — anything else inside the canonical block is shared):
| skill |
allowed local overrides |
earnings-call-summary |
none. Cover variant: cover-multi. |
peer-analysis |
.page { max-width: 1050px }. Cover variant: cover-multi. |
public-information-book |
body { font-size: 12.5px }, .page { max-width: 920px }. Cover variant: cover-simple. |
sector-analysis |
none. Cover variant: cover-simple. |
rating-analysis |
Skill-managed template (Python builder scripts/build_html.py). Does not inline shared-template-css or shared-citations-css. Chart.js loaded from CDN. Cover variant: n/a. |
Skill-specific CSS that the shared layer does not own (and which therefore stays in each
parent template indefinitely):
- All table classes (
.yoy-table, .ratings-table, .pa-table, .credit-drivers-table,
.ki-table, .sc-table, .fin-table, .data-table, .row-label, etc.).
- ECS
.credit-badge, .ratings-factors.
- ECS / PA cover-image accent classes that are only meaningful inside
cover-multi and that
use skill-specific spacing (most are already shared; anything with skill-specific tweaks
stays local).
- PA
.sub-heading, .chart-container, .chart-title, .chart-legend.
- PIB chart helpers, ratings-grid helpers.
- SA sector-card / theme-card helpers.
9. Canonical CSS
The canonical CSS lives only in assets/template.html inside the
<style id="shared-template-css">…</style> block. Parent templates do not carry a
duplicate copy of these rules. Each parent template instead reserves a marker region inside
its own <style> tag bracketed by CSS comments (not HTML comments — the markers sit
inside <style>, where <!-- … --> would produce CSS parse errors):
/* BEGIN shared-template-css (inlined at emit time from skills/shared/template/assets/template.html) */
/* END shared-template-css */
At emit time, the agent copies the contents (not the <style> wrapper) of
<style id="shared-template-css">…</style> from the shared asset and inserts them between
those two marker comments in the final emitted HTML. Treat the canonical CSS as a single
block — do not edit values per-skill. If a parent skill needs to restyle shared chrome, change
assets/template.html and the next emit picks it up automatically.
CSS variable contract
The block defines the following CSS custom properties on :root. They are available to every
piece of skill-specific CSS that lives above the marker region:
--navy, --accent — primary palette.
--gray-100, --gray-200, --gray-300, --gray-400, --gray-700 — neutral grays.
--g100, --g200, --g300, --g400, --g700 — short aliases for the same grays. Both
naming schemes resolve. Skill-specific CSS may use either family interchangeably.
--text — body text color.
--positive, --negative, --neutral — semantic colors used by .outlook-badge and
by skill-specific tables (e.g. positive / negative deltas).
10. Quick checklist (use before submitting a report)
1---2name: template3description: >4 Canonical rules and HTML/CSS contract for the page chrome (head boilerplate, cover, table of5 contents, section block, sources-section wrapper, footer, outlook-badge, design tokens) shared6 across Moody's Agentic Solutions HTML report skills (earnings-call-summary, peer-analysis,7 public-information-book, sector-analysis, etc.). Sibling of `skills/shared/citations/` using the same8 inlining pattern. Parent skills must read BOTH this `SKILL.md` (authoring rules: shared-layer9 classes, allowed per-skill overrides, outlook-badge usage) AND `assets/template.html` (canonical10 CSS + literal HTML snippets) before emitting any report. The asset is the source of truth for11 markup; this file is the source of truth for rules. Triggers on questions about the template,12 page chrome, cover, table of contents, footer, layout, design tokens, color palette, fonts,13 outlook badges, or any visual scaffolding of an HTML report skill.14metadata:15 source: https://skillmd.com/skills/stanfish06/template16---1718# Template Skill (shared)1920This is the **single source of truth** for the visual chrome of every HTML report produced by21the parent skills `earnings-call-summary`, `peer-analysis`, `public-information-book`, and22`sector-analysis` and others. It owns:2324- Design tokens (`--navy`, `--accent`, `--gray-*` / `--g*`, `--text`, `--positive`, `--negative`,25 `--neutral`).26- The CSS reset.27- Body and page base styling. The canonical defaults are `body { font-size: 13px }` and28 `.page { max-width: 900px }`; ECS / SA inherit them as-is, PA overrides `max-width` to29 `1050px`, and PIB overrides both (`font-size: 12.5px`, `max-width: 920px`).30- Both cover variants (`cover-simple` for PIB / SA; `cover-multi` for ECS / PA).31- TOC styling (`.toc-page`, `.toc-heading`, `.toc-list`, `.toc-num`, `.toc-label`, `.toc-dots`).32- Section styling (`.section`, `.section-heading`, `.section-content` and its descendants).33- The canonical pastel `.outlook-badge` (`stable` / `positive` / `negative` / `review` / `na`).34- Anchor base styling.35- Footer styling (`.report-footer`, `.footer-logo`).36- Print rules.37- The HTML scaffolds for the document head, both covers, the TOC block, the section block, the38 sources-section wrapper, the footer, and the outlook-badge.3940The canonical CSS and the literal HTML markup contracts live in41[`assets/template.html`](./assets/template.html). This `SKILL.md` describes the rules; the asset42file ships the verbatim implementation. **Parent skills must read both files before emitting.**4344## When to read this skill4546Read this skill from a parent skill **before** emitting any HTML report. Parent skills must47contain a directive near the top of their `SKILL.md` instructing the agent to read **both**48this file and `assets/template.html`. The pairing is identical to the `skills/shared/citations/`49contract — every HTML report touches both shared skills.5051## Lookup-order rule (non-negotiable)5253Whenever the agent is about to author CSS, an HTML scaffold, a class name, a design token, or54any visual chrome that the parent skill does not itself define, it must consult this shared55template skill **first** and only fall back to inventing markup if the shared layer also does56not cover the need. Do not silently restyle anything the shared skill owns; do not invent CSS or57HTML scaffolding for elements the shared skill already provides.5859## Output contract (single global rules)60611. Every emitted HTML report inlines the contents of `<style id="shared-template-css">` from62 `assets/template.html` between the `/* BEGIN shared-template-css ... */` and63 `/* END shared-template-css */` CSS-comment markers in the parent template's `<style>`64 block. Parent templates ship only the marker comments; they never duplicate the rules.652. Every emitted HTML report uses the literal markup from the matching `<template>` snippet for66 the document head, cover (one of `cover-simple` / `cover-multi`), TOC, section block,67 sources-section wrapper, and footer. Class names and attribute order are invariant.683. Each parent skill picks **exactly one** cover variant. Variants do not mix within a single69 report.704. Per-skill CSS overrides (see "Per-skill overrides" below) live **above** the marker region71 in the parent template's `<style>` block — never inside it, and never as duplicated copies72 of shared rules.7374## 1. Document head (snippet `document-head`)7576The shared `document-head` snippet is the literal contract for the top of the parent template:77`<!DOCTYPE html>`, the `<html>` / `<head>` / `<meta>` / `<title>` boilerplate, and the78`<style>` block that contains:79801. Skill-specific overrides (see below).812. The `/* BEGIN shared-template-css ... */` marker region.823. The `/* BEGIN shared-citations-css ... */` marker region.8384Then `<body>` opens with `<div class="page">`, which wraps the cover, TOC, report body, and85footer. Substitute `{report_title}`.8687## 2. Cover (snippets `cover-simple` and `cover-multi`)8889Two variants. Each parent skill uses exactly one:9091| variant | used by | shape |92|---------------|------------------------------------------|--------------------------------------------------|93| `cover-simple`| `public-information-book`, `sector-analysis` | 1-column navy cover, top "logo + title" / bottom `.cover-meta`. |94| `cover-multi` | `earnings-call-summary`, `peer-analysis` | 2-region grid: `.cover-top` with navy `.cover-left` + optional `.cover-strip` image + `.cover-bar-top`; `.cover-bottom` is an optional landscape band. |9596Cover-multi rules:9798- Add the `has-cover-image` class to `.cover-top` and/or `.cover-bottom` **only when an `<img>`99 is populated** in `.cover-strip` / `.cover-landscape`. Without the class, the strip and bar100 are hidden by the canonical CSS.101- `.cover-companies` lists per-skill chips. PA marks the target entity with102 `class="company-chip target"`; ECS lists the issuer first.103- The `.cover-companies-label` text is per-skill (e.g. `PEERS`, `COMPANIES`).104- Cover-image content (the `<img>` URLs) is per-skill data; the wrapper classes are shared.105106Cover-simple rules:107108- One `.cover-meta` row at the bottom; populate as many `<span><strong>Label:</strong> value</span>`109 pairs as the parent skill needs. PIB always emits `Type: Public Information Book`.110111## 3. Table of contents (snippet `toc-block`)112113The TOC scaffold is identical across all four skills. Each parent fills the `<ul class="toc-list">`114with one `<li>` per section it emits, in document order, using the `.toc-num` / `.toc-label` /115`.toc-dots` pattern. The trailing TOC entry always points to the Citations block116(`#{prefix}-sources-anchor`, label `Citations`).117118## 4. Section block (snippet `section-block`)119120Every titled section in the report body uses the `<div class="section" id="{prefix}-section-{slug}">`121> `<div class="section-heading">` + `<div class="section-content">` shape. The body of122`.section-content` is skill-specific (paragraphs, tables, lists, charts).123124The `<div id="{prefix}-cite-{slot}"></div>` placeholder inside `.section-content` is **opt-in**125and only relevant to skills that consume the per-section citation recap from126`skills/shared/citations/`. Skills that do not opt in omit the placeholder.127128## 5. Sources-section wrapper (snippet `sources-section-block`)129130This is the same wrapper that `skills/shared/citations/` defines as `<template id="sources-section">`,131re-shipped here so the document scaffold stays self-contained. The wrapper anchors the TOC link132target via `id="{prefix}-sources-anchor"` and contains `#{prefix}-sources` for the rows. The133**rows themselves** (`.source-item`) are owned by `skills/shared/citations/`, not by this skill.134135## 6. Report footer (snippet `report-footer`)136137The footer is identical across all four skills: navy `.report-footer` band with the Moody's138Agentic Solutions logo on the left and the report date on the right. Substitute `{YYYY-MM-DD}`.139140## 7. Outlook badge (snippet `outlook-badge`)141142The canonical visual treatment is **pastel background + colored text**. Five variants ship in143the canonical CSS:144145| class | when to use |146|----------|----------------------------------------------------------------------------|147| `stable` | issuer-level outlook is `STA`/`Stable`. |148| `positive`| outlook is `POS`/`Positive`. |149| `negative`| outlook is `NEG`/`Negative`. |150| `review` | outlook is `RUR`/`On Review` (also catches "Watch" semantics). |151| `na` | outlook unknown / not applicable; renders muted gray. |152153The label text is uppercased by CSS so the inner text can be mixed-case (e.g. `Stable`).154155PIB previously shipped a solid-fill variant (`background: var(--positive); color: #fff`) for156its outlook badges. That carve-out is **removed** — PIB now inherits the canonical pastel157variant from this shared skill, and parent templates must not re-define `.outlook-badge` rules.158159## 8. Per-skill overrides160161These rules are intentionally NOT in the canonical CSS. Each parent template keeps them above162the marker region (and only those — anything else inside the canonical block is shared):163164| skill | allowed local overrides |165|-----------------------------|------------------------------------------------------------------------|166| `earnings-call-summary` | none. Cover variant: `cover-multi`. |167| `peer-analysis` | `.page { max-width: 1050px }`. Cover variant: `cover-multi`. |168| `public-information-book` | `body { font-size: 12.5px }`, `.page { max-width: 920px }`. Cover variant: `cover-simple`. |169| `sector-analysis` | none. Cover variant: `cover-simple`. |170| `rating-analysis` | Skill-managed template (Python builder `scripts/build_html.py`). Does not inline shared-template-css or shared-citations-css. Chart.js loaded from CDN. Cover variant: n/a.|171172173Skill-specific CSS that the shared layer does not own (and which therefore stays in each174parent template indefinitely):175176- All table classes (`.yoy-table`, `.ratings-table`, `.pa-table`, `.credit-drivers-table`,177 `.ki-table`, `.sc-table`, `.fin-table`, `.data-table`, `.row-label`, etc.).178- ECS `.credit-badge`, `.ratings-factors`.179- ECS / PA cover-image accent classes that are only meaningful inside `cover-multi` and that180 use skill-specific spacing (most are already shared; anything with skill-specific tweaks181 stays local).182- PA `.sub-heading`, `.chart-container`, `.chart-title`, `.chart-legend`.183- PIB chart helpers, ratings-grid helpers.184- SA sector-card / theme-card helpers.185186## 9. Canonical CSS187188The canonical CSS lives **only** in `assets/template.html` inside the189`<style id="shared-template-css">…</style>` block. Parent templates do **not** carry a190duplicate copy of these rules. Each parent template instead reserves a marker region inside191its own `<style>` tag bracketed by **CSS comments** (not HTML comments — the markers sit192inside `<style>`, where `<!-- … -->` would produce CSS parse errors):193194```css195/* BEGIN shared-template-css (inlined at emit time from skills/shared/template/assets/template.html) */196/* END shared-template-css */197```198199At emit time, the agent copies the **contents** (not the `<style>` wrapper) of200`<style id="shared-template-css">…</style>` from the shared asset and inserts them between201those two marker comments in the final emitted HTML. Treat the canonical CSS as a single202block — do not edit values per-skill. If a parent skill needs to restyle shared chrome, change203`assets/template.html` and the next emit picks it up automatically.204205### CSS variable contract206207The block defines the following CSS custom properties on `:root`. They are available to every208piece of skill-specific CSS that lives above the marker region:209210- `--navy`, `--accent` — primary palette.211- `--gray-100`, `--gray-200`, `--gray-300`, `--gray-400`, `--gray-700` — neutral grays.212- `--g100`, `--g200`, `--g300`, `--g400`, `--g700` — short aliases for the same grays. Both213 naming schemes resolve. Skill-specific CSS may use either family interchangeably.214- `--text` — body text color.215- `--positive`, `--negative`, `--neutral` — semantic colors used by `.outlook-badge` and216 by skill-specific tables (e.g. positive / negative deltas).217218## 10. Quick checklist (use before submitting a report)219220- [ ] The contents of `<style id="shared-template-css">` from `assets/template.html` have been221 inlined between the `/* BEGIN shared-template-css */` / `/* END shared-template-css */`222 markers in the emitted HTML.223- [ ] The contents of `<style id="shared-citations-css">` from224 `skills/shared/citations/assets/template.html` have been inlined between the parallel225 citations markers.226- [ ] The parent template's `<style>` block contains **no duplicated copy** of any rule that227 lives in either canonical block.228- [ ] The cover uses exactly one variant (`cover-simple` or `cover-multi`) and matches the229 parent skill's declared variant.230- [ ] `.cover-multi`'s `.cover-top` / `.cover-bottom` only carries `has-cover-image` when an231 `<img>` is populated.232- [ ] All `.outlook-badge` instances use the canonical pastel variants (`stable`, `positive`,233 `negative`, `review`, `na`). No solid-fill / inline-color overrides anywhere.234- [ ] The TOC's last row points to `#{prefix}-sources-anchor` with label `Citations`.235- [ ] The emitted footer uses `.report-footer` + `.footer-logo` markup verbatim.236- [ ] Per-skill overrides above the marker region are limited to the rows in section 8.