← Moody's CreditCONTENT HISTORY

Update to Moody's Credit

Snapshot Nov 3, 2026 · 18:24 UTC · version 3.0.1

Collection source: downloaded plugin package. These snapshots do not have a confirmed matching collection source. Differences in file lists alone do not establish changes to the package.

WHAT CHANGED

Payment or plan references changed

Full description — Now says: Credit MCP tools and news research. Use this skill whenever the user asks to analyze a sector, write a sector report, do an industry analysis, create a...

Observed in published text. Live prices and checkout terms have not been verified by this change.

Save Moody's Credit and check future changes in Following.

Up to 3 plugins free · no card required.

All fields and original values.

Full description

Before

Sep 30, 2026 · 22:55 UTC

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 secto...

After

Nov 3, 2026 · 18:24 UTC

Credit MCP tools and news 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 sec...

Skill instructions

Before

Sep 30, 2026 · 22:55 UTC

GenAI MCP tools and web research. Use this skill whenever the user asks to analyze a sector, write a sector internal research with supplemental web data across six structured sections plus an executive summary and citations. The workfl...

After

Nov 3, 2026 · 18:24 UTC

Credit MCP tools and news research. Use this skill whenever the user asks to analyze a sector, write a sector internal research and sovereign/macro research with supplemental news across six structured sections plus an executive summar...

Supporting files

Before

Sep 30, 2026 · 22:55 UTC

[{"relative_path":"__MACOSX/._SKILL.md","size_in_bytes":163},{"relative_path":"__MACOSX/._assets","size_in_bytes":163},{"relative_path":"__MACOSX/._evals","size_in_bytes":163},{"relative_path":"__MACOSX/._references","size_in_bytes":163}...

After

Nov 3, 2026 · 18:24 UTC

[{"relative_path":"agents/openai.yaml","size_in_bytes":571},{"relative_path":"assets/icon.png","size_in_bytes":1753},{"relative_path":"assets/template.html","size_in_bytes":6849},{"relative_path":"evals/evals.json","size_in_bytes":6439}]

Compare saved observations

Download comparison JSON

SKILL.md text changes

− removed · + added

--- before
+++ after
@@ -1,8 +1,8 @@
 ---
 name: sector-brief
 description: >
-  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
+  Produce a Sector Brief HTML report for any industry sector using Moody's Credit MCP tools
+  and news 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
@@ -13,84 +13,119 @@
 
 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 delivery**: gather all data, then write the entire filled
-HTML document to a single `.html` file in `/mnt/user-data/outputs/` and actively render it to
-the user with **both** `present_files` and `visualize:show_widget`. The rendered HTML artifact
-is the deliverable — writing the file without rendering it is a failed run.
+internal research and sovereign/macro research with supplemental news across six structured sections plus
+an executive summary and citations. Three sections carry an inline SVG chart: financial
+performance (revenue / EBITDA margin), industry structure (Porter's Five Forces), and sector
+outlook (sentiment track).
+
+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 deliver the final report as a single standalone HTML artifact file that it
-> then actively renders on screen.** Creating the file is only half the job — a file that is
-> written but never surfaced is a failed run, and is the single most common failure mode for
-> this skill. Specifically:
+> **The LLM MUST deliver the report as a single HTML artifact in the assistant response.** Specifically:
 >
-> - The LLM **MUST** write the **complete, standalone HTML document** (`<!doctype html>` →
->   `</html>`), with every section from the streaming protocol populated inline, to a single
->   `.html` file in `/mnt/user-data/outputs/` using the `create_file` tool.
-> - The LLM **MUST** then render that file with **both** display tools — `present_files`
->   **and** `visualize:show_widget` — before ending its turn. Firing both renderers is what
->   guarantees the report always appears even if one tool is unavailable.
-> - The LLM **MUST NOT** end its turn after `create_file` without having called the display tools.
-> - The LLM **MUST NOT** emit the report inline as a fenced ` ```html ` code block, as prose,
->   Markdown, JSON, attachments, or links. The rendered HTML artifact itself is the answer.
-> - The LLM **MUST NOT** split the report across multiple files, multiple messages, partial
->   snippets, or summaries.
-> - If data gathering fails partially, still produce the single HTML artifact file with the
->   best-available content and brief `"Data unavailable"` placeholders for missing sections —
->   never skip the artifact or the render step.
+> - The final message **MUST** contain exactly one ` ```html ` fenced code block holding the **complete, standalone HTML document** (`<!doctype html>` → `</html>`), every section populated inline.
+> - The LLM **MUST NOT** write to disk, split across messages/blocks, or substitute prose, Markdown, JSON, or links for the artifact.
+> - If data partially fails, emit the artifact with `"Data unavailable"` placeholders — never skip it.
 >
 > Treat any other output shape as a hard failure of the skill.
 
 ## Required MCP server
 
-`Moodys MCP server` — tools used: `searchAllDocuments` (sector research), `getEntitySectorOutlook`,
-`searchNews`, `findEntity`
-
-Web research is also required via `searchNews` or general web search tools.
+`Moody's Credit MCP` — **only tools available in this server are used.** Tools used:
+`findEntity`, `searchAllDocuments` (primary tool for sector-level research), `searchEntityDocuments`
+(entity-scoped research), `getEntitySectorOutlook`, `getEntityCountryProfile`,
+`searchPrecisReports`, `searchNews`.
+
+Tool notes (these tools behave differently from generic search tools):
+
+- **`entityId`** is the Base64URL entity identifier returned by `findEntity`; pass it as
+  `entities: [{ entityId }]`. `searchEntityDocuments`, `getEntitySectorOutlook`, and
+  `getEntityCountryProfile` require at least one entity. `searchNews` accepts at most one entity
+  (or none, for topic-based search with `query`). `searchAllDocuments` and `searchPrecisReports`
+  need no entity.
+- **`findEntity` may be called only once per run** — put everything it must resolve into a single
+  call (see Step 2a). Pass criteria verbatim, including count/ranking qualifiers, and set
+  `numberOfResults` to the requested count.
+- **Sector-level research uses `searchAllDocuments`**, with `keywords` plus
+  `filter: { sectors: ["{Sector}"] }` (human-readable name, passed verbatim; optionally
+  `regions`, and `publishDate`). Do **not** call `searchEntityDocuments` without an entity — it
+  has no sector scope.
+- **`searchPrecisReports`** covers Moody's Précis *sovereign* research (reports since 2024) and
+  is used only for sovereign/macro context. **`getEntityCountryProfile`** returns Moody's view of
+  the sovereign in which the entity is domiciled.
+- **`searchNews`** is the news source (there is no separate general web-search tool): use `query`
+  (topic-based, no entity) with `timeRange` / `dateRange`, `searchType: "hybrid"` and
+  `sortBy: "recency"` as appropriate.
+- Whenever data from a tool refers to a rating, state clearly whether it is a rating or an
+  implied rating and its type (e.g. Long Term Rating, PD Implied Rating) — never conflate them.
+- There is **no calculator, macro time-series, or web-search tool** in this server. Do not call
+  `calculator`, `getMacroEconomicTimeSeries`, or `webSearch`. Do arithmetic (derived figures,
+  chart geometry) with bash or Python in the code environment, never mentally. Concrete macro
+  figures must come only from retrieved Moody's research, Précis reports, country profiles, or
+  news — never from memory.
 
 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.
-
-## Shared chrome & citations
-
-Before emitting, read [`references/shared-template.md`](references/shared-template.md) (page
-chrome: cover, TOC, section block, sources-section wrapper, footer, outlook-badge, design
-tokens) and [`references/shared-citations.md`](references/shared-citations.md) (citation
-numbering, hyperlinking, source data shape, markup snippets). Both are **authoritative** — do
-not invent, duplicate, or restyle anything they already define. The canonical CSS is already
-inlined in `assets/template.html` between the `/* BEGIN/END shared-template-css */` and
-`/* BEGIN/END shared-citations-css */` markers; never re-copy it at emit time.
-
-The rest of this section is the skill-specific binding.
-
-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.
+- `assets/template.html` — pre-styled scaffold with all CSS inlined, the Moody's cover, a
+  baked-in static 6-item table of contents plus a Citations entry, 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.
+- `evals/evals.json` — evaluation prompts and assertions for this skill.
+
+## Template
+
+Read `assets/template.html` once before emitting. The document chrome (Source Sans Pro font
+import, reset, cover, table of contents, section block, sources wrapper, outlook-badge, footer)
+is **already inlined** in that file, using the `cover-simple` cover with `body { font-size: 13px }`
+and `.page { max-width: 900px }`. Copy it verbatim; do not re-define or restyle any of it.
+Outlook badges, if used, must use the canonical pastel variants (`stable` / `positive` /
+`negative`) — no solid-fill or inline-color overrides.
+
+## Citations (shared)
+
+Before emitting any `[n]` reference inline or the end-of-document Citations block, **read both**:
+1. [`skills/shared/citations/SKILL.md`](../shared/citations/SKILL.md) — authoring rules
+   (numbering, hyperlinking, source data shape, carve-outs).
+2. [`skills/shared/citations/assets/template.html`](../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** of `<style id="shared-citations-css">` into the marker region `/* BEGIN shared-citations-css … */` … `/* END shared-citations-css */` located at the end of the template's `<style>` block.
 
 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.
 
+Citation authoring rules for this skill:
+
+- **One list only.** The sources list renders inside the report, in the Citations section
+  (`#sa-sources`, above the report footer, inside `.page`) — never after the footer, below the
+  `.page` wrapper, or at the end of the file. Number it `[1]…[N]` continuously across the whole
+  document in order of first appearance; no per-section source blocks. Reuse the same number
+  when the same source is cited twice.
+- Place each inline reference immediately after the claim it supports. **Never invent a source
+  or id** — if a fact cannot be cited precisely, leave it uncited.
+- Source rows: Moody's items use publisher `Moody's Ratings` (or `Moody's Research`) with the
+  date written out (e.g. `June 1, 2026`); news items (from `searchNews`) use the real article
+  headline as the title, the outlet/publisher name, and the publication date. A source with no
+  URL renders its title as plain text.
+  The inline `[n]` must match the row number of the same source in `#sa-sources`.
+
 ## 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.
+If the user specifies a sub-sector like "Luxury Retail" (or a custom sector name), use it
+as-is for focused analysis. There is no Report Date or analyst-notes parameter: the report date
+is always today's date.
 
 ---
 
@@ -154,80 +189,307 @@
 
 ---
 
-## Step 2 — Research phase (parallel)
-
-Fire ALL of the following searches in a **single parallel batch**:
+## Step 2 — Research phase
 
-### Moody's internal research (via MCP)
+### 2a — Resolve representative rated companies (one `findEntity` call)
 
-| Search | Purpose |
-|--------|---------|
-| `searchAllDocuments` with criteria: "{Sector} Sector Overview" | Sector definition, methodology, key activities |
-| `searchAllDocuments` with criteria: "Economic factors impact on {Sector} Sector" | Macro-economic context |
-| `searchAllDocuments` with criteria: "{Sector} Sector, industry" | Financial performance data |
-| `searchAllDocuments` with criteria: "{Sector} Sector Risk and challenges" | Risk analysis |
-| `searchAllDocuments` with criteria: "{Sector} sector Outlook" | Sector outlook |
-| `getEntitySectorOutlook` for a major company in the sector | Formal Moody's outlook |
+Call `findEntity` **once**, with `data` set to criteria for the sector's largest Moody's-rated
+companies, passed verbatim with the ranking qualifier, e.g. `"top 10 largest {Sector} companies
+by revenue"`, and `numberOfResults: 10`. Keep the returned entities in rank order (and the
+`sortedBy` basis the response names). The first (top-ranked) entity is the representative entity
+that anchors `getEntitySectorOutlook` and `getEntityCountryProfile`; the remaining entities are
+fallbacks for the outlook lookup and a Moody's-sourced list of key players. Build the player list
+only from entities `findEntity` returned — never add companies from memory — and report any
+shortfall in count rather than padding it. You are not writing a company profile. Do not
+fabricate financial or credit data at this stage.
+
+### 2b — Research batch (parallel)
+
+Once the entities are resolved, fire ALL of the following in a **single parallel batch**
+(`{Sector}` is passed to `searchAllDocuments` as `filter.sectors: ["{Sector}"]`, in addition to the
+keywords shown):
+
+#### Moody's research and data
+
+| Call | Purpose |
+|------|---------|
+| `searchAllDocuments` keywords "{Sector} Sector Overview" | Sector definition, methodology, key activities |
+| `searchAllDocuments` keywords "{Sector} Sector, industry" | Sector overview, key players, geographic scope, and industry structure (competition, supply chain, barriers to entry, concentration) |
+| `searchAllDocuments` keywords "Economic factors impact on {Sector} Sector" | Macro-economic context, including regulatory developments |
+| `searchAllDocuments` keywords "{Sector} sector aggregate revenue, profit margins, return on equity, medians" | Sector-level financial metrics |
+| `searchAllDocuments` keywords "{Sector} sector Outlook" | Sector outlook and financial-outlook signals |
+| `searchAllDocuments` keywords "{Sector} Sector Risk and challenges" | Risk analysis and financial-stress signals |
+| `searchPrecisReports` keywords for the dominant macro themes (e.g. growth, inflation, interest rates, trade/tariffs) for the sector's main region(s) | Sovereign/macro context for Economic Indicators and Global Trends |
+| `getEntityCountryProfile` for the representative entity | Sovereign context (fiscal strength, institutional framework, economic resilience) |
+| `getEntitySectorOutlook` using the representative entity's `entityId` | Formal Moody's outlook direction and effective date (see "Sector outlook sourcing" below) |
 
-### Web research (via searchNews or web tools)
+#### News research (via `searchNews`, topic-based, no entity)
 
 | 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 |
+| "{Sector} industry key players market share" | Key players for overview and structure |
+| "{Sector} sector key regions growth markets" | Geographic scope |
+| "{Sector} sector revenue profit margins return on equity" | Financial metrics |
+| "{Sector} sector competition benchmark barriers to entry supply chain" | Industry structure, barriers to entry, supply-chain structure, concentration |
+| "{Sector} sector regulation tariffs trade policy" | Regulatory Environment |
+| "{Sector} sector emerging risks" | Risks and Challenges; corroborate specific risk claims |
+| "{Sector} sector outlook" | Corroborate or nuance the sector outlook |
+
+Optionally, to benchmark named participants, call `getEntityFinancials_v2` for individual
+top-ranked entities and report each company's figures **as returned, attributed to that company**.
+Never sum, average, or otherwise combine company figures into a sector aggregate — sector-level
+figures (aggregate revenue, margins, medians) must be stated in a retrieved source.
+
+Do any derived arithmetic (YoY deltas, CAGR, margin changes) in bash or Python — never estimate
+mentally.
+
+### Sector outlook sourcing (Chart D must be produced)
+
+Section 6 and Chart D need a Moody's direction (Positive / Stable / Negative) and an effective
+date. Resolve them in this order and stop at the first step that yields both:
+
+1. `getEntitySectorOutlook` with the representative entity's `entityId`.
+2. If that call errors, returns nothing usable, or the record is too large to read: **do not give
+   up and do not write an "unable to state" narrative.** Retry once with the next entity from the
+   `findEntity` list (do not call `findEntity` again), then continue to step 3.
+3. `searchAllDocuments` with keywords "{Sector} sector Outlook" and "{Sector} Sector Overview"
+   (with `filter.sectors`; `publishDate` mode `latest` first, widening if needed), and
+   `searchEntityDocuments` scoped to the representative entity with the same queries.
+   Moody's sector publications state the outlook and date in the title or summary (e.g. "…
+   Global: Outlook negative as …", dated June 2026) — read the direction and publication date
+   from there.
+4. `searchNews` (topic-based) for corroboration of the direction and the date.
+
+Only if all four fail may the section say the direction could not be confirmed, in **one**
+sentence, and only then use the `<p>Chart data unavailable</p>` fallback. As soon as a direction
+is known, Chart D is drawn — a news-based finding with a clearly dated source is enough. Always
+state that this is a *sector outlook*, not an issuer rating or implied rating (never conflate
+the two). Keep the outlook paragraphs analytical (drivers, regional nuance); do not describe
+tooling limits.
 
 ---
 
 ## Step 3 — Synthesize all sections
 
-Use Moody's internal research as the **primary foundation** for every section. Web sources
+Use Moody's internal research as the **primary foundation** for every section. News results
 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
-[references/shared-citations.md](references/shared-citations.md).
+[skills/shared/citations/SKILL.md](../shared/citations/SKILL.md).
 
-Author the Executive Summary and Sections 1–6 per the per-section content specs in
-[`references/report-spec.md`](references/report-spec.md) (see `## Section content specs`).
-Each section's required subsections — and the inline SVG charts that attach to Sections 3, 4,
-and 6 — are defined there. Populate the `#sa-*` content targets listed in Step 4.
+### Section 1: Sector Overview
+
+Four subsections:
+1. **Description of the Sector** — What the sector does and its position in the broader economy;
+   define the industry, key activities, product/service categories, and business-model
+   differences
+2. **Market Size and Growth Trends** — Aggregate market size (revenue, volume) and recent growth
+   trajectory, with concrete figures where available; historical growth rates, regional growth
+   data
+3. **Key Players** — The sector's major companies and their approximate relative scale/market
+   share, and roles within the sector (company list drawn from the `findEntity` ranked results
+   and Moody's research; state the ranking basis)
+4. **Geographic Scope** — Where the sector's activity is concentrated globally; key regions of
+   activity, potential growth markets, region-specific trends
+
+### Section 2: Macro-Economic Context
+
+Three subsections:
+1. **Economic Indicators** — The macro variables most material to this sector (rates, inflation,
+   GDP growth, demand drivers, commodity prices, consumer spending/confidence), with concrete
+   current values/trends
+2. **Regulatory Environment** — The regulatory regime(s) governing the sector, laws, compliance
+   risks, tariff/trade policy, and any notable recent or pending changes
+3. **Global Trends and External Factors** — Structural/secular forces (trade, technology,
+   demographics, geopolitics, channel evolution) shaping the sector
+
+### Section 3: Financial Performance Analysis
+
+Three subsections with **mandatory quantitative data**:
+1. **Sector-Level Financial Metrics** — Aggregate revenue, margins, leverage, return on equity,
+   or other sector-defining numbers. Every metric must include the actual number with
+   $/€/£/% figures (e.g., "Aggregate revenue of $35.2 trillion in 2025") followed by analytical
+   commentary
+2. **Historical Trends** — 3–5 year trend in the same metrics: demand/earnings trajectories,
+   recent growth rates. **Chart A follows this subsection's prose.**
+3. **Projected Financial Outlook** — Forward-looking financial trajectory: forecast key metrics,
+   earnings outlook, key drivers shaping the near term, structural offsets and strategic
+   responses
+
+### Section 4: Industry Structure and Dynamics
+
+Four subsections:
+1. **Main Participants** — The sector's principal categories of participants (not just company
+   names — roles in the value chain), with benchmark companies, market share, and significance
+2. **Supply Chain Analysis** — Upstream/downstream structure and dependencies: suppliers,
+   manufacturers, distributors, customers, key pressure points
+3. **Competitive Landscape** — Porter's Five Forces analysis. Rate each of the five forces
+   (Threat of New Entrants, Bargaining Power of Suppliers, Bargaining Power of Buyers, Threat of
+   Substitutes, Competitive Rivalry) as **High**, **Moderate**, or **Low**, with a
+   Moody's-grounded sentence of justification for each. **Chart C follows this subsection's
+   prose.**
+4. **Barriers to Entry** — Capital, regulatory, brand, or technology barriers facing new
+   entrants (and market saturation)
+
+### Section 5: Risks and Challenges
+
+Five subsections:
+1. **Operational Risks** — Execution, supply, technology, or capacity risks specific to the
+   sector (supply-chain disruptions, labor shortages, working capital)
+2. **Regulatory Risks** — Pending or existing regulation that could affect sector economics
+   (compliance requirements, policy changes, tariff exposure)
+3. **Market Risks** — Demand, pricing, or competitive risks (demand volatility, category
+   weakness)
+4. **Financial Performance and Capital Structure** — Leverage, refinancing, and capital-access
+   risks across the sector (default outlook, margin pressure, deleveraging)
+5. **Environmental and Social Risks** — Climate, ESG, labor, or reputational risks material to
+   the sector (social/governance pressures)
+
+### Section 6: Sector Outlook
+
+**Paragraph-only — `<p>` tags only, no bullets and no subsection-title headers.** State the
+Moody's outlook (Positive, Stable, Negative) and its effective date in the opening sentence
+(sourced per "Sector outlook sourcing" above). Then provide 2–3 well-developed paragraphs of
+supporting analysis — primary drivers, regional nuances, key factors and considerations.
+**Chart D follows the outlook paragraphs.** Always state clearly that this is a sector outlook,
+not an issuer rating or implied rating.
+
+### Executive Summary
+
+Write after all other sections are complete, from their finished content. Half-page maximum.
+**`<p>` tags only — flowing paragraphs, no bullet points and no subsection headers.**
+Synthesize the defining characteristics of the sector, its financial trajectory, its principal
+risks, and Moody's outlook direction into one cohesive narrative — do not simply restate each
+section in turn. Do not introduce any claim, figure, or citation that is not already present in
+the finished sections; the summary synthesizes, it does not conduct new research.
 
 ### Sources
 
 Collect all sources. The source data shape (`id`, `title`, `source`, `date`, `url`) and the
 end-of-document Citations row markup are defined in
-[references/shared-citations.md](references/shared-citations.md).
+[skills/shared/citations/SKILL.md](../shared/citations/SKILL.md).
 
 ---
 
 ## Inline SVG Charts — Section Instructions
 
-This report embeds three inline SVG charts (Chart A in Section 3, Chart C in Section 4,
-Chart D in Section 6). Before emitting them, read
-[`references/report-spec.md`](references/report-spec.md) for each chart's type, axes,
-colors, `viewBox`, placement, and the **mandatory pre-computation requirement** (compute
-every coordinate programmatically with bash/Python — never mentally). If source data for a
-chart is unavailable, emit a `<p>Chart data unavailable</p>` placeholder rather than
-omitting it silently.
-
----
-
-## Step 4 — Assemble the complete HTML artifact
+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) and share the shell and rules below. If source data for any chart is unavailable,
+emit `<p>Chart data unavailable</p>` instead of a fabricated chart — never omit silently.
+
+**Shared shell (Charts A, C, D):**
+
+- Root: `<svg viewBox="0 0 700 H" xmlns="http://www.w3.org/2000/svg" style="width:100%;max-width:700px;display:block;margin:16px 0;">`
+- Inside it: `<style>.chX text { font-family: 'Source Sans Pro', Arial, sans-serif; }</style>`, then
+  `<title>…</title>` (for accessibility), then `<g class="chX">` (X = A, C or D) wrapping
+  everything else.
+- First element in the group: background `<rect x="0" y="0" width="700" height="H" fill="#f8fafd" rx="4"/>`.
+- Chart title: centered at x=350, `font-size="11" font-weight="700" fill="#003087"` (y given per chart).
+- Never use a bare minus in any label — `(-X)` form only.
+- Do not use multi-value `rx` (e.g. `rx="3 0 0 3"`); it is invalid SVG.
+
+### Chart A — Revenue bars + EBITDA margin line (Section 3, `viewBox="0 0 700 320"`, class `chA`)
+
+Insert immediately after the Historical Trends subsection prose.
+
+**Data sourcing:** the yearly aggregate sector revenue and EBITDA margin values must be stated in
+a retrieved Moody's publication or news source — never built by summing or averaging individual
+companies from `getEntityFinancials_v2`, and never estimated. If fewer than 3 years of sourced
+sector-level figures are available, emit `<p>Chart data unavailable</p>` instead of the chart.
+
+Title text (y=18): `{Sector}: Revenue ($T) & EBITDA Margin (%)` (escape `&` as `&amp;`).
+Use the last 3–5 fiscal years; `n` = number of years. Unit is `$T` (one decimal) when the largest
+revenue is ≥ $1T, otherwise `$B`.
+
+Layout (all of it computed with bash or Python — exact arithmetic, since no calculator tool is
+available — before writing any markup; never place mentally-estimated coordinates):
+
+- Plot area: x from 65 to 635, y from 40 (top) to 260 (baseline). Height 220, width 570.
+- Left axis `L_max`: smallest "nice" value (1, 2, 2.5, 5 × 10^k) that is ≥ 1.05 × the largest
+  revenue and divides into 5 equal steps. Right axis `R_max`: smallest multiple of 5 that is
+  ≥ 1.25 × the largest margin (e.g. 12.5% → 20%). If any margin is negative, emit the
+  unavailable placeholder instead.
+- Axis lines: `<line>` left (x=65, y 40→260) and baseline (y=260, x 65→635), stroke `#dde3ee`;
+  right axis `<line x1="635" y1="40" x2="635" y2="260" stroke="#0073CF" stroke-width="1" stroke-dasharray="2,2"/>`.
+- Five dashed gridlines at y = 216, 172, 128, 84, 40 (`stroke="#eef1f6" stroke-dasharray="3,3"`), x 65→635.
+- Left tick labels (6, from `$0` to `L_max`) at x=58, `text-anchor="end"`, `font-size="10" fill="#6b7fa3"`,
+  y = gridline y + 3. Right tick labels (0% to `R_max`) at x=642, `text-anchor="start"`,
+  `font-size="10" fill="#0073CF"`, y = gridline y + 3, same six positions.
+- Axis titles, `font-size="10"`: `Revenue ($T)` fill `#003087` at x=18,y=155 with
+  `transform="rotate(-90,18,155)"`; `EBITDA Margin (%)` fill `#0073CF` at x=680,y=155 with
+  `transform="rotate(90,680,155)"`; both `text-anchor="middle"`.
+- Bars: slot = 570 / n; center_i = 65 + slot × (i + 0.5); bar width = min(80, 0.6 × slot);
+  `x = center_i − width/2`; `height = revenue / L_max × 220`; `y = 260 − height`;
+  `fill="#003087" opacity="0.85"`.
+- Bar value label: `x = center_i`, `y = bar y − 4.4`, `text-anchor="middle" font-size="10" fill="#003087"`, e.g. `$3.4T`.
+- Year labels: `x = center_i`, `y=275`, `text-anchor="middle" font-size="11" fill="#333"`.
+- Margin line: `<polyline points="…" fill="none" stroke="#0073CF" stroke-width="2.5" stroke-linejoin="round"/>`
+  through `(center_i, 260 − margin / R_max × 220)`; one `<circle r="4" fill="#0073CF">` per
+  point; label above each point at `y = cy − 4.5`, `text-anchor="middle" font-size="9" font-weight="700" fill="#0073CF"
+  stroke="#fff" stroke-width="3" paint-order="stroke"`, e.g. `12.5%` (the white outline keeps the
+  label readable where the line crosses the navy bars).
+- Legend (bottom): `<rect x="200" y="295" width="12" height="10" fill="#003087" opacity="0.85"/>` +
+  text `Revenue ($T)` at x=217,y=304 (`font-size="10" fill="#333"`); then
+  `<line x1="290" y1="300" x2="310" y2="300" stroke="#0073CF" stroke-width="2.5"/>`,
+  `<circle cx="300" cy="300" r="3" fill="#0073CF"/>`, text `EBITDA Margin (%)` at x=316,y=304
+  (`font-size="10" fill="#0073CF"`).
+
+### Chart C — Porter's Five Forces scored bars (Section 4, `viewBox="0 0 700 220"`, class `chC`)
+
+Insert immediately after the Porter's Five Forces prose.
+
+Title text (y=16): `Porter's Five Forces — {Sector}`. Scores: High=3, Moderate=2, Low=1.
+These coordinates are fixed; no recalculation is needed.
+
+- Row order, top to bottom: Competitive Rivalry, Threat of New Entrants, Supplier Power,
+  Buyer Power, Threat of Substitutes. Bar `y` = 25, 63, 101, 139, 177; bar `height="28" rx="3"`.
+- Bars start at `x="195"`. Width by rating: **Low 158.3, Moderate 316.7, High 475.0**
+  (bar end x = 353.3 / 511.7 / 670.0). Fill: High `#C0392B`, Moderate `#E67E22`, Low `#27AE60`.
+- Force label: `x="190"`, `y = bar y + 19`, `text-anchor="end" font-size="11" fill="#333"`.
+- Rating text inside the bar: `x = bar end x − 5`, same `y`, `text-anchor="end" font-size="10"
+  font-weight="700" fill="#fff"`, content `High` / `Moderate` / `Low`.
+- Bottom axis: `<line x1="195" y1="210" x2="670" y2="210" stroke="#aaa" stroke-width="1"/>`; tick
+  `<line>`s (y 207→213, `stroke="#aaa"`) at x = 353.3, 511.7, 670.0 with labels `Low`, `Moderate`,
+  `High` at y=220, `text-anchor="middle" font-size="9" fill="#888"`.
+- The ratings drawn must match the High/Moderate/Low ratings written in the prose above it. If
+  the five-forces ratings cannot be determined from source data, emit the unavailable placeholder.
+
+### Chart D — Outlook sentiment track (Section 6, `viewBox="0 0 700 120"`, class `chD`)
+
+Insert immediately after the outlook paragraphs.
+
+Title text (y=16): `Moody's Sector Outlook — {Sector}`. Coordinates are fixed; no recalculation is needed.
+
+- Three zone rects, `y="55" height="35"`, each `width="206.7"`: Negative `x="40"` fill `#C0392B`;
+  Stable `x="246.7"` fill `#2980B9`; Positive `x="453.3"` fill `#27AE60`.
+- Zone labels, `y="77" text-anchor="middle" font-size="12" font-weight="700" fill="#fff"`, at
+  x = 143.3 (Negative), 350.0 (Stable), 556.7 (Positive).
+- Marker: a downward triangle above the active zone, filled with that zone's color:
+  Negative `points="131.3,37 155.3,37 143.3,55"`; Stable `points="338,37 362,37 350,55"`;
+  Positive `points="544.7,37 568.7,37 556.7,55"`.
+- Caption below the track: `x` = the active zone center above, `y="110"`, `text-anchor="middle"
+  font-size="10" font-weight="700"`, fill = active zone color, content `&#9660; {Outlook} — {Month YYYY}`
+  (the outlook's effective date).
+- The marker must agree with the outlook stated in the section's opening sentence.
+
+---
+
+## Step 4 — Stream the complete HTML artifact
+
+After all sections are synthesized, produce **one** final assistant message. The message contains:
+
+1. A one-line summary sentence (e.g. `Sector Brief for {Sector}:`).
+2. 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.
 
-After all sections are synthesized, write the **entire filled `template.html` document** — with
-every element from the streaming protocol populated in place — to a single `.html` file in
-`/mnt/user-data/outputs/`. The full required delivery sequence (`create_file` → `present_files`
-→ `visualize:show_widget` → one short sentence) is specified in the **Output and presentation**
-section below; follow it exactly.
+The code block **must**:
 
-The HTML file **must**:
-
-- Be written in a single `create_file` call (no progressive `StrReplace` edits, no multi-file
-  split).
+- 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
@@ -235,108 +497,89 @@
 
 ### Cover + footer
 
-1. `#sa-cover-title` — `<strong>{Sector}</strong><br>Analysis` (HTML, not plain text).
-2. `#sa-date` — report date string, e.g. `April 15, 2026`.
+1. `#sa-cover-title` — `<strong>{Sector}</strong><br>Sector Brief` (HTML, not plain text).
+2. `#sa-date` — today's date in `Month D, YYYY` form, e.g. `April 15, 2026`.
 3. `#sa-footer-date` — same date string.
 
-### Section headings
-
-4. `#sa-overview-title` — override the default "Sector Overview" with
-   `{Sector} — Sector Overview`.
+The "Sector Overview" heading (`#sa-overview-title`) keeps its default text.
 
 ### 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):
+`<strong class="subsection-title">…</strong>` only — no other block tags, apart from the inline
+chart SVGs):
 
-5. `#sa-exec` — Executive Summary. Flowing paragraphs only, no bullets.
-6. `#sa-overview` — Section 1 body with four `<strong class="subsection-title">` subheaders.
-7. `#sa-macro` — Section 2 body with three subheaders.
-8. `#sa-financial` — Section 3 body with three subheaders. Every metric must include a
-   concrete number.
-9. `#sa-structure` — Section 4 body with four subheaders. Porter's Five Forces must use
-   High / Moderate / Low ratings per force.
-10. `#sa-risks` — Section 5 body with five subheaders.
-11. `#sa-outlook` — Section 6 body. Lead with the Moody's outlook (Positive / Stable /
-    Negative) and date, then 2–3 paragraphs. Paragraph form only.
+4. `#sa-exec` — Executive Summary. `<p>` paragraphs only; no bullets, no subsection headers.
+5. `#sa-overview` — Section 1 body with four `<strong class="subsection-title">` subheaders.
+6. `#sa-macro` — Section 2 body with three subheaders.
+7. `#sa-financial` — Section 3 body with three subheaders, followed by Chart A after the
+   Historical Trends prose. Every metric must include a concrete number.
+8. `#sa-structure` — Section 4 body with four subheaders. Porter's Five Forces must use
+   High / Moderate / Low ratings per force, followed by Chart C.
+9. `#sa-risks` — Section 5 body with five subheaders.
+10. `#sa-outlook` — Section 6 body. `<p>` paragraphs only (no bullets, no subheaders): lead with
+    the Moody's outlook (Positive / Stable / Negative) and effective date, then 2–3 paragraphs,
+    followed by Chart D.
 
 ### Sources container
 
-12. `#sa-sources` — end-of-document Citations rows. One `<div class="source-item">` per
+11. `#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
-    [references/shared-citations.md](references/shared-citations.md). Apply that file's rules
+    [skills/shared/citations/SKILL.md](../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 `<ul><li>…</li></ul>` for bullet points (nested `<ul>` for sub-bullets) in the sections
+  that allow them.
 - 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.
+  each section that has them. Do not repeat the top-level section title — the template already
+  renders it.
 - Emit inline citations per
-  [references/shared-citations.md](references/shared-citations.md).
+  [skills/shared/citations/SKILL.md](../shared/citations/SKILL.md).
 - Escape any `&`, `<`, `>` that appear in the narrative (`&amp;`, `&lt;`, `&gt;`).
 
 ---
 
 ## 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.
+- Run ALL research searches in a single parallel batch (after the representative entity is
+  resolved).
+- Moody's data is the foundation — news supplements. Attribute news 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.
+- Compute derived figures and chart geometry with bash or Python — never by eye.
+- Executive Summary and Sector Outlook are paragraph-only — no bullets, no subsection headers.
 - Citations follow the shared citations skill — read
-  [references/shared-citations.md](references/shared-citations.md) before authoring any `[n]`
+  [skills/shared/citations/SKILL.md](../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.
+Use `(-X)` for ALL negatives: `(-9%)`, `(-1.2pp)`, `(-$3.4B)`, `(-250 bps)`. Never use bare minus (`-9%`), en-dash (`–9%`), or parentheses without minus (`(9%)`). Apply to growth rates, margin changes, YoY deltas, and negative monetary values — including inside chart labels.
 
 ---
 
 ## Output and presentation (required final steps)
 
-> ## ⚠️ CRITICAL — THE SKILL IS NOT COMPLETE UNTIL THE REPORT IS VISIBLY RENDERED
->
-> Writing the file is **not** delivery. After you write the HTML you **must** actively render
-> it with every display tool available, in order, before you say anything else. Do not end
-> your turn until the rendered report is on screen.
-
-Follow this exact sequence. Do not skip a step, reorder, or substitute alternatives. When
-updating this skill, do not delete or modify any other file in the `skills/sector-brief/`
-folder.
-
-1. **Write the HTML file in a single call.** Call `create_file` to write the entire standalone
-   HTML document (`<!doctype html>` → `</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`). No progressive
-   edits, no multi-file split.
-2. **Present the file.** Immediately call `present_files` on that exact path to surface the
-   artifact to the user.
-3. **Show the widget.** Immediately call `visualize:show_widget` on the same file to render the
-   report visually. Call this even if `present_files` already succeeded — firing both renderers
-   is what guarantees the report always appears.
-4. **Confirm in one short sentence.** Only after the renderers return, add a single brief
-   sentence in chat (e.g. `Sector Brief for {Sector} — the report is available above as a
-   self-contained HTML artifact.`). Nothing more.
-
-If a display tool call fails or is unavailable, immediately try the other one rather than
-stopping. Never end your turn at step 1.
+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.
+
+1. **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`).
+2. **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.
+3. **Show the widget.** Call `visualize:show_widget` to surface the rendered report visually
+   to the user.
+4. **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 ` ```html ` code block in the chat response.
+- **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.
-- **Never** end your turn after `create_file` without having called both display tools.
Full technical diff · 3 changed fields

changed /description

BEFORE
"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\"."
AFTER
"Produce a Sector Brief HTML report for any industry sector using Moody's Credit MCP tools and news 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\".\n"

changed /included_files

BEFORE
[
  {
    "relative_path": "__MACOSX/._SKILL.md",
    "size_in_bytes": 163
  },
  {
    "relative_path": "__MACOSX/._assets",
    "size_in_bytes": 163
  },
  {
    "relative_path": "__MACOSX/._evals",
    "size_in_bytes": 163
  },
  {
    "relative_path": "__MACOSX/._references",
    "size_in_bytes": 163
  },
  {
    "relative_path": "__MACOSX/assets/._template.html",
    "size_in_bytes": 163
  },
  {
    "relative_path": "__MACOSX/evals/._evals.json",
    "size_in_bytes": 163
  },
  {
    "relative_path": "__MACOSX/references/._report-spec.md",
    "size_in_bytes": 163
  },
  {
    "relative_path": "__MACOSX/references/._shared-citations.md",
    "size_in_bytes": 163
  },
  {
    "relative_path": "__MACOSX/references/._shared-template.md",
    "size_in_bytes": 163
  },
  {
    "relative_path": "assets/template.html",
    "size_in_bytes": 11247
  },
  {
    "relative_path": "evals/evals.json",
    "size_in_bytes": 5352
  },
  {
    "relative_path": "references/report-spec.md",
    "size_in_bytes": 6010
  },
  {
    "relative_path": "references/shared-citations.md",
    "size_in_bytes": 5814
  },
  {
    "relative_path": "references/shared-template.md",
    "size_in_bytes": 8111
  }
]
AFTER
[
  {
    "relative_path": "agents/openai.yaml",
    "size_in_bytes": 571
  },
  {
    "relative_path": "assets/icon.png",
    "size_in_bytes": 1753
  },
  {
    "relative_path": "assets/template.html",
    "size_in_bytes": 6849
  },
  {
    "relative_path": "evals/evals.json",
    "size_in_bytes": 6439
  }
]

changed /skill_md_contents

BEFORE
"---\nname: sector-brief\ndescription: >\n  Produce a Sector Brief HTML report for any industry sector using Moody's GenAI MCP tools\n  and web research. Use this skill whenever the user asks to analyze a sector, write a sector\n  report, do an industry analysis, create a sector overview, or generate a sector deep-dive.\n  Trigger even if they just name a sector and mention \"analysis\", \"overview\", \"outlook\", \"report\",\n  or \"deep-dive\". Also trigger for phrases like \"what's happening in the retail sector\" or\n  \"give me a sector breakdown for aerospace\".\n---\n\n# Sector Brief Skill\n\nGenerates a professional HTML report (styled like a Moody's sector brief document) for a\nspecified industry sector. The report is research-heavy and text-driven, combining Moody's\ninternal research with supplemental web data across six structured sections plus an executive\nsummary and citations.\n\nThe workflow is **single-artifact delivery**: gather all data, then write the entire filled\nHTML document to a single `.html` file in `/mnt/user-data/outputs/` and actively render it to\nthe user with **both** `present_files` and `visualize:show_widget`. The rendered HTML artifact\nis the deliverable — writing the file without rendering it is a failed run.\n\n> ## ⚠️ CRITICAL — NON-NEGOTIABLE OUTPUT CONTRACT\n>\n> **The LLM MUST deliver the final report as a single standalone HTML artifact file that it\n> then actively renders on screen.** Creating the file is only half the job — a file that is\n> written but never surfaced is a failed run, and is the single most common failure mode for\n> this skill. Specifically:\n>\n> - The LLM **MUST** write the **complete, standalone HTML document** (`<!doctype html>` →\n>   `</html>`), with every section from the streaming protocol populated inline, to a single\n>   `.html` file in `/mnt/user-data/outputs/` using the `create_file` tool.\n> - The LLM **MUST** then render that file with **both** display tools — `present_files`\n>   **and** `visualize:show_widget` — before ending its turn. Firing both renderers is what\n>   guarantees the report always appears even if one tool is unavailable.\n> - The LLM **MUST NOT** end its turn after `create_file` without having called the display tools.\n> - The LLM **MUST NOT** emit the report inline as a fenced ` ```html ` code block, as prose,\n>   Markdown, JSON, attachments, or links. The rendered HTML artifact itself is the answer.\n> - The LLM **MUST NOT** split the report across multiple files, multiple messages, partial\n>   snippets, or summaries.\n> - If data gathering fails partially, still produce the single HTML artifact file with the\n>   best-available content and brief `\"Data unavailable\"` placeholders for missing sections —\n>   never skip the artifact or the render step.\n>\n> Treat any other output shape as a hard failure of the skill.\n\n## Required MCP server\n\n`Moodys MCP server` — tools used: `searchAllDocuments` (sector research), `getEntitySectorOutlook`,\n`searchNews`, `findEntity`\n\nWeb research is also required via `searchNews` or general web search tools.\n\nIf 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.\n\n## Bundled files\n\n- `assets/template.html` — pre-styled scaffold with the Moody's cover, a baked-in static 6-item\n  table of contents, and empty fill-in targets (cover title, date, section-content divs, sources\n  container). Treat this file as the **read-only structural reference**: read it, fill it in\n  mentally, and emit the complete filled document in the final response.\n\n## Shared chrome & citations\n\nBefore emitting, read [`references/shared-template.md`](references/shared-template.md) (page\nchrome: cover, TOC, section block, sources-section wrapper, footer, outlook-badge, design\ntokens) and [`references/shared-citations.md`](references/shared-citations.md) (citation\nnumbering, hyperlinking, source data shape, markup snippets). Both are **authoritative** — do\nnot invent, duplicate, or restyle anything they already define. The canonical CSS is already\ninlined in `assets/template.html` between the `/* BEGIN/END shared-template-css */` and\n`/* BEGIN/END shared-citations-css */` markers; never re-copy it at emit time.\n\nThe rest of this section is the skill-specific binding.\n\nThis skill uses the **`cover-simple`** variant. Skill-specific overrides retained above the\nmarker region: **none** for SA (it inherits the canonical `body { font-size: 13px }` and\n`.page { max-width: 900px }` defaults). SA is the lightest of the four parent skills — almost\nall its visual chrome now lives in the shared layer. Any outlook-badge usage in this skill\n(e.g. for sector outlook indicators) must use the canonical pastel variants\n(`stable` / `positive` / `negative` / `review` / `na`) defined by the shared skill — no\nsolid-fill or inline-color overrides.\n\nThe prefix used for the end-of-document container in this skill is `sa`, so the container id\nis `#sa-sources`. This skill does not use the optional per-section `.section-citations` recap\ncomponent.\n\n## Parameters\n\nThe user should provide:\n- **Sector** (required — e.g., \"Retail & Apparel\", \"Aerospace/Defense\", \"Banking\")\n\nIf the user specifies a sub-sector like \"Luxury Retail\", use it as-is for focused analysis.\n\n---\n\n## Step 0 — Sector Picker (run before anything else)\n\nIf the user has not named a specific sector in their message, **stop** and call\n`ask_user_input_v0` with a single `single_select` question before proceeding. Do **not**\nbegin any research or template reading until the sector is confirmed.\n\n**Preamble:** \"Which Moody's-covered sector would you like to analyze? Select one below\nand I'll generate the full report.\"\n\n**Options:**\n\n- Aerospace & Defense\n- Automotive Manufacturing\n- Banking — Global\n- Building Materials & Construction\n- Chemicals\n- Commercial Real Estate & REITs\n- Consumer Products\n- Diversified Manufacturing\n- Food & Beverage\n- Forest Products & Paper\n- Gaming & Lodging\n- Healthcare — Hospitals & Health Systems\n- Healthcare — Medical Devices & Technology\n- Healthcare — Pharmaceuticals\n- Infrastructure & Project Finance\n- Insurance\n- Media & Entertainment\n- Metals & Mining\n- Oil & Gas — E&P\n- Oil & Gas — Integrated & Refining\n- Oil & Gas — Midstream & Pipeline\n- Packaging\n- Retail & Apparel\n- Shipping & Ports\n- Steel\n- Structured Finance — ABS/RMBS/CMBS\n- Technology — Hardware & Semiconductors\n- Technology — Software & Services\n- Telecommunications\n- Transportation & Logistics\n- Utilities — Electric\n- Utilities — Gas Distribution\n- Utilities — Water\n\nOnce the user selects, treat their choice exactly as if they had typed\n`Run a sector brief for {selected sector}` and continue from Step 1.\n\nIf the user already named a sector, **skip this step entirely** and go straight to Step 1.\n\n---\n\n## Step 1 — Read the template\n\nRead `assets/template.html` (relative to this skill directory) once. Keep its exact structure —\nCSS, `<head>`, cover, hardcoded TOC, section order, and element IDs — as the scaffold for the\nfinal artifact. Do **not** copy it to the workspace and do **not** open it.\n\n---\n\n## Step 2 — Research phase (parallel)\n\nFire ALL of the following searches in a **single parallel batch**:\n\n### Moody's internal research (via MCP)\n\n| Search | Purpose |\n|--------|---------|\n| `searchAllDocuments` with criteria: \"{Sector} Sector Overview\" | Sector definition, methodology, key activities |\n| `searchAllDocuments` with criteria: \"Economic factors impact on {Sector} Sector\" | Macro-economic context |\n| `searchAllDocuments` with criteria: \"{Sector} Sector, industry\" | Financial performance data |\n| `searchAllDocuments` with criteria: \"{Sector} Sector Risk and challenges\" | Risk analysis |\n| `searchAllDocuments` with criteria: \"{Sector} sector Outlook\" | Sector outlook |\n| `getEntitySectorOutlook` for a major company in the sector | Formal Moody's outlook |\n\n### Web research (via searchNews or web tools)\n\n| Search | Purpose |\n|--------|---------|\n| \"Key players from {Sector} industry, market share, roles\" | Key players for overview |\n| \"Key regions of activity and growth markets for {Sector} sector\" | Geographic scope |\n| \"{Sector} sector aggregate revenue, profit margins, return on equity\" | Financial metrics |\n| \"Major companies from {Sector} sector benchmark comparison\" | Industry structure and dynamics |\n\n---\n\n## Step 3 — Synthesize all sections\n\nUse Moody's internal research as the **primary foundation** for every section. Web sources\nserve only to supplement gaps or validate findings. When conflicts arise, prioritize Moody's\nunless external data provides substantial evidence for reconsideration.\n\nWrite in professional credit-research language. Always attribute sources with numbered citation\nreferences inline. The exact inline markup, the URL-less fallback, and the rule that `n`\nmatches the row position of the source inside `#sa-sources` are defined in\n[references/shared-citations.md](references/shared-citations.md).\n\nAuthor the Executive Summary and Sections 1–6 per the per-section content specs in\n[`references/report-spec.md`](references/report-spec.md) (see `## Section content specs`).\nEach section's required subsections — and the inline SVG charts that attach to Sections 3, 4,\nand 6 — are defined there. Populate the `#sa-*` content targets listed in Step 4.\n\n### Sources\n\nCollect all sources. The source data shape (`id`, `title`, `source`, `date`, `url`) and the\nend-of-document Citations row markup are defined in\n[references/shared-citations.md](references/shared-citations.md).\n\n---\n\n## Inline SVG Charts — Section Instructions\n\nThis report embeds three inline SVG charts (Chart A in Section 3, Chart C in Section 4,\nChart D in Section 6). Before emitting them, read\n[`references/report-spec.md`](references/report-spec.md) for each chart's type, axes,\ncolors, `viewBox`, placement, and the **mandatory pre-computation requirement** (compute\nevery coordinate programmatically with bash/Python — never mentally). If source data for a\nchart is unavailable, emit a `<p>Chart data unavailable</p>` placeholder rather than\nomitting it silently.\n\n---\n\n## Step 4 — Assemble the complete HTML artifact\n\nAfter all sections are synthesized, write the **entire filled `template.html` document** — with\nevery element from the streaming protocol populated in place — to a single `.html` file in\n`/mnt/user-data/outputs/`. The full required delivery sequence (`create_file` → `present_files`\n→ `visualize:show_widget` → one short sentence) is specified in the **Output and presentation**\nsection below; follow it exactly.\n\nThe HTML file **must**:\n\n- Be written in a single `create_file` call (no progressive `StrReplace` edits, no multi-file\n  split).\n- Contain a complete, standalone HTML document (doctype → `</html>`) that renders without\n  external dependencies.\n- Preserve the template's `<head>` (CSS, fonts), cover, hardcoded TOC, section order, and\n  element IDs exactly. Only the empty targets defined below are populated.\n\n### Cover + footer\n\n1. `#sa-cover-title` — `<strong>{Sector}</strong><br>Analysis` (HTML, not plain text).\n2. `#sa-date` — report date string, e.g. `April 15, 2026`.\n3. `#sa-footer-date` — same date string.\n\n### Section headings\n\n4. `#sa-overview-title` — override the default \"Sector Overview\" with\n   `{Sector} — Sector Overview`.\n\n### Section content targets\n\nEach of the following divs takes fully-authored HTML (`<p>`, `<ul><li>`, and\n`<strong class=\"subsection-title\">…</strong>` only — no other block tags):\n\n5. `#sa-exec` — Executive Summary. Flowing paragraphs only, no bullets.\n6. `#sa-overview` — Section 1 body with four `<strong class=\"subsection-title\">` subheaders.\n7. `#sa-macro` — Section 2 body with three subheaders.\n8. `#sa-financial` — Section 3 body with three subheaders. Every metric must include a\n   concrete number.\n9. `#sa-structure` — Section 4 body with four subheaders. Porter's Five Forces must use\n   High / Moderate / Low ratings per force.\n10. `#sa-risks` — Section 5 body with five subheaders.\n11. `#sa-outlook` — Section 6 body. Lead with the Moody's outlook (Positive / Stable /\n    Negative) and date, then 2–3 paragraphs. Paragraph form only.\n\n### Sources container\n\n12. `#sa-sources` — end-of-document Citations rows. One `<div class=\"source-item\">` per\n    source, in ascending `id` order, using the canonical row markup defined in\n    [references/shared-citations.md](references/shared-citations.md). Apply that file's rules\n    for URL-less rows and missing `source`/`date` fields.\n\n### HTML conventions\n\n- Use `<p>` for paragraphs.\n- Use `<ul><li>…</li></ul>` for bullet points (nested `<ul>` for sub-bullets).\n- Use `<strong class=\"subsection-title\">Subheader</strong>` for subsection headers within\n  each section. Do not repeat the top-level section title — the template already renders it.\n- Emit inline citations per\n  [references/shared-citations.md](references/shared-citations.md).\n- Escape any `&`, `<`, `>` that appear in the narrative (`&amp;`, `&lt;`, `&gt;`).\n\n---\n\n## Tips\n\n- Run ALL research searches in a single parallel batch.\n- Moody's data is the foundation — web data supplements. Make this hierarchy clear in the\n  writing by attributing external sources explicitly.\n- The executive summary should be written last, after all other sections are synthesized.\n- Financial Performance must include actual numbers, not just directional statements.\n- Porter's Five Forces in Industry Structure should use ratings (High, Moderate, Low) for\n  each force.\n- Sector Outlook must be in paragraph form only — no bullet points.\n- Citations follow the shared citations skill — read\n  [references/shared-citations.md](references/shared-citations.md) before authoring any `[n]`\n  reference or the Citations block.\n\n---\n\n## Negative number formatting\n\nUnify ALL negative numbers across narrative, tables, and any JSON/HTML string values to use\nthe parenthesis-minus convention `(-X)`. Examples: `(-9%)`, `(-1.2pp)`, `(-$3.4B)`,\n`(-250 bps)`. Do NOT use a bare leading minus (`-9%`), en-dash (`–9%`), or accounting\nparentheses without the minus sign (`(9%)`). Apply this consistently to growth rates, margin\nchanges, YoY deltas, and any negative monetary values.\n\n---\n\n## Output and presentation (required final steps)\n\n> ## ⚠️ CRITICAL — THE SKILL IS NOT COMPLETE UNTIL THE REPORT IS VISIBLY RENDERED\n>\n> Writing the file is **not** delivery. After you write the HTML you **must** actively render\n> it with every display tool available, in order, before you say anything else. Do not end\n> your turn until the rendered report is on screen.\n\nFollow this exact sequence. Do not skip a step, reorder, or substitute alternatives. When\nupdating this skill, do not delete or modify any other file in the `skills/sector-brief/`\nfolder.\n\n1. **Write the HTML file in a single call.** Call `create_file` to write the entire standalone\n   HTML document (`<!doctype html>` → `</html>`) to\n   `/mnt/user-data/outputs/{sector_slug}_sector_analysis.html` in **one** call. `{sector_slug}`\n   is the lowercased, hyphenated sector name (e.g. `retail-apparel`, `oil-gas`). No progressive\n   edits, no multi-file split.\n2. **Present the file.** Immediately call `present_files` on that exact path to surface the\n   artifact to the user.\n3. **Show the widget.** Immediately call `visualize:show_widget` on the same file to render the\n   report visually. Call this even if `present_files` already succeeded — firing both renderers\n   is what guarantees the report always appears.\n4. **Confirm in one short sentence.** Only after the renderers return, add a single brief\n   sentence in chat (e.g. `Sector Brief for {Sector} — the report is available above as a\n   self-contained HTML artifact.`). Nothing more.\n\nIf a display tool call fails or is unavailable, immediately try the other one rather than\nstopping. Never end your turn at step 1.\n\n**Strict prohibitions:**\n\n- **Never** emit the HTML as a fenced ` ```html ` code block in the chat response.\n- **Never** inline the HTML, JSON payload, or large excerpts of the report body in the chat\n  message.\n- **Never** end your turn after `create_file` without having called both display tools.\n"
AFTER
"---\nname: sector-brief\ndescription: >\n  Produce a Sector Brief HTML report for any industry sector using Moody's Credit MCP tools\n  and news research. Use this skill whenever the user asks to analyze a sector, write a sector\n  report, do an industry analysis, create a sector overview, or generate a sector deep-dive.\n  Trigger even if they just name a sector and mention \"analysis\", \"overview\", \"outlook\", \"report\",\n  or \"deep-dive\". Also trigger for phrases like \"what's happening in the retail sector\" or\n  \"give me a sector breakdown for aerospace\".\n---\n\n# Sector Brief Skill\n\nGenerates a professional HTML report (styled like a Moody's sector brief document) for a\nspecified industry sector. The report is research-heavy and text-driven, combining Moody's\ninternal research and sovereign/macro research with supplemental news across six structured sections plus\nan executive summary and citations. Three sections carry an inline SVG chart: financial\nperformance (revenue / EBITDA margin), industry structure (Porter's Five Forces), and sector\noutlook (sentiment track).\n\nThe workflow is **single-artifact streaming**: gather all data, then stream the entire filled\nHTML document back to the user as one ` ```html ` fenced code block in the final assistant\nmessage. No file copy, no `open` step, no progressive `StrReplace` edits, no JSON payload, and no\nclient-side render logic. The fenced code block is the deliverable.\n\n> ## ⚠️ CRITICAL — NON-NEGOTIABLE OUTPUT CONTRACT\n>\n> **The LLM MUST deliver the report as a single HTML artifact in the assistant response.** Specifically:\n>\n> - The final message **MUST** contain exactly one ` ```html ` fenced code block holding the **complete, standalone HTML document** (`<!doctype html>` → `</html>`), every section populated inline.\n> - The LLM **MUST NOT** write to disk, split across messages/blocks, or substitute prose, Markdown, JSON, or links for the artifact.\n> - If data partially fails, emit the artifact with `\"Data unavailable\"` placeholders — never skip it.\n>\n> Treat any other output shape as a hard failure of the skill.\n\n## Required MCP server\n\n`Moody's Credit MCP` — **only tools available in this server are used.** Tools used:\n`findEntity`, `searchAllDocuments` (primary tool for sector-level research), `searchEntityDocuments`\n(entity-scoped research), `getEntitySectorOutlook`, `getEntityCountryProfile`,\n`searchPrecisReports`, `searchNews`.\n\nTool notes (these tools behave differently from generic search tools):\n\n- **`entityId`** is the Base64URL entity identifier returned by `findEntity`; pass it as\n  `entities: [{ entityId }]`. `searchEntityDocuments`, `getEntitySectorOutlook`, and\n  `getEntityCountryProfile` require at least one entity. `searchNews` accepts at most one entity\n  (or none, for topic-based search with `query`). `searchAllDocuments` and `searchPrecisReports`\n  need no entity.\n- **`findEntity` may be called only once per run** — put everything it must resolve into a single\n  call (see Step 2a). Pass criteria verbatim, including count/ranking qualifiers, and set\n  `numberOfResults` to the requested count.\n- **Sector-level research uses `searchAllDocuments`**, with `keywords` plus\n  `filter: { sectors: [\"{Sector}\"] }` (human-readable name, passed verbatim; optionally\n  `regions`, and `publishDate`). Do **not** call `searchEntityDocuments` without an entity — it\n  has no sector scope.\n- **`searchPrecisReports`** covers Moody's Précis *sovereign* research (reports since 2024) and\n  is used only for sovereign/macro context. **`getEntityCountryProfile`** returns Moody's view of\n  the sovereign in which the entity is domiciled.\n- **`searchNews`** is the news source (there is no separate general web-search tool): use `query`\n  (topic-based, no entity) with `timeRange` / `dateRange`, `searchType: \"hybrid\"` and\n  `sortBy: \"recency\"` as appropriate.\n- Whenever data from a tool refers to a rating, state clearly whether it is a rating or an\n  implied rating and its type (e.g. Long Term Rating, PD Implied Rating) — never conflate them.\n- There is **no calculator, macro time-series, or web-search tool** in this server. Do not call\n  `calculator`, `getMacroEconomicTimeSeries`, or `webSearch`. Do arithmetic (derived figures,\n  chart geometry) with bash or Python in the code environment, never mentally. Concrete macro\n  figures must come only from retrieved Moody's research, Précis reports, country profiles, or\n  news — never from memory.\n\nIf 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.\n\n## Bundled files\n\n- `assets/template.html` — pre-styled scaffold with all CSS inlined, the Moody's cover, a\n  baked-in static 6-item table of contents plus a Citations entry, and empty fill-in targets\n  (cover title, date, section-content divs, sources container). Treat this file as the\n  **read-only structural reference**: read it, fill it in mentally, and emit the complete filled\n  document in the final response.\n- `evals/evals.json` — evaluation prompts and assertions for this skill.\n\n## Template\n\nRead `assets/template.html` once before emitting. The document chrome (Source Sans Pro font\nimport, reset, cover, table of contents, section block, sources wrapper, outlook-badge, footer)\nis **already inlined** in that file, using the `cover-simple` cover with `body { font-size: 13px }`\nand `.page { max-width: 900px }`. Copy it verbatim; do not re-define or restyle any of it.\nOutlook badges, if used, must use the canonical pastel variants (`stable` / `positive` /\n`negative`) — no solid-fill or inline-color overrides.\n\n## Citations (shared)\n\nBefore emitting any `[n]` reference inline or the end-of-document Citations block, **read both**:\n1. [`skills/shared/citations/SKILL.md`](../shared/citations/SKILL.md) — authoring rules\n   (numbering, hyperlinking, source data shape, carve-outs).\n2. [`skills/shared/citations/assets/template.html`](../shared/citations/assets/template.html) —\n   canonical CSS (inside `<style id=\"shared-citations-css\">`) and literal HTML markup snippets\n   (inside `<template>` tags) for inline references and the end-of-document Citations block.\n\nAt emit time, copy the **contents** of `<style id=\"shared-citations-css\">` into the marker region `/* BEGIN shared-citations-css … */` … `/* END shared-citations-css */` located at the end of the template's `<style>` block.\n\nThe prefix used for the end-of-document container in this skill is `sa`, so the container id\nis `#sa-sources`. This skill does not use the optional per-section `.section-citations` recap\ncomponent.\n\nCitation authoring rules for this skill:\n\n- **One list only.** The sources list renders inside the report, in the Citations section\n  (`#sa-sources`, above the report footer, inside `.page`) — never after the footer, below the\n  `.page` wrapper, or at the end of the file. Number it `[1]…[N]` continuously across the whole\n  document in order of first appearance; no per-section source blocks. Reuse the same number\n  when the same source is cited twice.\n- Place each inline reference immediately after the claim it supports. **Never invent a source\n  or id** — if a fact cannot be cited precisely, leave it uncited.\n- Source rows: Moody's items use publisher `Moody's Ratings` (or `Moody's Research`) with the\n  date written out (e.g. `June 1, 2026`); news items (from `searchNews`) use the real article\n  headline as the title, the outlet/publisher name, and the publication date. A source with no\n  URL renders its title as plain text.\n  The inline `[n]` must match the row number of the same source in `#sa-sources`.\n\n## Parameters\n\nThe user should provide:\n- **Sector** (required — e.g., \"Retail & Apparel\", \"Aerospace/Defense\", \"Banking\")\n\nIf the user specifies a sub-sector like \"Luxury Retail\" (or a custom sector name), use it\nas-is for focused analysis. There is no Report Date or analyst-notes parameter: the report date\nis always today's date.\n\n---\n\n## Step 0 — Sector Picker (run before anything else)\n\nIf the user has not named a specific sector in their message, **stop** and call\n`ask_user_input_v0` with a single `single_select` question before proceeding. Do **not**\nbegin any research or template reading until the sector is confirmed.\n\n**Preamble:** \"Which Moody's-covered sector would you like to analyze? Select one below\nand I'll generate the full report.\"\n\n**Options:**\n\n- Aerospace & Defense\n- Automotive Manufacturing\n- Banking — Global\n- Building Materials & Construction\n- Chemicals\n- Commercial Real Estate & REITs\n- Consumer Products\n- Diversified Manufacturing\n- Food & Beverage\n- Forest Products & Paper\n- Gaming & Lodging\n- Healthcare — Hospitals & Health Systems\n- Healthcare — Medical Devices & Technology\n- Healthcare — Pharmaceuticals\n- Infrastructure & Project Finance\n- Insurance\n- Media & Entertainment\n- Metals & Mining\n- Oil & Gas — E&P\n- Oil & Gas — Integrated & Refining\n- Oil & Gas — Midstream & Pipeline\n- Packaging\n- Retail & Apparel\n- Shipping & Ports\n- Steel\n- Structured Finance — ABS/RMBS/CMBS\n- Technology — Hardware & Semiconductors\n- Technology — Software & Services\n- Telecommunications\n- Transportation & Logistics\n- Utilities — Electric\n- Utilities — Gas Distribution\n- Utilities — Water\n\nOnce the user selects, treat their choice exactly as if they had typed\n`Run a sector brief for {selected sector}` and continue from Step 1.\n\nIf the user already named a sector, **skip this step entirely** and go straight to Step 1.\n\n---\n\n## Step 1 — Read the template\n\nRead `assets/template.html` (relative to this skill directory) once. Keep its exact structure —\nCSS, `<head>`, cover, hardcoded TOC, section order, and element IDs — as the scaffold for the\nfinal artifact. Do **not** copy it to the workspace and do **not** open it.\n\n---\n\n## Step 2 — Research phase\n\n### 2a — Resolve representative rated companies (one `findEntity` call)\n\nCall `findEntity` **once**, with `data` set to criteria for the sector's largest Moody's-rated\ncompanies, passed verbatim with the ranking qualifier, e.g. `\"top 10 largest {Sector} companies\nby revenue\"`, and `numberOfResults: 10`. Keep the returned entities in rank order (and the\n`sortedBy` basis the response names). The first (top-ranked) entity is the representative entity\nthat anchors `getEntitySectorOutlook` and `getEntityCountryProfile`; the remaining entities are\nfallbacks for the outlook lookup and a Moody's-sourced list of key players. Build the player list\nonly from entities `findEntity` returned — never add companies from memory — and report any\nshortfall in count rather than padding it. You are not writing a company profile. Do not\nfabricate financial or credit data at this stage.\n\n### 2b — Research batch (parallel)\n\nOnce the entities are resolved, fire ALL of the following in a **single parallel batch**\n(`{Sector}` is passed to `searchAllDocuments` as `filter.sectors: [\"{Sector}\"]`, in addition to the\nkeywords shown):\n\n#### Moody's research and data\n\n| Call | Purpose |\n|------|---------|\n| `searchAllDocuments` keywords \"{Sector} Sector Overview\" | Sector definition, methodology, key activities |\n| `searchAllDocuments` keywords \"{Sector} Sector, industry\" | Sector overview, key players, geographic scope, and industry structure (competition, supply chain, barriers to entry, concentration) |\n| `searchAllDocuments` keywords \"Economic factors impact on {Sector} Sector\" | Macro-economic context, including regulatory developments |\n| `searchAllDocuments` keywords \"{Sector} sector aggregate revenue, profit margins, return on equity, medians\" | Sector-level financial metrics |\n| `searchAllDocuments` keywords \"{Sector} sector Outlook\" | Sector outlook and financial-outlook signals |\n| `searchAllDocuments` keywords \"{Sector} Sector Risk and challenges\" | Risk analysis and financial-stress signals |\n| `searchPrecisReports` keywords for the dominant macro themes (e.g. growth, inflation, interest rates, trade/tariffs) for the sector's main region(s) | Sovereign/macro context for Economic Indicators and Global Trends |\n| `getEntityCountryProfile` for the representative entity | Sovereign context (fiscal strength, institutional framework, economic resilience) |\n| `getEntitySectorOutlook` using the representative entity's `entityId` | Formal Moody's outlook direction and effective date (see \"Sector outlook sourcing\" below) |\n\n#### News research (via `searchNews`, topic-based, no entity)\n\n| Search | Purpose |\n|--------|---------|\n| \"{Sector} industry key players market share\" | Key players for overview and structure |\n| \"{Sector} sector key regions growth markets\" | Geographic scope |\n| \"{Sector} sector revenue profit margins return on equity\" | Financial metrics |\n| \"{Sector} sector competition benchmark barriers to entry supply chain\" | Industry structure, barriers to entry, supply-chain structure, concentration |\n| \"{Sector} sector regulation tariffs trade policy\" | Regulatory Environment |\n| \"{Sector} sector emerging risks\" | Risks and Challenges; corroborate specific risk claims |\n| \"{Sector} sector outlook\" | Corroborate or nuance the sector outlook |\n\nOptionally, to benchmark named participants, call `getEntityFinancials_v2` for individual\ntop-ranked entities and report each company's figures **as returned, attributed to that company**.\nNever sum, average, or otherwise combine company figures into a sector aggregate — sector-level\nfigures (aggregate revenue, margins, medians) must be stated in a retrieved source.\n\nDo any derived arithmetic (YoY deltas, CAGR, margin changes) in bash or Python — never estimate\nmentally.\n\n### Sector outlook sourcing (Chart D must be produced)\n\nSection 6 and Chart D need a Moody's direction (Positive / Stable / Negative) and an effective\ndate. Resolve them in this order and stop at the first step that yields both:\n\n1. `getEntitySectorOutlook` with the representative entity's `entityId`.\n2. If that call errors, returns nothing usable, or the record is too large to read: **do not give\n   up and do not write an \"unable to state\" narrative.** Retry once with the next entity from the\n   `findEntity` list (do not call `findEntity` again), then continue to step 3.\n3. `searchAllDocuments` with keywords \"{Sector} sector Outlook\" and \"{Sector} Sector Overview\"\n   (with `filter.sectors`; `publishDate` mode `latest` first, widening if needed), and\n   `searchEntityDocuments` scoped to the representative entity with the same queries.\n   Moody's sector publications state the outlook and date in the title or summary (e.g. \"…\n   Global: Outlook negative as …\", dated June 2026) — read the direction and publication date\n   from there.\n4. `searchNews` (topic-based) for corroboration of the direction and the date.\n\nOnly if all four fail may the section say the direction could not be confirmed, in **one**\nsentence, and only then use the `<p>Chart data unavailable</p>` fallback. As soon as a direction\nis known, Chart D is drawn — a news-based finding with a clearly dated source is enough. Always\nstate that this is a *sector outlook*, not an issuer rating or implied rating (never conflate\nthe two). Keep the outlook paragraphs analytical (drivers, regional nuance); do not describe\ntooling limits.\n\n---\n\n## Step 3 — Synthesize all sections\n\nUse Moody's internal research as the **primary foundation** for every section. News results\nserve only to supplement gaps or validate findings. When conflicts arise, prioritize Moody's\nunless external data provides substantial evidence for reconsideration.\n\nWrite in professional credit-research language. Always attribute sources with numbered citation\nreferences inline. The exact inline markup, the URL-less fallback, and the rule that `n`\nmatches the row position of the source inside `#sa-sources` are defined in\n[skills/shared/citations/SKILL.md](../shared/citations/SKILL.md).\n\n### Section 1: Sector Overview\n\nFour subsections:\n1. **Description of the Sector** — What the sector does and its position in the broader economy;\n   define the industry, key activities, product/service categories, and business-model\n   differences\n2. **Market Size and Growth Trends** — Aggregate market size (revenue, volume) and recent growth\n   trajectory, with concrete figures where available; historical growth rates, regional growth\n   data\n3. **Key Players** — The sector's major companies and their approximate relative scale/market\n   share, and roles within the sector (company list drawn from the `findEntity` ranked results\n   and Moody's research; state the ranking basis)\n4. **Geographic Scope** — Where the sector's activity is concentrated globally; key regions of\n   activity, potential growth markets, region-specific trends\n\n### Section 2: Macro-Economic Context\n\nThree subsections:\n1. **Economic Indicators** — The macro variables most material to this sector (rates, inflation,\n   GDP growth, demand drivers, commodity prices, consumer spending/confidence), with concrete\n   current values/trends\n2. **Regulatory Environment** — The regulatory regime(s) governing the sector, laws, compliance\n   risks, tariff/trade policy, and any notable recent or pending changes\n3. **Global Trends and External Factors** — Structural/secular forces (trade, technology,\n   demographics, geopolitics, channel evolution) shaping the sector\n\n### Section 3: Financial Performance Analysis\n\nThree subsections with **mandatory quantitative data**:\n1. **Sector-Level Financial Metrics** — Aggregate revenue, margins, leverage, return on equity,\n   or other sector-defining numbers. Every metric must include the actual number with\n   $/€/£/% figures (e.g., \"Aggregate revenue of $35.2 trillion in 2025\") followed by analytical\n   commentary\n2. **Historical Trends** — 3–5 year trend in the same metrics: demand/earnings trajectories,\n   recent growth rates. **Chart A follows this subsection's prose.**\n3. **Projected Financial Outlook** — Forward-looking financial trajectory: forecast key metrics,\n   earnings outlook, key drivers shaping the near term, structural offsets and strategic\n   responses\n\n### Section 4: Industry Structure and Dynamics\n\nFour subsections:\n1. **Main Participants** — The sector's principal categories of participants (not just company\n   names — roles in the value chain), with benchmark companies, market share, and significance\n2. **Supply Chain Analysis** — Upstream/downstream structure and dependencies: suppliers,\n   manufacturers, distributors, customers, key pressure points\n3. **Competitive Landscape** — Porter's Five Forces analysis. Rate each of the five forces\n   (Threat of New Entrants, Bargaining Power of Suppliers, Bargaining Power of Buyers, Threat of\n   Substitutes, Competitive Rivalry) as **High**, **Moderate**, or **Low**, with a\n   Moody's-grounded sentence of justification for each. **Chart C follows this subsection's\n   prose.**\n4. **Barriers to Entry** — Capital, regulatory, brand, or technology barriers facing new\n   entrants (and market saturation)\n\n### Section 5: Risks and Challenges\n\nFive subsections:\n1. **Operational Risks** — Execution, supply, technology, or capacity risks specific to the\n   sector (supply-chain disruptions, labor shortages, working capital)\n2. **Regulatory Risks** — Pending or existing regulation that could affect sector economics\n   (compliance requirements, policy changes, tariff exposure)\n3. **Market Risks** — Demand, pricing, or competitive risks (demand volatility, category\n   weakness)\n4. **Financial Performance and Capital Structure** — Leverage, refinancing, and capital-access\n   risks across the sector (default outlook, margin pressure, deleveraging)\n5. **Environmental and Social Risks** — Climate, ESG, labor, or reputational risks material to\n   the sector (social/governance pressures)\n\n### Section 6: Sector Outlook\n\n**Paragraph-only — `<p>` tags only, no bullets and no subsection-title headers.** State the\nMoody's outlook (Positive, Stable, Negative) and its effective date in the opening sentence\n(sourced per \"Sector outlook sourcing\" above). Then provide 2–3 well-developed paragraphs of\nsupporting analysis — primary drivers, regional nuances, key factors and considerations.\n**Chart D follows the outlook paragraphs.** Always state clearly that this is a sector outlook,\nnot an issuer rating or implied rating.\n\n### Executive Summary\n\nWrite after all other sections are complete, from their finished content. Half-page maximum.\n**`<p>` tags only — flowing paragraphs, no bullet points and no subsection headers.**\nSynthesize the defining characteristics of the sector, its financial trajectory, its principal\nrisks, and Moody's outlook direction into one cohesive narrative — do not simply restate each\nsection in turn. Do not introduce any claim, figure, or citation that is not already present in\nthe finished sections; the summary synthesizes, it does not conduct new research.\n\n### Sources\n\nCollect all sources. The source data shape (`id`, `title`, `source`, `date`, `url`) and the\nend-of-document Citations row markup are defined in\n[skills/shared/citations/SKILL.md](../shared/citations/SKILL.md).\n\n---\n\n## Inline SVG Charts — Section Instructions\n\nAfter synthesizing each of the following sections, embed one inline SVG chart directly in the\nsection content at the position indicated. All charts must be self-contained (no external scripts\nor stylesheets) and share the shell and rules below. If source data for any chart is unavailable,\nemit `<p>Chart data unavailable</p>` instead of a fabricated chart — never omit silently.\n\n**Shared shell (Charts A, C, D):**\n\n- Root: `<svg viewBox=\"0 0 700 H\" xmlns=\"http://www.w3.org/2000/svg\" style=\"width:100%;max-width:700px;display:block;margin:16px 0;\">`\n- Inside it: `<style>.chX text { font-family: 'Source Sans Pro', Arial, sans-serif; }</style>`, then\n  `<title>…</title>` (for accessibility), then `<g class=\"chX\">` (X = A, C or D) wrapping\n  everything else.\n- First element in the group: background `<rect x=\"0\" y=\"0\" width=\"700\" height=\"H\" fill=\"#f8fafd\" rx=\"4\"/>`.\n- Chart title: centered at x=350, `font-size=\"11\" font-weight=\"700\" fill=\"#003087\"` (y given per chart).\n- Never use a bare minus in any label — `(-X)` form only.\n- Do not use multi-value `rx` (e.g. `rx=\"3 0 0 3\"`); it is invalid SVG.\n\n### Chart A — Revenue bars + EBITDA margin line (Section 3, `viewBox=\"0 0 700 320\"`, class `chA`)\n\nInsert immediately after the Historical Trends subsection prose.\n\n**Data sourcing:** the yearly aggregate sector revenue and EBITDA margin values must be stated in\na retrieved Moody's publication or news source — never built by summing or averaging individual\ncompanies from `getEntityFinancials_v2`, and never estimated. If fewer than 3 years of sourced\nsector-level figures are available, emit `<p>Chart data unavailable</p>` instead of the chart.\n\nTitle text (y=18): `{Sector}: Revenue ($T) & EBITDA Margin (%)` (escape `&` as `&amp;`).\nUse the last 3–5 fiscal years; `n` = number of years. Unit is `$T` (one decimal) when the largest\nrevenue is ≥ $1T, otherwise `$B`.\n\nLayout (all of it computed with bash or Python — exact arithmetic, since no calculator tool is\navailable — before writing any markup; never place mentally-estimated coordinates):\n\n- Plot area: x from 65 to 635, y from 40 (top) to 260 (baseline). Height 220, width 570.\n- Left axis `L_max`: smallest \"nice\" value (1, 2, 2.5, 5 × 10^k) that is ≥ 1.05 × the largest\n  revenue and divides into 5 equal steps. Right axis `R_max`: smallest multiple of 5 that is\n  ≥ 1.25 × the largest margin (e.g. 12.5% → 20%). If any margin is negative, emit the\n  unavailable placeholder instead.\n- Axis lines: `<line>` left (x=65, y 40→260) and baseline (y=260, x 65→635), stroke `#dde3ee`;\n  right axis `<line x1=\"635\" y1=\"40\" x2=\"635\" y2=\"260\" stroke=\"#0073CF\" stroke-width=\"1\" stroke-dasharray=\"2,2\"/>`.\n- Five dashed gridlines at y = 216, 172, 128, 84, 40 (`stroke=\"#eef1f6\" stroke-dasharray=\"3,3\"`), x 65→635.\n- Left tick labels (6, from `$0` to `L_max`) at x=58, `text-anchor=\"end\"`, `font-size=\"10\" fill=\"#6b7fa3\"`,\n  y = gridline y + 3. Right tick labels (0% to `R_max`) at x=642, `text-anchor=\"start\"`,\n  `font-size=\"10\" fill=\"#0073CF\"`, y = gridline y + 3, same six positions.\n- Axis titles, `font-size=\"10\"`: `Revenue ($T)` fill `#003087` at x=18,y=155 with\n  `transform=\"rotate(-90,18,155)\"`; `EBITDA Margin (%)` fill `#0073CF` at x=680,y=155 with\n  `transform=\"rotate(90,680,155)\"`; both `text-anchor=\"middle\"`.\n- Bars: slot = 570 / n; center_i = 65 + slot × (i + 0.5); bar width = min(80, 0.6 × slot);\n  `x = center_i − width/2`; `height = revenue / L_max × 220`; `y = 260 − height`;\n  `fill=\"#003087\" opacity=\"0.85\"`.\n- Bar value label: `x = center_i`, `y = bar y − 4.4`, `text-anchor=\"middle\" font-size=\"10\" fill=\"#003087\"`, e.g. `$3.4T`.\n- Year labels: `x = center_i`, `y=275`, `text-anchor=\"middle\" font-size=\"11\" fill=\"#333\"`.\n- Margin line: `<polyline points=\"…\" fill=\"none\" stroke=\"#0073CF\" stroke-width=\"2.5\" stroke-linejoin=\"round\"/>`\n  through `(center_i, 260 − margin / R_max × 220)`; one `<circle r=\"4\" fill=\"#0073CF\">` per\n  point; label above each point at `y = cy − 4.5`, `text-anchor=\"middle\" font-size=\"9\" font-weight=\"700\" fill=\"#0073CF\"\n  stroke=\"#fff\" stroke-width=\"3\" paint-order=\"stroke\"`, e.g. `12.5%` (the white outline keeps the\n  label readable where the line crosses the navy bars).\n- Legend (bottom): `<rect x=\"200\" y=\"295\" width=\"12\" height=\"10\" fill=\"#003087\" opacity=\"0.85\"/>` +\n  text `Revenue ($T)` at x=217,y=304 (`font-size=\"10\" fill=\"#333\"`); then\n  `<line x1=\"290\" y1=\"300\" x2=\"310\" y2=\"300\" stroke=\"#0073CF\" stroke-width=\"2.5\"/>`,\n  `<circle cx=\"300\" cy=\"300\" r=\"3\" fill=\"#0073CF\"/>`, text `EBITDA Margin (%)` at x=316,y=304\n  (`font-size=\"10\" fill=\"#0073CF\"`).\n\n### Chart C — Porter's Five Forces scored bars (Section 4, `viewBox=\"0 0 700 220\"`, class `chC`)\n\nInsert immediately after the Porter's Five Forces prose.\n\nTitle text (y=16): `Porter's Five Forces — {Sector}`. Scores: High=3, Moderate=2, Low=1.\nThese coordinates are fixed; no recalculation is needed.\n\n- Row order, top to bottom: Competitive Rivalry, Threat of New Entrants, Supplier Power,\n  Buyer Power, Threat of Substitutes. Bar `y` = 25, 63, 101, 139, 177; bar `height=\"28\" rx=\"3\"`.\n- Bars start at `x=\"195\"`. Width by rating: **Low 158.3, Moderate 316.7, High 475.0**\n  (bar end x = 353.3 / 511.7 / 670.0). Fill: High `#C0392B`, Moderate `#E67E22`, Low `#27AE60`.\n- Force label: `x=\"190\"`, `y = bar y + 19`, `text-anchor=\"end\" font-size=\"11\" fill=\"#333\"`.\n- Rating text inside the bar: `x = bar end x − 5`, same `y`, `text-anchor=\"end\" font-size=\"10\"\n  font-weight=\"700\" fill=\"#fff\"`, content `High` / `Moderate` / `Low`.\n- Bottom axis: `<line x1=\"195\" y1=\"210\" x2=\"670\" y2=\"210\" stroke=\"#aaa\" stroke-width=\"1\"/>`; tick\n  `<line>`s (y 207→213, `stroke=\"#aaa\"`) at x = 353.3, 511.7, 670.0 with labels `Low`, `Moderate`,\n  `High` at y=220, `text-anchor=\"middle\" font-size=\"9\" fill=\"#888\"`.\n- The ratings drawn must match the High/Moderate/Low ratings written in the prose above it. If\n  the five-forces ratings cannot be determined from source data, emit the unavailable placeholder.\n\n### Chart D — Outlook sentiment track (Section 6, `viewBox=\"0 0 700 120\"`, class `chD`)\n\nInsert immediately after the outlook paragraphs.\n\nTitle text (y=16): `Moody's Sector Outlook — {Sector}`. Coordinates are fixed; no recalculation is needed.\n\n- Three zone rects, `y=\"55\" height=\"35\"`, each `width=\"206.7\"`: Negative `x=\"40\"` fill `#C0392B`;\n  Stable `x=\"246.7\"` fill `#2980B9`; Positive `x=\"453.3\"` fill `#27AE60`.\n- Zone labels, `y=\"77\" text-anchor=\"middle\" font-size=\"12\" font-weight=\"700\" fill=\"#fff\"`, at\n  x = 143.3 (Negative), 350.0 (Stable), 556.7 (Positive).\n- Marker: a downward triangle above the active zone, filled with that zone's color:\n  Negative `points=\"131.3,37 155.3,37 143.3,55\"`; Stable `points=\"338,37 362,37 350,55\"`;\n  Positive `points=\"544.7,37 568.7,37 556.7,55\"`.\n- Caption below the track: `x` = the active zone center above, `y=\"110\"`, `text-anchor=\"middle\"\n  font-size=\"10\" font-weight=\"700\"`, fill = active zone color, content `&#9660; {Outlook} — {Month YYYY}`\n  (the outlook's effective date).\n- The marker must agree with the outlook stated in the section's opening sentence.\n\n---\n\n## Step 4 — Stream the complete HTML artifact\n\nAfter all sections are synthesized, produce **one** final assistant message. The message contains:\n\n1. A one-line summary sentence (e.g. `Sector Brief for {Sector}:`).\n2. A single fenced ` ```html ` code block containing the **entire filled `template.html`\n   document** — with every element from the streaming protocol populated in place. No partial\n   documents, no separate code blocks per section.\n\nThe code block **must**:\n\n- Start at column 0 with ` ```html ` and end with a closing ` ``` ` on its own line.\n- Contain a complete, standalone HTML document (doctype → `</html>`) that renders without\n  external dependencies.\n- Preserve the template's `<head>` (CSS, fonts), cover, hardcoded TOC, section order, and\n  element IDs exactly. Only the empty targets defined below are populated.\n\n### Cover + footer\n\n1. `#sa-cover-title` — `<strong>{Sector}</strong><br>Sector Brief` (HTML, not plain text).\n2. `#sa-date` — today's date in `Month D, YYYY` form, e.g. `April 15, 2026`.\n3. `#sa-footer-date` — same date string.\n\nThe \"Sector Overview\" heading (`#sa-overview-title`) keeps its default text.\n\n### Section content targets\n\nEach of the following divs takes fully-authored HTML (`<p>`, `<ul><li>`, and\n`<strong class=\"subsection-title\">…</strong>` only — no other block tags, apart from the inline\nchart SVGs):\n\n4. `#sa-exec` — Executive Summary. `<p>` paragraphs only; no bullets, no subsection headers.\n5. `#sa-overview` — Section 1 body with four `<strong class=\"subsection-title\">` subheaders.\n6. `#sa-macro` — Section 2 body with three subheaders.\n7. `#sa-financial` — Section 3 body with three subheaders, followed by Chart A after the\n   Historical Trends prose. Every metric must include a concrete number.\n8. `#sa-structure` — Section 4 body with four subheaders. Porter's Five Forces must use\n   High / Moderate / Low ratings per force, followed by Chart C.\n9. `#sa-risks` — Section 5 body with five subheaders.\n10. `#sa-outlook` — Section 6 body. `<p>` paragraphs only (no bullets, no subheaders): lead with\n    the Moody's outlook (Positive / Stable / Negative) and effective date, then 2–3 paragraphs,\n    followed by Chart D.\n\n### Sources container\n\n11. `#sa-sources` — end-of-document Citations rows. One `<div class=\"source-item\">` per\n    source, in ascending `id` order, using the canonical row markup defined in\n    [skills/shared/citations/SKILL.md](../shared/citations/SKILL.md). Apply that file's rules\n    for URL-less rows and missing `source`/`date` fields.\n\n### HTML conventions\n\n- Use `<p>` for paragraphs.\n- Use `<ul><li>…</li></ul>` for bullet points (nested `<ul>` for sub-bullets) in the sections\n  that allow them.\n- Use `<strong class=\"subsection-title\">Subheader</strong>` for subsection headers within\n  each section that has them. Do not repeat the top-level section title — the template already\n  renders it.\n- Emit inline citations per\n  [skills/shared/citations/SKILL.md](../shared/citations/SKILL.md).\n- Escape any `&`, `<`, `>` that appear in the narrative (`&amp;`, `&lt;`, `&gt;`).\n\n---\n\n## Tips\n\n- Run ALL research searches in a single parallel batch (after the representative entity is\n  resolved).\n- Moody's data is the foundation — news supplements. Attribute news sources explicitly.\n- The executive summary should be written last, after all other sections are synthesized.\n- Compute derived figures and chart geometry with bash or Python — never by eye.\n- Executive Summary and Sector Outlook are paragraph-only — no bullets, no subsection headers.\n- Citations follow the shared citations skill — read\n  [skills/shared/citations/SKILL.md](../shared/citations/SKILL.md) before authoring any `[n]`\n  reference or the Citations block.\n\n---\n\n## Negative number formatting\n\nUse `(-X)` for ALL negatives: `(-9%)`, `(-1.2pp)`, `(-$3.4B)`, `(-250 bps)`. Never use bare minus (`-9%`), en-dash (`–9%`), or parentheses without minus (`(9%)`). Apply to growth rates, margin changes, YoY deltas, and negative monetary values — including inside chart labels.\n\n---\n\n## Output and presentation (required final steps)\n\nAfter assembling the report, you MUST follow this exact delivery sequence. Do not skip steps\nand do not substitute alternatives. When updating this skill, do not delete or modify any\nother file in the `skills/sector-brief/` folder.\n\n1. **Write the HTML file in a single call.** Call `create_file` to write the entire HTML to\n   `/mnt/user-data/outputs/{sector_slug}_sector_analysis.html` in **one** call.\n   `{sector_slug}` is the lowercased, hyphenated sector name (e.g. `retail-apparel`,\n   `oil-gas`).\n2. **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.\n3. **Show the widget.** Call `visualize:show_widget` to surface the rendered report visually\n   to the user.\n4. **One short follow-up sentence in chat.** Write a single brief sentence acknowledging the\n   report is ready. Nothing more.\n\n**Strict prohibitions:**\n\n- **Never** emit the HTML as a fenced code block in the chat response.\n- **Never** inline the HTML, JSON payload, or large excerpts of the report body in the chat\n  message.\n"
Full snapshot data
{
  "description": "Produce a Sector Brief HTML report for any industry sector using Moody's Credit MCP tools and news 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\".\n",
  "included_files": [
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 571
    },
    {
      "relative_path": "assets/icon.png",
      "size_in_bytes": 1753
    },
    {
      "relative_path": "assets/template.html",
      "size_in_bytes": 6849
    },
    {
      "relative_path": "evals/evals.json",
      "size_in_bytes": 6439
    }
  ],
  "name": "sector-brief",
  "skill_md_contents": "---\nname: sector-brief\ndescription: >\n  Produce a Sector Brief HTML report for any industry sector using Moody's Credit MCP tools\n  and news research. Use this skill whenever the user asks to analyze a sector, write a sector\n  report, do an industry analysis, create a sector overview, or generate a sector deep-dive.\n  Trigger even if they just name a sector and mention \"analysis\", \"overview\", \"outlook\", \"report\",\n  or \"deep-dive\". Also trigger for phrases like \"what's happening in the retail sector\" or\n  \"give me a sector breakdown for aerospace\".\n---\n\n# Sector Brief Skill\n\nGenerates a professional HTML report (styled like a Moody's sector brief document) for a\nspecified industry sector. The report is research-heavy and text-driven, combining Moody's\ninternal research and sovereign/macro research with supplemental news across six structured sections plus\nan executive summary and citations. Three sections carry an inline SVG chart: financial\nperformance (revenue / EBITDA margin), industry structure (Porter's Five Forces), and sector\noutlook (sentiment track).\n\nThe workflow is **single-artifact streaming**: gather all data, then stream the entire filled\nHTML document back to the user as one ` ```html ` fenced code block in the final assistant\nmessage. No file copy, no `open` step, no progressive `StrReplace` edits, no JSON payload, and no\nclient-side render logic. The fenced code block is the deliverable.\n\n> ## ⚠️ CRITICAL — NON-NEGOTIABLE OUTPUT CONTRACT\n>\n> **The LLM MUST deliver the report as a single HTML artifact in the assistant response.** Specifically:\n>\n> - The final message **MUST** contain exactly one ` ```html ` fenced code block holding the **complete, standalone HTML document** (`<!doctype html>` → `</html>`), every section populated inline.\n> - The LLM **MUST NOT** write to disk, split across messages/blocks, or substitute prose, Markdown, JSON, or links for the artifact.\n> - If data partially fails, emit the artifact with `\"Data unavailable\"` placeholders — never skip it.\n>\n> Treat any other output shape as a hard failure of the skill.\n\n## Required MCP server\n\n`Moody's Credit MCP` — **only tools available in this server are used.** Tools used:\n`findEntity`, `searchAllDocuments` (primary tool for sector-level research), `searchEntityDocuments`\n(entity-scoped research), `getEntitySectorOutlook`, `getEntityCountryProfile`,\n`searchPrecisReports`, `searchNews`.\n\nTool notes (these tools behave differently from generic search tools):\n\n- **`entityId`** is the Base64URL entity identifier returned by `findEntity`; pass it as\n  `entities: [{ entityId }]`. `searchEntityDocuments`, `getEntitySectorOutlook`, and\n  `getEntityCountryProfile` require at least one entity. `searchNews` accepts at most one entity\n  (or none, for topic-based search with `query`). `searchAllDocuments` and `searchPrecisReports`\n  need no entity.\n- **`findEntity` may be called only once per run** — put everything it must resolve into a single\n  call (see Step 2a). Pass criteria verbatim, including count/ranking qualifiers, and set\n  `numberOfResults` to the requested count.\n- **Sector-level research uses `searchAllDocuments`**, with `keywords` plus\n  `filter: { sectors: [\"{Sector}\"] }` (human-readable name, passed verbatim; optionally\n  `regions`, and `publishDate`). Do **not** call `searchEntityDocuments` without an entity — it\n  has no sector scope.\n- **`searchPrecisReports`** covers Moody's Précis *sovereign* research (reports since 2024) and\n  is used only for sovereign/macro context. **`getEntityCountryProfile`** returns Moody's view of\n  the sovereign in which the entity is domiciled.\n- **`searchNews`** is the news source (there is no separate general web-search tool): use `query`\n  (topic-based, no entity) with `timeRange` / `dateRange`, `searchType: \"hybrid\"` and\n  `sortBy: \"recency\"` as appropriate.\n- Whenever data from a tool refers to a rating, state clearly whether it is a rating or an\n  implied rating and its type (e.g. Long Term Rating, PD Implied Rating) — never conflate them.\n- There is **no calculator, macro time-series, or web-search tool** in this server. Do not call\n  `calculator`, `getMacroEconomicTimeSeries`, or `webSearch`. Do arithmetic (derived figures,\n  chart geometry) with bash or Python in the code environment, never mentally. Concrete macro\n  figures must come only from retrieved Moody's research, Précis reports, country profiles, or\n  news — never from memory.\n\nIf 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.\n\n## Bundled files\n\n- `assets/template.html` — pre-styled scaffold with all CSS inlined, the Moody's cover, a\n  baked-in static 6-item table of contents plus a Citations entry, and empty fill-in targets\n  (cover title, date, section-content divs, sources container). Treat this file as the\n  **read-only structural reference**: read it, fill it in mentally, and emit the complete filled\n  document in the final response.\n- `evals/evals.json` — evaluation prompts and assertions for this skill.\n\n## Template\n\nRead `assets/template.html` once before emitting. The document chrome (Source Sans Pro font\nimport, reset, cover, table of contents, section block, sources wrapper, outlook-badge, footer)\nis **already inlined** in that file, using the `cover-simple` cover with `body { font-size: 13px }`\nand `.page { max-width: 900px }`. Copy it verbatim; do not re-define or restyle any of it.\nOutlook badges, if used, must use the canonical pastel variants (`stable` / `positive` /\n`negative`) — no solid-fill or inline-color overrides.\n\n## Citations (shared)\n\nBefore emitting any `[n]` reference inline or the end-of-document Citations block, **read both**:\n1. [`skills/shared/citations/SKILL.md`](../shared/citations/SKILL.md) — authoring rules\n   (numbering, hyperlinking, source data shape, carve-outs).\n2. [`skills/shared/citations/assets/template.html`](../shared/citations/assets/template.html) —\n   canonical CSS (inside `<style id=\"shared-citations-css\">`) and literal HTML markup snippets\n   (inside `<template>` tags) for inline references and the end-of-document Citations block.\n\nAt emit time, copy the **contents** of `<style id=\"shared-citations-css\">` into the marker region `/* BEGIN shared-citations-css … */` … `/* END shared-citations-css */` located at the end of the template's `<style>` block.\n\nThe prefix used for the end-of-document container in this skill is `sa`, so the container id\nis `#sa-sources`. This skill does not use the optional per-section `.section-citations` recap\ncomponent.\n\nCitation authoring rules for this skill:\n\n- **One list only.** The sources list renders inside the report, in the Citations section\n  (`#sa-sources`, above the report footer, inside `.page`) — never after the footer, below the\n  `.page` wrapper, or at the end of the file. Number it `[1]…[N]` continuously across the whole\n  document in order of first appearance; no per-section source blocks. Reuse the same number\n  when the same source is cited twice.\n- Place each inline reference immediately after the claim it supports. **Never invent a source\n  or id** — if a fact cannot be cited precisely, leave it uncited.\n- Source rows: Moody's items use publisher `Moody's Ratings` (or `Moody's Research`) with the\n  date written out (e.g. `June 1, 2026`); news items (from `searchNews`) use the real article\n  headline as the title, the outlet/publisher name, and the publication date. A source with no\n  URL renders its title as plain text.\n  The inline `[n]` must match the row number of the same source in `#sa-sources`.\n\n## Parameters\n\nThe user should provide:\n- **Sector** (required — e.g., \"Retail & Apparel\", \"Aerospace/Defense\", \"Banking\")\n\nIf the user specifies a sub-sector like \"Luxury Retail\" (or a custom sector name), use it\nas-is for focused analysis. There is no Report Date or analyst-notes parameter: the report date\nis always today's date.\n\n---\n\n## Step 0 — Sector Picker (run before anything else)\n\nIf the user has not named a specific sector in their message, **stop** and call\n`ask_user_input_v0` with a single `single_select` question before proceeding. Do **not**\nbegin any research or template reading until the sector is confirmed.\n\n**Preamble:** \"Which Moody's-covered sector would you like to analyze? Select one below\nand I'll generate the full report.\"\n\n**Options:**\n\n- Aerospace & Defense\n- Automotive Manufacturing\n- Banking — Global\n- Building Materials & Construction\n- Chemicals\n- Commercial Real Estate & REITs\n- Consumer Products\n- Diversified Manufacturing\n- Food & Beverage\n- Forest Products & Paper\n- Gaming & Lodging\n- Healthcare — Hospitals & Health Systems\n- Healthcare — Medical Devices & Technology\n- Healthcare — Pharmaceuticals\n- Infrastructure & Project Finance\n- Insurance\n- Media & Entertainment\n- Metals & Mining\n- Oil & Gas — E&P\n- Oil & Gas — Integrated & Refining\n- Oil & Gas — Midstream & Pipeline\n- Packaging\n- Retail & Apparel\n- Shipping & Ports\n- Steel\n- Structured Finance — ABS/RMBS/CMBS\n- Technology — Hardware & Semiconductors\n- Technology — Software & Services\n- Telecommunications\n- Transportation & Logistics\n- Utilities — Electric\n- Utilities — Gas Distribution\n- Utilities — Water\n\nOnce the user selects, treat their choice exactly as if they had typed\n`Run a sector brief for {selected sector}` and continue from Step 1.\n\nIf the user already named a sector, **skip this step entirely** and go straight to Step 1.\n\n---\n\n## Step 1 — Read the template\n\nRead `assets/template.html` (relative to this skill directory) once. Keep its exact structure —\nCSS, `<head>`, cover, hardcoded TOC, section order, and element IDs — as the scaffold for the\nfinal artifact. Do **not** copy it to the workspace and do **not** open it.\n\n---\n\n## Step 2 — Research phase\n\n### 2a — Resolve representative rated companies (one `findEntity` call)\n\nCall `findEntity` **once**, with `data` set to criteria for the sector's largest Moody's-rated\ncompanies, passed verbatim with the ranking qualifier, e.g. `\"top 10 largest {Sector} companies\nby revenue\"`, and `numberOfResults: 10`. Keep the returned entities in rank order (and the\n`sortedBy` basis the response names). The first (top-ranked) entity is the representative entity\nthat anchors `getEntitySectorOutlook` and `getEntityCountryProfile`; the remaining entities are\nfallbacks for the outlook lookup and a Moody's-sourced list of key players. Build the player list\nonly from entities `findEntity` returned — never add companies from memory — and report any\nshortfall in count rather than padding it. You are not writing a company profile. Do not\nfabricate financial or credit data at this stage.\n\n### 2b — Research batch (parallel)\n\nOnce the entities are resolved, fire ALL of the following in a **single parallel batch**\n(`{Sector}` is passed to `searchAllDocuments` as `filter.sectors: [\"{Sector}\"]`, in addition to the\nkeywords shown):\n\n#### Moody's research and data\n\n| Call | Purpose |\n|------|---------|\n| `searchAllDocuments` keywords \"{Sector} Sector Overview\" | Sector definition, methodology, key activities |\n| `searchAllDocuments` keywords \"{Sector} Sector, industry\" | Sector overview, key players, geographic scope, and industry structure (competition, supply chain, barriers to entry, concentration) |\n| `searchAllDocuments` keywords \"Economic factors impact on {Sector} Sector\" | Macro-economic context, including regulatory developments |\n| `searchAllDocuments` keywords \"{Sector} sector aggregate revenue, profit margins, return on equity, medians\" | Sector-level financial metrics |\n| `searchAllDocuments` keywords \"{Sector} sector Outlook\" | Sector outlook and financial-outlook signals |\n| `searchAllDocuments` keywords \"{Sector} Sector Risk and challenges\" | Risk analysis and financial-stress signals |\n| `searchPrecisReports` keywords for the dominant macro themes (e.g. growth, inflation, interest rates, trade/tariffs) for the sector's main region(s) | Sovereign/macro context for Economic Indicators and Global Trends |\n| `getEntityCountryProfile` for the representative entity | Sovereign context (fiscal strength, institutional framework, economic resilience) |\n| `getEntitySectorOutlook` using the representative entity's `entityId` | Formal Moody's outlook direction and effective date (see \"Sector outlook sourcing\" below) |\n\n#### News research (via `searchNews`, topic-based, no entity)\n\n| Search | Purpose |\n|--------|---------|\n| \"{Sector} industry key players market share\" | Key players for overview and structure |\n| \"{Sector} sector key regions growth markets\" | Geographic scope |\n| \"{Sector} sector revenue profit margins return on equity\" | Financial metrics |\n| \"{Sector} sector competition benchmark barriers to entry supply chain\" | Industry structure, barriers to entry, supply-chain structure, concentration |\n| \"{Sector} sector regulation tariffs trade policy\" | Regulatory Environment |\n| \"{Sector} sector emerging risks\" | Risks and Challenges; corroborate specific risk claims |\n| \"{Sector} sector outlook\" | Corroborate or nuance the sector outlook |\n\nOptionally, to benchmark named participants, call `getEntityFinancials_v2` for individual\ntop-ranked entities and report each company's figures **as returned, attributed to that company**.\nNever sum, average, or otherwise combine company figures into a sector aggregate — sector-level\nfigures (aggregate revenue, margins, medians) must be stated in a retrieved source.\n\nDo any derived arithmetic (YoY deltas, CAGR, margin changes) in bash or Python — never estimate\nmentally.\n\n### Sector outlook sourcing (Chart D must be produced)\n\nSection 6 and Chart D need a Moody's direction (Positive / Stable / Negative) and an effective\ndate. Resolve them in this order and stop at the first step that yields both:\n\n1. `getEntitySectorOutlook` with the representative entity's `entityId`.\n2. If that call errors, returns nothing usable, or the record is too large to read: **do not give\n   up and do not write an \"unable to state\" narrative.** Retry once with the next entity from the\n   `findEntity` list (do not call `findEntity` again), then continue to step 3.\n3. `searchAllDocuments` with keywords \"{Sector} sector Outlook\" and \"{Sector} Sector Overview\"\n   (with `filter.sectors`; `publishDate` mode `latest` first, widening if needed), and\n   `searchEntityDocuments` scoped to the representative entity with the same queries.\n   Moody's sector publications state the outlook and date in the title or summary (e.g. \"…\n   Global: Outlook negative as …\", dated June 2026) — read the direction and publication date\n   from there.\n4. `searchNews` (topic-based) for corroboration of the direction and the date.\n\nOnly if all four fail may the section say the direction could not be confirmed, in **one**\nsentence, and only then use the `<p>Chart data unavailable</p>` fallback. As soon as a direction\nis known, Chart D is drawn — a news-based finding with a clearly dated source is enough. Always\nstate that this is a *sector outlook*, not an issuer rating or implied rating (never conflate\nthe two). Keep the outlook paragraphs analytical (drivers, regional nuance); do not describe\ntooling limits.\n\n---\n\n## Step 3 — Synthesize all sections\n\nUse Moody's internal research as the **primary foundation** for every section. News results\nserve only to supplement gaps or validate findings. When conflicts arise, prioritize Moody's\nunless external data provides substantial evidence for reconsideration.\n\nWrite in professional credit-research language. Always attribute sources with numbered citation\nreferences inline. The exact inline markup, the URL-less fallback, and the rule that `n`\nmatches the row position of the source inside `#sa-sources` are defined in\n[skills/shared/citations/SKILL.md](../shared/citations/SKILL.md).\n\n### Section 1: Sector Overview\n\nFour subsections:\n1. **Description of the Sector** — What the sector does and its position in the broader economy;\n   define the industry, key activities, product/service categories, and business-model\n   differences\n2. **Market Size and Growth Trends** — Aggregate market size (revenue, volume) and recent growth\n   trajectory, with concrete figures where available; historical growth rates, regional growth\n   data\n3. **Key Players** — The sector's major companies and their approximate relative scale/market\n   share, and roles within the sector (company list drawn from the `findEntity` ranked results\n   and Moody's research; state the ranking basis)\n4. **Geographic Scope** — Where the sector's activity is concentrated globally; key regions of\n   activity, potential growth markets, region-specific trends\n\n### Section 2: Macro-Economic Context\n\nThree subsections:\n1. **Economic Indicators** — The macro variables most material to this sector (rates, inflation,\n   GDP growth, demand drivers, commodity prices, consumer spending/confidence), with concrete\n   current values/trends\n2. **Regulatory Environment** — The regulatory regime(s) governing the sector, laws, compliance\n   risks, tariff/trade policy, and any notable recent or pending changes\n3. **Global Trends and External Factors** — Structural/secular forces (trade, technology,\n   demographics, geopolitics, channel evolution) shaping the sector\n\n### Section 3: Financial Performance Analysis\n\nThree subsections with **mandatory quantitative data**:\n1. **Sector-Level Financial Metrics** — Aggregate revenue, margins, leverage, return on equity,\n   or other sector-defining numbers. Every metric must include the actual number with\n   $/€/£/% figures (e.g., \"Aggregate revenue of $35.2 trillion in 2025\") followed by analytical\n   commentary\n2. **Historical Trends** — 3–5 year trend in the same metrics: demand/earnings trajectories,\n   recent growth rates. **Chart A follows this subsection's prose.**\n3. **Projected Financial Outlook** — Forward-looking financial trajectory: forecast key metrics,\n   earnings outlook, key drivers shaping the near term, structural offsets and strategic\n   responses\n\n### Section 4: Industry Structure and Dynamics\n\nFour subsections:\n1. **Main Participants** — The sector's principal categories of participants (not just company\n   names — roles in the value chain), with benchmark companies, market share, and significance\n2. **Supply Chain Analysis** — Upstream/downstream structure and dependencies: suppliers,\n   manufacturers, distributors, customers, key pressure points\n3. **Competitive Landscape** — Porter's Five Forces analysis. Rate each of the five forces\n   (Threat of New Entrants, Bargaining Power of Suppliers, Bargaining Power of Buyers, Threat of\n   Substitutes, Competitive Rivalry) as **High**, **Moderate**, or **Low**, with a\n   Moody's-grounded sentence of justification for each. **Chart C follows this subsection's\n   prose.**\n4. **Barriers to Entry** — Capital, regulatory, brand, or technology barriers facing new\n   entrants (and market saturation)\n\n### Section 5: Risks and Challenges\n\nFive subsections:\n1. **Operational Risks** — Execution, supply, technology, or capacity risks specific to the\n   sector (supply-chain disruptions, labor shortages, working capital)\n2. **Regulatory Risks** — Pending or existing regulation that could affect sector economics\n   (compliance requirements, policy changes, tariff exposure)\n3. **Market Risks** — Demand, pricing, or competitive risks (demand volatility, category\n   weakness)\n4. **Financial Performance and Capital Structure** — Leverage, refinancing, and capital-access\n   risks across the sector (default outlook, margin pressure, deleveraging)\n5. **Environmental and Social Risks** — Climate, ESG, labor, or reputational risks material to\n   the sector (social/governance pressures)\n\n### Section 6: Sector Outlook\n\n**Paragraph-only — `<p>` tags only, no bullets and no subsection-title headers.** State the\nMoody's outlook (Positive, Stable, Negative) and its effective date in the opening sentence\n(sourced per \"Sector outlook sourcing\" above). Then provide 2–3 well-developed paragraphs of\nsupporting analysis — primary drivers, regional nuances, key factors and considerations.\n**Chart D follows the outlook paragraphs.** Always state clearly that this is a sector outlook,\nnot an issuer rating or implied rating.\n\n### Executive Summary\n\nWrite after all other sections are complete, from their finished content. Half-page maximum.\n**`<p>` tags only — flowing paragraphs, no bullet points and no subsection headers.**\nSynthesize the defining characteristics of the sector, its financial trajectory, its principal\nrisks, and Moody's outlook direction into one cohesive narrative — do not simply restate each\nsection in turn. Do not introduce any claim, figure, or citation that is not already present in\nthe finished sections; the summary synthesizes, it does not conduct new research.\n\n### Sources\n\nCollect all sources. The source data shape (`id`, `title`, `source`, `date`, `url`) and the\nend-of-document Citations row markup are defined in\n[skills/shared/citations/SKILL.md](../shared/citations/SKILL.md).\n\n---\n\n## Inline SVG Charts — Section Instructions\n\nAfter synthesizing each of the following sections, embed one inline SVG chart directly in the\nsection content at the position indicated. All charts must be self-contained (no external scripts\nor stylesheets) and share the shell and rules below. If source data for any chart is unavailable,\nemit `<p>Chart data unavailable</p>` instead of a fabricated chart — never omit silently.\n\n**Shared shell (Charts A, C, D):**\n\n- Root: `<svg viewBox=\"0 0 700 H\" xmlns=\"http://www.w3.org/2000/svg\" style=\"width:100%;max-width:700px;display:block;margin:16px 0;\">`\n- Inside it: `<style>.chX text { font-family: 'Source Sans Pro', Arial, sans-serif; }</style>`, then\n  `<title>…</title>` (for accessibility), then `<g class=\"chX\">` (X = A, C or D) wrapping\n  everything else.\n- First element in the group: background `<rect x=\"0\" y=\"0\" width=\"700\" height=\"H\" fill=\"#f8fafd\" rx=\"4\"/>`.\n- Chart title: centered at x=350, `font-size=\"11\" font-weight=\"700\" fill=\"#003087\"` (y given per chart).\n- Never use a bare minus in any label — `(-X)` form only.\n- Do not use multi-value `rx` (e.g. `rx=\"3 0 0 3\"`); it is invalid SVG.\n\n### Chart A — Revenue bars + EBITDA margin line (Section 3, `viewBox=\"0 0 700 320\"`, class `chA`)\n\nInsert immediately after the Historical Trends subsection prose.\n\n**Data sourcing:** the yearly aggregate sector revenue and EBITDA margin values must be stated in\na retrieved Moody's publication or news source — never built by summing or averaging individual\ncompanies from `getEntityFinancials_v2`, and never estimated. If fewer than 3 years of sourced\nsector-level figures are available, emit `<p>Chart data unavailable</p>` instead of the chart.\n\nTitle text (y=18): `{Sector}: Revenue ($T) & EBITDA Margin (%)` (escape `&` as `&amp;`).\nUse the last 3–5 fiscal years; `n` = number of years. Unit is `$T` (one decimal) when the largest\nrevenue is ≥ $1T, otherwise `$B`.\n\nLayout (all of it computed with bash or Python — exact arithmetic, since no calculator tool is\navailable — before writing any markup; never place mentally-estimated coordinates):\n\n- Plot area: x from 65 to 635, y from 40 (top) to 260 (baseline). Height 220, width 570.\n- Left axis `L_max`: smallest \"nice\" value (1, 2, 2.5, 5 × 10^k) that is ≥ 1.05 × the largest\n  revenue and divides into 5 equal steps. Right axis `R_max`: smallest multiple of 5 that is\n  ≥ 1.25 × the largest margin (e.g. 12.5% → 20%). If any margin is negative, emit the\n  unavailable placeholder instead.\n- Axis lines: `<line>` left (x=65, y 40→260) and baseline (y=260, x 65→635), stroke `#dde3ee`;\n  right axis `<line x1=\"635\" y1=\"40\" x2=\"635\" y2=\"260\" stroke=\"#0073CF\" stroke-width=\"1\" stroke-dasharray=\"2,2\"/>`.\n- Five dashed gridlines at y = 216, 172, 128, 84, 40 (`stroke=\"#eef1f6\" stroke-dasharray=\"3,3\"`), x 65→635.\n- Left tick labels (6, from `$0` to `L_max`) at x=58, `text-anchor=\"end\"`, `font-size=\"10\" fill=\"#6b7fa3\"`,\n  y = gridline y + 3. Right tick labels (0% to `R_max`) at x=642, `text-anchor=\"start\"`,\n  `font-size=\"10\" fill=\"#0073CF\"`, y = gridline y + 3, same six positions.\n- Axis titles, `font-size=\"10\"`: `Revenue ($T)` fill `#003087` at x=18,y=155 with\n  `transform=\"rotate(-90,18,155)\"`; `EBITDA Margin (%)` fill `#0073CF` at x=680,y=155 with\n  `transform=\"rotate(90,680,155)\"`; both `text-anchor=\"middle\"`.\n- Bars: slot = 570 / n; center_i = 65 + slot × (i + 0.5); bar width = min(80, 0.6 × slot);\n  `x = center_i − width/2`; `height = revenue / L_max × 220`; `y = 260 − height`;\n  `fill=\"#003087\" opacity=\"0.85\"`.\n- Bar value label: `x = center_i`, `y = bar y − 4.4`, `text-anchor=\"middle\" font-size=\"10\" fill=\"#003087\"`, e.g. `$3.4T`.\n- Year labels: `x = center_i`, `y=275`, `text-anchor=\"middle\" font-size=\"11\" fill=\"#333\"`.\n- Margin line: `<polyline points=\"…\" fill=\"none\" stroke=\"#0073CF\" stroke-width=\"2.5\" stroke-linejoin=\"round\"/>`\n  through `(center_i, 260 − margin / R_max × 220)`; one `<circle r=\"4\" fill=\"#0073CF\">` per\n  point; label above each point at `y = cy − 4.5`, `text-anchor=\"middle\" font-size=\"9\" font-weight=\"700\" fill=\"#0073CF\"\n  stroke=\"#fff\" stroke-width=\"3\" paint-order=\"stroke\"`, e.g. `12.5%` (the white outline keeps the\n  label readable where the line crosses the navy bars).\n- Legend (bottom): `<rect x=\"200\" y=\"295\" width=\"12\" height=\"10\" fill=\"#003087\" opacity=\"0.85\"/>` +\n  text `Revenue ($T)` at x=217,y=304 (`font-size=\"10\" fill=\"#333\"`); then\n  `<line x1=\"290\" y1=\"300\" x2=\"310\" y2=\"300\" stroke=\"#0073CF\" stroke-width=\"2.5\"/>`,\n  `<circle cx=\"300\" cy=\"300\" r=\"3\" fill=\"#0073CF\"/>`, text `EBITDA Margin (%)` at x=316,y=304\n  (`font-size=\"10\" fill=\"#0073CF\"`).\n\n### Chart C — Porter's Five Forces scored bars (Section 4, `viewBox=\"0 0 700 220\"`, class `chC`)\n\nInsert immediately after the Porter's Five Forces prose.\n\nTitle text (y=16): `Porter's Five Forces — {Sector}`. Scores: High=3, Moderate=2, Low=1.\nThese coordinates are fixed; no recalculation is needed.\n\n- Row order, top to bottom: Competitive Rivalry, Threat of New Entrants, Supplier Power,\n  Buyer Power, Threat of Substitutes. Bar `y` = 25, 63, 101, 139, 177; bar `height=\"28\" rx=\"3\"`.\n- Bars start at `x=\"195\"`. Width by rating: **Low 158.3, Moderate 316.7, High 475.0**\n  (bar end x = 353.3 / 511.7 / 670.0). Fill: High `#C0392B`, Moderate `#E67E22`, Low `#27AE60`.\n- Force label: `x=\"190\"`, `y = bar y + 19`, `text-anchor=\"end\" font-size=\"11\" fill=\"#333\"`.\n- Rating text inside the bar: `x = bar end x − 5`, same `y`, `text-anchor=\"end\" font-size=\"10\"\n  font-weight=\"700\" fill=\"#fff\"`, content `High` / `Moderate` / `Low`.\n- Bottom axis: `<line x1=\"195\" y1=\"210\" x2=\"670\" y2=\"210\" stroke=\"#aaa\" stroke-width=\"1\"/>`; tick\n  `<line>`s (y 207→213, `stroke=\"#aaa\"`) at x = 353.3, 511.7, 670.0 with labels `Low`, `Moderate`,\n  `High` at y=220, `text-anchor=\"middle\" font-size=\"9\" fill=\"#888\"`.\n- The ratings drawn must match the High/Moderate/Low ratings written in the prose above it. If\n  the five-forces ratings cannot be determined from source data, emit the unavailable placeholder.\n\n### Chart D — Outlook sentiment track (Section 6, `viewBox=\"0 0 700 120\"`, class `chD`)\n\nInsert immediately after the outlook paragraphs.\n\nTitle text (y=16): `Moody's Sector Outlook — {Sector}`. Coordinates are fixed; no recalculation is needed.\n\n- Three zone rects, `y=\"55\" height=\"35\"`, each `width=\"206.7\"`: Negative `x=\"40\"` fill `#C0392B`;\n  Stable `x=\"246.7\"` fill `#2980B9`; Positive `x=\"453.3\"` fill `#27AE60`.\n- Zone labels, `y=\"77\" text-anchor=\"middle\" font-size=\"12\" font-weight=\"700\" fill=\"#fff\"`, at\n  x = 143.3 (Negative), 350.0 (Stable), 556.7 (Positive).\n- Marker: a downward triangle above the active zone, filled with that zone's color:\n  Negative `points=\"131.3,37 155.3,37 143.3,55\"`; Stable `points=\"338,37 362,37 350,55\"`;\n  Positive `points=\"544.7,37 568.7,37 556.7,55\"`.\n- Caption below the track: `x` = the active zone center above, `y=\"110\"`, `text-anchor=\"middle\"\n  font-size=\"10\" font-weight=\"700\"`, fill = active zone color, content `&#9660; {Outlook} — {Month YYYY}`\n  (the outlook's effective date).\n- The marker must agree with the outlook stated in the section's opening sentence.\n\n---\n\n## Step 4 — Stream the complete HTML artifact\n\nAfter all sections are synthesized, produce **one** final assistant message. The message contains:\n\n1. A one-line summary sentence (e.g. `Sector Brief for {Sector}:`).\n2. A single fenced ` ```html ` code block containing the **entire filled `template.html`\n   document** — with every element from the streaming protocol populated in place. No partial\n   documents, no separate code blocks per section.\n\nThe code block **must**:\n\n- Start at column 0 with ` ```html ` and end with a closing ` ``` ` on its own line.\n- Contain a complete, standalone HTML document (doctype → `</html>`) that renders without\n  external dependencies.\n- Preserve the template's `<head>` (CSS, fonts), cover, hardcoded TOC, section order, and\n  element IDs exactly. Only the empty targets defined below are populated.\n\n### Cover + footer\n\n1. `#sa-cover-title` — `<strong>{Sector}</strong><br>Sector Brief` (HTML, not plain text).\n2. `#sa-date` — today's date in `Month D, YYYY` form, e.g. `April 15, 2026`.\n3. `#sa-footer-date` — same date string.\n\nThe \"Sector Overview\" heading (`#sa-overview-title`) keeps its default text.\n\n### Section content targets\n\nEach of the following divs takes fully-authored HTML (`<p>`, `<ul><li>`, and\n`<strong class=\"subsection-title\">…</strong>` only — no other block tags, apart from the inline\nchart SVGs):\n\n4. `#sa-exec` — Executive Summary. `<p>` paragraphs only; no bullets, no subsection headers.\n5. `#sa-overview` — Section 1 body with four `<strong class=\"subsection-title\">` subheaders.\n6. `#sa-macro` — Section 2 body with three subheaders.\n7. `#sa-financial` — Section 3 body with three subheaders, followed by Chart A after the\n   Historical Trends prose. Every metric must include a concrete number.\n8. `#sa-structure` — Section 4 body with four subheaders. Porter's Five Forces must use\n   High / Moderate / Low ratings per force, followed by Chart C.\n9. `#sa-risks` — Section 5 body with five subheaders.\n10. `#sa-outlook` — Section 6 body. `<p>` paragraphs only (no bullets, no subheaders): lead with\n    the Moody's outlook (Positive / Stable / Negative) and effective date, then 2–3 paragraphs,\n    followed by Chart D.\n\n### Sources container\n\n11. `#sa-sources` — end-of-document Citations rows. One `<div class=\"source-item\">` per\n    source, in ascending `id` order, using the canonical row markup defined in\n    [skills/shared/citations/SKILL.md](../shared/citations/SKILL.md). Apply that file's rules\n    for URL-less rows and missing `source`/`date` fields.\n\n### HTML conventions\n\n- Use `<p>` for paragraphs.\n- Use `<ul><li>…</li></ul>` for bullet points (nested `<ul>` for sub-bullets) in the sections\n  that allow them.\n- Use `<strong class=\"subsection-title\">Subheader</strong>` for subsection headers within\n  each section that has them. Do not repeat the top-level section title — the template already\n  renders it.\n- Emit inline citations per\n  [skills/shared/citations/SKILL.md](../shared/citations/SKILL.md).\n- Escape any `&`, `<`, `>` that appear in the narrative (`&amp;`, `&lt;`, `&gt;`).\n\n---\n\n## Tips\n\n- Run ALL research searches in a single parallel batch (after the representative entity is\n  resolved).\n- Moody's data is the foundation — news supplements. Attribute news sources explicitly.\n- The executive summary should be written last, after all other sections are synthesized.\n- Compute derived figures and chart geometry with bash or Python — never by eye.\n- Executive Summary and Sector Outlook are paragraph-only — no bullets, no subsection headers.\n- Citations follow the shared citations skill — read\n  [skills/shared/citations/SKILL.md](../shared/citations/SKILL.md) before authoring any `[n]`\n  reference or the Citations block.\n\n---\n\n## Negative number formatting\n\nUse `(-X)` for ALL negatives: `(-9%)`, `(-1.2pp)`, `(-$3.4B)`, `(-250 bps)`. Never use bare minus (`-9%`), en-dash (`–9%`), or parentheses without minus (`(9%)`). Apply to growth rates, margin changes, YoY deltas, and negative monetary values — including inside chart labels.\n\n---\n\n## Output and presentation (required final steps)\n\nAfter assembling the report, you MUST follow this exact delivery sequence. Do not skip steps\nand do not substitute alternatives. When updating this skill, do not delete or modify any\nother file in the `skills/sector-brief/` folder.\n\n1. **Write the HTML file in a single call.** Call `create_file` to write the entire HTML to\n   `/mnt/user-data/outputs/{sector_slug}_sector_analysis.html` in **one** call.\n   `{sector_slug}` is the lowercased, hyphenated sector name (e.g. `retail-apparel`,\n   `oil-gas`).\n2. **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.\n3. **Show the widget.** Call `visualize:show_widget` to surface the rendered report visually\n   to the user.\n4. **One short follow-up sentence in chat.** Write a single brief sentence acknowledging the\n   report is ready. Nothing more.\n\n**Strict prohibitions:**\n\n- **Never** emit the HTML as a fenced code block in the chat response.\n- **Never** inline the HTML, JSON payload, or large excerpts of the report body in the chat\n  message.\n"
}

SHA-256 of public snapshot: 46885385b020df74101c4267fd287bd4718a7146e05cac5532f3a27dcedcdde9