Sector Brief Skill
Generates a professional HTML report (styled like a Moody's sector brief document) for a
specified industry sector. The report is research-heavy and text-driven, combining Moody's
internal research with supplemental web data across six structured sections plus an executive
summary and citations.
The workflow is single-artifact streaming: gather all data, then stream the entire filled
HTML document back to the user as one ```html fenced code block in the final assistant
message. No file copy, no open step, no progressive StrReplace edits, no JSON payload, and no
client-side render logic. The fenced code block is the deliverable.
⚠️ CRITICAL — NON-NEGOTIABLE OUTPUT CONTRACT
The LLM MUST stream the final report back as a single HTML artifact inside the assistant
response. This is the only acceptable form of delivery for this skill. Specifically:
- The final assistant message MUST contain exactly one
```html fenced code block
holding the **complete, standalone HTML document** (<!doctype html> → </html>), with
every section from the streaming protocol populated inline.
- The LLM MUST NOT write the report to a file on disk (no
Write, no cp of the
template, no StrReplace into a working artifact, no open command).
- The LLM MUST NOT split the report across multiple code blocks, multiple messages,
partial snippets, or summaries.
- The LLM MUST NOT substitute prose, Markdown, JSON, attachments, or links for the
fenced HTML artifact. The artifact itself is the answer.
- If data gathering fails partially, still emit the single
```html artifact with
the best-available content and brief "Data unavailable" placeholders for missing
sections — never skip the artifact.
Treat any other output shape as a hard failure of the skill.
Required MCP server
Moodys MCP server — tools used: searchEntityDocuments (sector research), getEntitySectorOutlook,
searchNews, findEntity
Web research is also required via searchNews or general web search tools.
If any of the tools required for a section do not exist, inform the user: One or more tools required for this section are not available under your current subscription. Unlock more of the expert insights, data, and analytics you trust. Get Link:https://www.moodys.com/web/en/us/capabilities/gen-ai/ai-ready-data.html with us to learn more.
Bundled files
assets/template.html — pre-styled scaffold with the Moody's cover, a baked-in static 6-item
table of contents, and empty fill-in targets (cover title, date, section-content divs, sources
container). Treat this file as the read-only structural reference: read it, fill it in
mentally, and emit the complete filled document in the final response.
Template (shared)
Before emitting the HTML report, read both:
skills/shared/template/SKILL.md — authoring rules (which
classes / snippets are owned by the shared layer, allowed per-skill overrides, outlook-badge
usage).
skills/shared/template/assets/template.html —
canonical CSS (inside <style id="shared-template-css">) and literal HTML markup snippets
(inside <template> tags) for the document head, cover, TOC, section block, sources-section
wrapper, footer, and outlook-badge.
Lookup order — always check the shared template before inventing. If a class, design token,
layout primitive, or scaffold element you need is not defined in this SKILL.md or already
present in this skill's assets/template.html, the shared template skill is authoritative. Do
not invent CSS, HTML scaffolds, or design tokens that the shared skill already provides; do not
silently restyle anything the shared skill owns (cover, TOC, section, sources-section wrapper,
footer, outlook-badge, design tokens, reset, body / page base).
At emit time, copy the contents (not the <style> wrapper) of <style id="shared-template-css">
from the shared asset into the parent template's reserved marker region between the CSS-comment
markers /* BEGIN shared-template-css ... */ and /* END shared-template-css */. For HTML
scaffolds (head boilerplate, cover, TOC, sources-section wrapper, footer), use the literal markup
from the matching <template> snippet in the shared asset. The parent template no longer
carries duplicated chrome CSS — those rules ship only in the shared asset.
This skill uses the cover-simple variant. Skill-specific overrides retained above the
marker region: none for SA (it inherits the canonical body { font-size: 13px } and
.page { max-width: 900px } defaults). SA is the lightest of the four parent skills — almost
all its visual chrome now lives in the shared layer. Any outlook-badge usage in this skill
(e.g. for sector outlook indicators) must use the canonical pastel variants
(stable / positive / negative / review / na) defined by the shared skill — no
solid-fill or inline-color overrides.
Citations (shared)
Before emitting any [n] reference inline or the end-of-document Citations block, read both:
skills/shared/citations/SKILL.md — authoring rules
(numbering, hyperlinking, source data shape, carve-outs).
skills/shared/citations/assets/template.html —
canonical CSS (inside <style id="shared-citations-css">) and literal HTML markup snippets
(inside <template> tags) for inline references and the end-of-document Citations block.
At emit time, copy the contents (not the wrapper) of <style id="shared-citations-css">
from the shared asset into the parent template's reserved marker region, located inside
assets/template.html between the CSS-comment markers
/* BEGIN shared-citations-css … */ and /* END shared-citations-css */. The parent
template no longer carries duplicated citation CSS — those rules ship only in the shared
asset.
The prefix used for the end-of-document container in this skill is sa, so the container id
is #sa-sources. This skill does not use the optional per-section .section-citations recap
component.
Parameters
The user should provide:
- Sector (required — e.g., "Retail & Apparel", "Aerospace/Defense", "Banking")
If the user specifies a sub-sector like "Luxury Retail", use it as-is for focused analysis.
Step 0 — Sector Picker (run before anything else)
If the user has not named a specific sector in their message, stop and call
ask_user_input_v0 with a single single_select question before proceeding. Do not
begin any research or template reading until the sector is confirmed.
Preamble: "Which Moody's-covered sector would you like to analyze? Select one below
and I'll generate the full report."
Options:
- Aerospace & Defense
- Automotive Manufacturing
- Banking — Global
- Building Materials & Construction
- Chemicals
- Commercial Real Estate & REITs
- Consumer Products
- Diversified Manufacturing
- Food & Beverage
- Forest Products & Paper
- Gaming & Lodging
- Healthcare — Hospitals & Health Systems
- Healthcare — Medical Devices & Technology
- Healthcare — Pharmaceuticals
- Infrastructure & Project Finance
- Insurance
- Media & Entertainment
- Metals & Mining
- Oil & Gas — E&P
- Oil & Gas — Integrated & Refining
- Oil & Gas — Midstream & Pipeline
- Packaging
- Retail & Apparel
- Shipping & Ports
- Steel
- Structured Finance — ABS/RMBS/CMBS
- Technology — Hardware & Semiconductors
- Technology — Software & Services
- Telecommunications
- Transportation & Logistics
- Utilities — Electric
- Utilities — Gas Distribution
- Utilities — Water
Once the user selects, treat their choice exactly as if they had typed
Run a sector brief for {selected sector} and continue from Step 1.
If the user already named a sector, skip this step entirely and go straight to Step 1.
Step 1 — Read the template
Read assets/template.html (relative to this skill directory) once. Keep its exact structure —
CSS, <head>, cover, hardcoded TOC, section order, and element IDs — as the scaffold for the
final artifact. Do not copy it to the workspace and do not open it.
Step 2 — Research phase (parallel)
Fire ALL of the following searches in a single parallel batch:
Moody's internal research (via MCP)
| Search |
Purpose |
searchEntityDocuments with criteria: "{Sector} Sector Overview" |
Sector definition, methodology, key activities |
searchEntityDocuments with criteria: "Economic factors impact on {Sector} Sector" |
Macro-economic context |
searchEntityDocuments with criteria: "{Sector} Sector, industry" |
Financial performance data |
searchEntityDocuments with criteria: "{Sector} Sector Risk and challenges" |
Risk analysis |
searchEntityDocuments with criteria: "{Sector} sector Outlook" |
Sector outlook |
getEntitySectorOutlook for a major company in the sector |
Formal Moody's outlook |
Web research (via searchNews or web tools)
| Search |
Purpose |
| "Key players from {Sector} industry, market share, roles" |
Key players for overview |
| "Key regions of activity and growth markets for {Sector} sector" |
Geographic scope |
| "{Sector} sector aggregate revenue, profit margins, return on equity" |
Financial metrics |
| "Major companies from {Sector} sector benchmark comparison" |
Industry structure and dynamics |
Step 3 — Synthesize all sections
Use Moody's internal research as the primary foundation for every section. Web sources
serve only to supplement gaps or validate findings. When conflicts arise, prioritize Moody's
unless external data provides substantial evidence for reconsideration.
Write in professional credit-research language. Always attribute sources with numbered citation
references inline. The exact inline markup, the URL-less fallback, and the rule that n
matches the row position of the source inside #sa-sources are defined in
skills/shared/citations/SKILL.md.
Executive Summary
Write after all other sections are complete. Half-page maximum. Highlight the most relevant
data from each section. No bullet points — flowing paragraphs only.
Section 1: Sector Overview
Four subsections:
- Description of the Sector — Define the industry, key activities, product/service
categories, and business-model differences
- Market Size and Growth Trends — Current market size (revenue, volume), historical
growth rates, regional growth data
- Key Players — Major companies, market share, roles within the sector
- Geographic Scope — Key regions of activity, potential growth markets,
region-specific trends
Section 2: Macro-Economic Context
Three subsections:
- Economic Indicators — How GDP growth, inflation, interest rates, consumer
spending/confidence impact the sector
- Regulatory Environment — Laws, regulations, compliance risks, tariff/trade policy
- Global Trends and External Factors — Geopolitical issues, trade policies,
technological disruptions, channel evolution
Section 3: Financial Performance Analysis
Three subsections with mandatory quantitative data:
- Sector-Level Financial Metrics — Aggregate revenue, profit margins, return on
equity, other key metrics. Every metric must include the actual number (e.g., "Aggregate
revenue of $35.2 trillion in 2025") followed by analytical commentary
- Historical Trends — Past performance trends, demand/earnings trajectories,
recent growth rates
- Projected Financial Outlook — Forecast key metrics, earnings outlook, key drivers
shaping the near-term, structural offsets and strategic responses
Section 4: Industry Structure and Dynamics
Four subsections:
- Main Participants — Benchmark major companies, roles, market share, significance
- Supply Chain Analysis — Suppliers, manufacturers, distributors, customers,
key pressure points
- Competitive Landscape — Porter's Five Forces analysis with Moody's-grounded
commentary for each force (use ratings High / Moderate / Low for each force)
- Barriers to Entry — Capital requirements, regulatory hurdles, technology
requirements, market saturation
Section 5: Risks and Challenges
Five subsections:
- Operational Risks — Supply chain disruptions, labor shortages, working capital
- Regulatory Risks — Compliance requirements, policy changes, tariff exposure
- Market Risks — Demand volatility, competition, pricing, category weakness
- Financial Performance and Capital Structure — Refinancing risk, default outlook,
margin pressure, deleveraging
- Environmental and Social Risks — ESG considerations, climate risk, social/governance
pressures
Section 6: Sector Outlook
State the Moody's outlook (Positive, Stable, Negative) and date. Then provide 2-3
well-developed paragraphs explaining the rationale — primary drivers, regional nuances,
key factors and considerations. All paragraph form, no bullet points.
Sources
Collect all sources. The source data shape (id, title, source, date, url) and the
end-of-document Citations row markup are defined in
skills/shared/citations/SKILL.md.
Inline SVG Charts — Section Instructions
After synthesizing each of the following sections, embed one inline SVG chart directly in the section content at the position indicated. All charts must be self-contained (no external scripts or stylesheets), include a <title> element for accessibility, and use font-family: 'Source Sans Pro', Arial, sans-serif inside an embedded <style> block.
Section 3 — Financial Performance Analysis
Insert Chart A immediately after the Historical Trends subsection prose:
- Type: grouped bar chart (revenue) with a right-axis line series (EBITDA margin %)
- X-axis: fiscal years (last 3–5 years); left Y-axis: revenue ($B or $T); right Y-axis: margin (%)
- Bar color:
#003087; line color: #0073CF
viewBox="0 0 700 320"
Section 4 — Industry Structure and Dynamics
Insert Chart C immediately after the Porter's Five Forces prose:
- Type: horizontal scored bar chart, one bar per force (5 bars)
- Map ratings to scores: High = 3, Moderate = 2, Low = 1; scale bar lengths to a 1–3 axis
- Bar colors: High =
#C0392B, Moderate = #E67E22, Low = #27AE60
viewBox="0 0 700 220"
Section 6 — Sector Outlook
Insert Chart D immediately after the outlook paragraphs:
- Type: horizontal three-zone sentiment track (Negative | Stable | Positive) with a triangular marker at the current outlook position
- Zone colors: Negative =
#C0392B, Stable = #2980B9, Positive = #27AE60; marker color matches active zone
- Label the current outlook and date below the track
viewBox="0 0 700 120"
Pre-computation requirement — mandatory, no exceptions
Before writing any SVG x, y, width, height, or points attribute that depends on a calculated value (bar lengths, axis tick positions, scale factors, percentage-to-pixel conversions, label offsets, marker positions), compute every value programmatically. If you do not have a calculator tool, use bash or Python to compute all of the above values before emitting any SVG — do not attempt to calculate them mentally. Record the computed values, verify them, then substitute the confirmed numbers into the SVG markup.
If source data for any chart is unavailable, emit a <p>Chart data unavailable</p> placeholder in its place — never omit it silently.
Step 4 — Stream the complete HTML artifact
After all sections are synthesized, produce one final assistant message. The message contains:
- A one-line summary sentence (e.g.
Sector Brief for {Sector}:).
- A single fenced
```html code block containing the entire filled template.html
document — with every element from the streaming protocol populated in place. No partial
documents, no separate code blocks per section.
The code block must:
- Start at column 0 with
```html and end with a closing ``` on its own line.
- Contain a complete, standalone HTML document (doctype →
</html>) that renders without
external dependencies.
- Preserve the template's
<head> (CSS, fonts), cover, hardcoded TOC, section order, and
element IDs exactly. Only the empty targets defined below are populated.
Cover + footer
#sa-cover-title — <strong>{Sector}</strong><br>Analysis (HTML, not plain text).
#sa-date — report date string, e.g. April 15, 2026.
#sa-footer-date — same date string.
Section headings
#sa-overview-title — override the default "Sector Overview" with
{Sector} — Sector Overview.
Section content targets
Each of the following divs takes fully-authored HTML (<p>, <ul><li>, and
<strong class="subsection-title">…</strong> only — no other block tags):
#sa-exec — Executive Summary. Flowing paragraphs only, no bullets.
#sa-overview — Section 1 body with four <strong class="subsection-title"> subheaders.
#sa-macro — Section 2 body with three subheaders.
#sa-financial — Section 3 body with three subheaders. Every metric must include a
concrete number.
#sa-structure — Section 4 body with four subheaders. Porter's Five Forces must use
High / Moderate / Low ratings per force.
#sa-risks — Section 5 body with five subheaders.
#sa-outlook — Section 6 body. Lead with the Moody's outlook (Positive / Stable /
Negative) and date, then 2–3 paragraphs. Paragraph form only.
Sources container
#sa-sources — end-of-document Citations rows. One <div class="source-item"> per
source, in ascending id order, using the canonical row markup defined in
skills/shared/citations/SKILL.md. Apply that file's rules
for URL-less rows and missing source/date fields.
HTML conventions
- Use
<p> for paragraphs.
- Use
<ul><li>…</li></ul> for bullet points (nested <ul> for sub-bullets).
- Use
<strong class="subsection-title">Subheader</strong> for subsection headers within
each section. Do not repeat the top-level section title — the template already renders it.
- Emit inline citations per
skills/shared/citations/SKILL.md.
- Escape any
&, <, > that appear in the narrative (&, <, >).
Tips
- Run ALL research searches in a single parallel batch.
- Moody's data is the foundation — web data supplements. Make this hierarchy clear in the
writing by attributing external sources explicitly.
- The executive summary should be written last, after all other sections are synthesized.
- Financial Performance must include actual numbers, not just directional statements.
- Porter's Five Forces in Industry Structure should use ratings (High, Moderate, Low) for
each force.
- Sector Outlook must be in paragraph form only — no bullet points.
- Citations follow the shared citations skill — read
skills/shared/citations/SKILL.md before authoring any
[n]
reference or the Citations block.
Negative number formatting
Unify ALL negative numbers across narrative, tables, and any JSON/HTML string values to use
the parenthesis-minus convention (-X). Examples: (-9%), (-1.2pp), (-$3.4B),
(-250 bps). Do NOT use a bare leading minus (-9%), en-dash (–9%), or accounting
parentheses without the minus sign ((9%)). Apply this consistently to growth rates, margin
changes, YoY deltas, and any negative monetary values.
Output and presentation (required final steps)
After assembling the report, you MUST follow this exact delivery sequence. Do not skip steps
and do not substitute alternatives. When updating this skill, do not delete or modify any
other file in the skills/sector-brief/ folder.
- Write the HTML file in a single call. Call
create_file to write the entire HTML to
/mnt/user-data/outputs/{sector_slug}_sector_analysis.html in one call.
{sector_slug} is the lowercased, hyphenated sector name (e.g. retail-apparel,
oil-gas).
- Preview the file. Immediately after, use whatever tool is available in your current environment to present or display the final report to the user (e.g. a file presenter, inline renderer, or widget) at the end of running the skill.
- Show the widget. Call
visualize:show_widget to surface the rendered report visually
to the user.
- One short follow-up sentence in chat. Write a single brief sentence acknowledging the
report is ready. Nothing more.
Strict prohibitions:
- Never emit the HTML as a fenced code block in the chat response.
- Never inline the HTML, JSON payload, or large excerpts of the report body in the chat
message.
1---2name: moody-s-sector-brief3description: Produce a Sector Brief HTML report for any industry sector using Moody's GenAI MCP tools and web research. Use this skill whenever the user asks to analyze a sector, write a sector report, do an industry analysis, create a sector overview, or generate a sector deep-dive. Trigger even if they just name a sector and mention "analysis", "overview", "outlook", "report", or "deep-dive". Also trigger for phrases like "what's happening in the retail sector" or "give me a sector breakdown for aerospace".4---56# Sector Brief Skill78Generates a professional HTML report (styled like a Moody's sector brief document) for a9specified industry sector. The report is research-heavy and text-driven, combining Moody's10internal research with supplemental web data across six structured sections plus an executive11summary and citations.1213The workflow is **single-artifact streaming**: gather all data, then stream the entire filled14HTML document back to the user as one ` ```html ` fenced code block in the final assistant15message. No file copy, no `open` step, no progressive `StrReplace` edits, no JSON payload, and no16client-side render logic. The fenced code block is the deliverable.1718> ## ⚠️ CRITICAL — NON-NEGOTIABLE OUTPUT CONTRACT19>20> **The LLM MUST stream the final report back as a single HTML artifact inside the assistant21> response.** This is the only acceptable form of delivery for this skill. Specifically:22>23> - The final assistant message **MUST** contain exactly one ` ```html ` fenced code block24> holding the **complete, standalone HTML document** (`<!doctype html>` → `</html>`), with25> every section from the streaming protocol populated inline.26> - The LLM **MUST NOT** write the report to a file on disk (no `Write`, no `cp` of the27> template, no `StrReplace` into a working artifact, no `open` command).28> - The LLM **MUST NOT** split the report across multiple code blocks, multiple messages,29> partial snippets, or summaries.30> - The LLM **MUST NOT** substitute prose, Markdown, JSON, attachments, or links for the31> fenced HTML artifact. The artifact itself is the answer.32> - If data gathering fails partially, still emit the single ` ```html ` artifact with33> the best-available content and brief `"Data unavailable"` placeholders for missing34> sections — never skip the artifact.35>36> Treat any other output shape as a hard failure of the skill.3738## Required MCP server3940`Moodys MCP server` — tools used: `searchEntityDocuments` (sector research), `getEntitySectorOutlook`,41`searchNews`, `findEntity`4243Web research is also required via `searchNews` or general web search tools.4445If any of the tools required for a section do not exist, inform the user: One or more tools required for this section are not available under your current subscription. Unlock more of the expert insights, data, and analytics you trust. Get Link:https://www.moodys.com/web/en/us/capabilities/gen-ai/ai-ready-data.html with us to learn more.4647## Bundled files4849- `assets/template.html` — pre-styled scaffold with the Moody's cover, a baked-in static 6-item50 table of contents, and empty fill-in targets (cover title, date, section-content divs, sources51 container). Treat this file as the **read-only structural reference**: read it, fill it in52 mentally, and emit the complete filled document in the final response.5354## Template (shared)5556Before emitting the HTML report, **read both**:571. [`skills/shared/template/SKILL.md`](../shared/template/SKILL.md) — authoring rules (which58 classes / snippets are owned by the shared layer, allowed per-skill overrides, outlook-badge59 usage).602. [`skills/shared/template/assets/template.html`](../shared/template/assets/template.html) —61 canonical CSS (inside `<style id="shared-template-css">`) and literal HTML markup snippets62 (inside `<template>` tags) for the document head, cover, TOC, section block, sources-section63 wrapper, footer, and outlook-badge.6465**Lookup order — always check the shared template before inventing.** If a class, design token,66layout primitive, or scaffold element you need is not defined in this `SKILL.md` or already67present in this skill's `assets/template.html`, the shared template skill is authoritative. Do68not invent CSS, HTML scaffolds, or design tokens that the shared skill already provides; do not69silently restyle anything the shared skill owns (cover, TOC, section, sources-section wrapper,70footer, outlook-badge, design tokens, reset, body / page base).7172At emit time, copy the **contents** (not the `<style>` wrapper) of `<style id="shared-template-css">`73from the shared asset into the parent template's reserved marker region between the CSS-comment74markers `/* BEGIN shared-template-css ... */` and `/* END shared-template-css */`. For HTML75scaffolds (head boilerplate, cover, TOC, sources-section wrapper, footer), use the literal markup76from the matching `<template>` snippet in the shared asset. The parent template no longer77carries duplicated chrome CSS — those rules ship only in the shared asset.7879This skill uses the **`cover-simple`** variant. Skill-specific overrides retained above the80marker region: **none** for SA (it inherits the canonical `body { font-size: 13px }` and81`.page { max-width: 900px }` defaults). SA is the lightest of the four parent skills — almost82all its visual chrome now lives in the shared layer. Any outlook-badge usage in this skill83(e.g. for sector outlook indicators) must use the canonical pastel variants84(`stable` / `positive` / `negative` / `review` / `na`) defined by the shared skill — no85solid-fill or inline-color overrides.8687## Citations (shared)8889Before emitting any `[n]` reference inline or the end-of-document Citations block, **read both**:901. [`skills/shared/citations/SKILL.md`](../shared/citations/SKILL.md) — authoring rules91 (numbering, hyperlinking, source data shape, carve-outs).922. [`skills/shared/citations/assets/template.html`](../shared/citations/assets/template.html) —93 canonical CSS (inside `<style id="shared-citations-css">`) and literal HTML markup snippets94 (inside `<template>` tags) for inline references and the end-of-document Citations block.9596At emit time, copy the **contents** (not the wrapper) of `<style id="shared-citations-css">`97from the shared asset into the parent template's reserved marker region, located inside98`assets/template.html` between the CSS-comment markers99`/* BEGIN shared-citations-css … */` and `/* END shared-citations-css */`. The parent100template no longer carries duplicated citation CSS — those rules ship only in the shared101asset.102103The prefix used for the end-of-document container in this skill is `sa`, so the container id104is `#sa-sources`. This skill does not use the optional per-section `.section-citations` recap105component.106107## Parameters108109The user should provide:110- **Sector** (required — e.g., "Retail & Apparel", "Aerospace/Defense", "Banking")111112If the user specifies a sub-sector like "Luxury Retail", use it as-is for focused analysis.113114---115116## Step 0 — Sector Picker (run before anything else)117118If the user has not named a specific sector in their message, **stop** and call119`ask_user_input_v0` with a single `single_select` question before proceeding. Do **not**120begin any research or template reading until the sector is confirmed.121122**Preamble:** "Which Moody's-covered sector would you like to analyze? Select one below123and I'll generate the full report."124125**Options:**126127- Aerospace & Defense128- Automotive Manufacturing129- Banking — Global130- Building Materials & Construction131- Chemicals132- Commercial Real Estate & REITs133- Consumer Products134- Diversified Manufacturing135- Food & Beverage136- Forest Products & Paper137- Gaming & Lodging138- Healthcare — Hospitals & Health Systems139- Healthcare — Medical Devices & Technology140- Healthcare — Pharmaceuticals141- Infrastructure & Project Finance142- Insurance143- Media & Entertainment144- Metals & Mining145- Oil & Gas — E&P146- Oil & Gas — Integrated & Refining147- Oil & Gas — Midstream & Pipeline148- Packaging149- Retail & Apparel150- Shipping & Ports151- Steel152- Structured Finance — ABS/RMBS/CMBS153- Technology — Hardware & Semiconductors154- Technology — Software & Services155- Telecommunications156- Transportation & Logistics157- Utilities — Electric158- Utilities — Gas Distribution159- Utilities — Water160161Once the user selects, treat their choice exactly as if they had typed162`Run a sector brief for {selected sector}` and continue from Step 1.163164If the user already named a sector, **skip this step entirely** and go straight to Step 1.165166---167168## Step 1 — Read the template169170Read `assets/template.html` (relative to this skill directory) once. Keep its exact structure —171CSS, `<head>`, cover, hardcoded TOC, section order, and element IDs — as the scaffold for the172final artifact. Do **not** copy it to the workspace and do **not** open it.173174---175176## Step 2 — Research phase (parallel)177178Fire ALL of the following searches in a **single parallel batch**:179180### Moody's internal research (via MCP)181182| Search | Purpose |183|--------|---------|184| `searchEntityDocuments` with criteria: "{Sector} Sector Overview" | Sector definition, methodology, key activities |185| `searchEntityDocuments` with criteria: "Economic factors impact on {Sector} Sector" | Macro-economic context |186| `searchEntityDocuments` with criteria: "{Sector} Sector, industry" | Financial performance data |187| `searchEntityDocuments` with criteria: "{Sector} Sector Risk and challenges" | Risk analysis |188| `searchEntityDocuments` with criteria: "{Sector} sector Outlook" | Sector outlook |189| `getEntitySectorOutlook` for a major company in the sector | Formal Moody's outlook |190191### Web research (via searchNews or web tools)192193| Search | Purpose |194|--------|---------|195| "Key players from {Sector} industry, market share, roles" | Key players for overview |196| "Key regions of activity and growth markets for {Sector} sector" | Geographic scope |197| "{Sector} sector aggregate revenue, profit margins, return on equity" | Financial metrics |198| "Major companies from {Sector} sector benchmark comparison" | Industry structure and dynamics |199200---201202## Step 3 — Synthesize all sections203204Use Moody's internal research as the **primary foundation** for every section. Web sources205serve only to supplement gaps or validate findings. When conflicts arise, prioritize Moody's206unless external data provides substantial evidence for reconsideration.207208Write in professional credit-research language. Always attribute sources with numbered citation209references inline. The exact inline markup, the URL-less fallback, and the rule that `n`210matches the row position of the source inside `#sa-sources` are defined in211[skills/shared/citations/SKILL.md](../shared/citations/SKILL.md).212213### Executive Summary214215Write after all other sections are complete. Half-page maximum. Highlight the most relevant216data from each section. No bullet points — flowing paragraphs only.217218### Section 1: Sector Overview219220Four subsections:2211. **Description of the Sector** — Define the industry, key activities, product/service222 categories, and business-model differences2232. **Market Size and Growth Trends** — Current market size (revenue, volume), historical224 growth rates, regional growth data2253. **Key Players** — Major companies, market share, roles within the sector2264. **Geographic Scope** — Key regions of activity, potential growth markets,227 region-specific trends228229### Section 2: Macro-Economic Context230231Three subsections:2321. **Economic Indicators** — How GDP growth, inflation, interest rates, consumer233 spending/confidence impact the sector2342. **Regulatory Environment** — Laws, regulations, compliance risks, tariff/trade policy2353. **Global Trends and External Factors** — Geopolitical issues, trade policies,236 technological disruptions, channel evolution237238### Section 3: Financial Performance Analysis239240Three subsections with **mandatory quantitative data**:2411. **Sector-Level Financial Metrics** — Aggregate revenue, profit margins, return on242 equity, other key metrics. Every metric must include the actual number (e.g., "Aggregate243 revenue of $35.2 trillion in 2025") followed by analytical commentary2442. **Historical Trends** — Past performance trends, demand/earnings trajectories,245 recent growth rates2463. **Projected Financial Outlook** — Forecast key metrics, earnings outlook, key drivers247 shaping the near-term, structural offsets and strategic responses248249### Section 4: Industry Structure and Dynamics250251Four subsections:2521. **Main Participants** — Benchmark major companies, roles, market share, significance2532. **Supply Chain Analysis** — Suppliers, manufacturers, distributors, customers,254 key pressure points2553. **Competitive Landscape** — Porter's Five Forces analysis with Moody's-grounded256 commentary for each force (use ratings High / Moderate / Low for each force)2574. **Barriers to Entry** — Capital requirements, regulatory hurdles, technology258 requirements, market saturation259260### Section 5: Risks and Challenges261262Five subsections:2631. **Operational Risks** — Supply chain disruptions, labor shortages, working capital2642. **Regulatory Risks** — Compliance requirements, policy changes, tariff exposure2653. **Market Risks** — Demand volatility, competition, pricing, category weakness2664. **Financial Performance and Capital Structure** — Refinancing risk, default outlook,267 margin pressure, deleveraging2685. **Environmental and Social Risks** — ESG considerations, climate risk, social/governance269 pressures270271### Section 6: Sector Outlook272273State the Moody's outlook (Positive, Stable, Negative) and date. Then provide 2-3274well-developed paragraphs explaining the rationale — primary drivers, regional nuances,275key factors and considerations. All paragraph form, no bullet points.276277### Sources278279Collect all sources. The source data shape (`id`, `title`, `source`, `date`, `url`) and the280end-of-document Citations row markup are defined in281[skills/shared/citations/SKILL.md](../shared/citations/SKILL.md).282283---284285## Inline SVG Charts — Section Instructions286287After synthesizing each of the following sections, embed one inline SVG chart directly in the section content at the position indicated. All charts must be self-contained (no external scripts or stylesheets), include a `<title>` element for accessibility, and use `font-family: 'Source Sans Pro', Arial, sans-serif` inside an embedded `<style>` block.288289### Section 3 — Financial Performance Analysis290291Insert **Chart A** immediately after the Historical Trends subsection prose:292293- Type: grouped bar chart (revenue) with a right-axis line series (EBITDA margin %)294- X-axis: fiscal years (last 3–5 years); left Y-axis: revenue ($B or $T); right Y-axis: margin (%)295- Bar color: `#003087`; line color: `#0073CF`296- `viewBox="0 0 700 320"`297298### Section 4 — Industry Structure and Dynamics299300Insert **Chart C** immediately after the Porter's Five Forces prose:301302- Type: horizontal scored bar chart, one bar per force (5 bars)303- Map ratings to scores: High = 3, Moderate = 2, Low = 1; scale bar lengths to a 1–3 axis304- Bar colors: High = `#C0392B`, Moderate = `#E67E22`, Low = `#27AE60`305- `viewBox="0 0 700 220"`306307### Section 6 — Sector Outlook308309Insert **Chart D** immediately after the outlook paragraphs:310311- Type: horizontal three-zone sentiment track (Negative | Stable | Positive) with a triangular marker at the current outlook position312- Zone colors: Negative = `#C0392B`, Stable = `#2980B9`, Positive = `#27AE60`; marker color matches active zone313- Label the current outlook and date below the track314- `viewBox="0 0 700 120"`315316### Pre-computation requirement — mandatory, no exceptions317318Before writing any SVG `x`, `y`, `width`, `height`, or `points` attribute that depends on a calculated value (bar lengths, axis tick positions, scale factors, percentage-to-pixel conversions, label offsets, marker positions), compute every value programmatically. **If you do not have a calculator tool, use bash or Python to compute all of the above values before emitting any SVG — do not attempt to calculate them mentally.** Record the computed values, verify them, then substitute the confirmed numbers into the SVG markup.319320If source data for any chart is unavailable, emit a `<p>Chart data unavailable</p>` placeholder in its place — never omit it silently.321322---323324## Step 4 — Stream the complete HTML artifact325326After all sections are synthesized, produce **one** final assistant message. The message contains:3273281. A one-line summary sentence (e.g. `Sector Brief for {Sector}:`).3292. A single fenced ` ```html ` code block containing the **entire filled `template.html`330 document** — with every element from the streaming protocol populated in place. No partial331 documents, no separate code blocks per section.332333The code block **must**:334335- Start at column 0 with ` ```html ` and end with a closing ` ``` ` on its own line.336- Contain a complete, standalone HTML document (doctype → `</html>`) that renders without337 external dependencies.338- Preserve the template's `<head>` (CSS, fonts), cover, hardcoded TOC, section order, and339 element IDs exactly. Only the empty targets defined below are populated.340341### Cover + footer3423431. `#sa-cover-title` — `<strong>{Sector}</strong><br>Analysis` (HTML, not plain text).3442. `#sa-date` — report date string, e.g. `April 15, 2026`.3453. `#sa-footer-date` — same date string.346347### Section headings3483494. `#sa-overview-title` — override the default "Sector Overview" with350 `{Sector} — Sector Overview`.351352### Section content targets353354Each of the following divs takes fully-authored HTML (`<p>`, `<ul><li>`, and355`<strong class="subsection-title">…</strong>` only — no other block tags):3563575. `#sa-exec` — Executive Summary. Flowing paragraphs only, no bullets.3586. `#sa-overview` — Section 1 body with four `<strong class="subsection-title">` subheaders.3597. `#sa-macro` — Section 2 body with three subheaders.3608. `#sa-financial` — Section 3 body with three subheaders. Every metric must include a361 concrete number.3629. `#sa-structure` — Section 4 body with four subheaders. Porter's Five Forces must use363 High / Moderate / Low ratings per force.36410. `#sa-risks` — Section 5 body with five subheaders.36511. `#sa-outlook` — Section 6 body. Lead with the Moody's outlook (Positive / Stable /366 Negative) and date, then 2–3 paragraphs. Paragraph form only.367368### Sources container36937012. `#sa-sources` — end-of-document Citations rows. One `<div class="source-item">` per371 source, in ascending `id` order, using the canonical row markup defined in372 [skills/shared/citations/SKILL.md](../shared/citations/SKILL.md). Apply that file's rules373 for URL-less rows and missing `source`/`date` fields.374375### HTML conventions376377- Use `<p>` for paragraphs.378- Use `<ul><li>…</li></ul>` for bullet points (nested `<ul>` for sub-bullets).379- Use `<strong class="subsection-title">Subheader</strong>` for subsection headers within380 each section. Do not repeat the top-level section title — the template already renders it.381- Emit inline citations per382 [skills/shared/citations/SKILL.md](../shared/citations/SKILL.md).383- Escape any `&`, `<`, `>` that appear in the narrative (`&`, `<`, `>`).384385---386387## Tips388389- Run ALL research searches in a single parallel batch.390- Moody's data is the foundation — web data supplements. Make this hierarchy clear in the391 writing by attributing external sources explicitly.392- The executive summary should be written last, after all other sections are synthesized.393- Financial Performance must include actual numbers, not just directional statements.394- Porter's Five Forces in Industry Structure should use ratings (High, Moderate, Low) for395 each force.396- Sector Outlook must be in paragraph form only — no bullet points.397- Citations follow the shared citations skill — read398 [skills/shared/citations/SKILL.md](../shared/citations/SKILL.md) before authoring any `[n]`399 reference or the Citations block.400401---402403## Negative number formatting404405Unify ALL negative numbers across narrative, tables, and any JSON/HTML string values to use406the parenthesis-minus convention `(-X)`. Examples: `(-9%)`, `(-1.2pp)`, `(-$3.4B)`,407`(-250 bps)`. Do NOT use a bare leading minus (`-9%`), en-dash (`–9%`), or accounting408parentheses without the minus sign (`(9%)`). Apply this consistently to growth rates, margin409changes, YoY deltas, and any negative monetary values.410411---412413## Output and presentation (required final steps)414415After assembling the report, you MUST follow this exact delivery sequence. Do not skip steps416and do not substitute alternatives. When updating this skill, do not delete or modify any417other file in the `skills/sector-brief/` folder.4184191. **Write the HTML file in a single call.** Call `create_file` to write the entire HTML to420 `/mnt/user-data/outputs/{sector_slug}_sector_analysis.html` in **one** call.421 `{sector_slug}` is the lowercased, hyphenated sector name (e.g. `retail-apparel`,422 `oil-gas`).4232. **Preview the file.** Immediately after, use whatever tool is available in your current environment to present or display the final report to the user (e.g. a file presenter, inline renderer, or widget) at the end of running the skill.4243. **Show the widget.** Call `visualize:show_widget` to surface the rendered report visually425 to the user.4264. **One short follow-up sentence in chat.** Write a single brief sentence acknowledging the427 report is ready. Nothing more.428429**Strict prohibitions:**430431- **Never** emit the HTML as a fenced code block in the chat response.432- **Never** inline the HTML, JSON payload, or large excerpts of the report body in the chat433 message.