brand-template-enforcer
Applies bundled or SharePoint-hosted organization-approved PowerPoint and Word templates whenever the agent is about to create, generate, export, or substantially rebuild a presentation, slide deck, report, proposal, brief, memo, letter, or other .pptx, .docx, or .dotx deliverable. Use before any file-generation tool or document-creation skill so the output starts from the appropriate brand template instead of a blank file. Do not use for read-only analysis or minor edits that do not create a new Office file.
microsoft · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add microsoft/cat-agent-skills --skill brand-template-enforcer技能说明
name: brand-template-enforcer description: >- Applies bundled or SharePoint-hosted organization-approved PowerPoint and Word templates whenever the agent is about to create, generate, export, or substantially rebuild a presentation, slide deck, report, proposal, brief, memo, letter, or other .pptx, .docx, or .dotx deliverable. Use before any file-generation tool or document-creation skill so the output starts from the appropriate brand template instead of a blank file. Do not use for read-only analysis or minor edits that do not create a new Office file.
Agent runtime instructions
Before generating a PowerPoint or Word file, select and apply a compatible
template from assets/.
Instructions
- Determine the requested output:
- PowerPoint:
.pptx - Word:
.docxor.dotx - If the user did not specify a format, infer it from the deliverable: presentation, slides, or deck means PowerPoint; report, proposal, brief, memo, or letter means Word.
- PowerPoint:
- Inventory compatible Office template binaries available in
assets/and the agent's configured knowledge sources.- Treat
assets/template-manifest.jsonas optional routing configuration. - Use fully configured enabled manifest entries when available.
- Ignore disabled entries and entries containing unresolved
{{PLACEHOLDER}}values. These starter entries MUST NOT block discovery of valid templates available elsewhere.
- Treat
- Select the template using this order:
- A template explicitly named by the user.
- Ignore every manifest entry where
enabledisfalse. - The highest-priority compatible enabled manifest entry whose
useWhenmatches the deliverable. - The compatible enabled manifest default.
- The only compatible template discovered in
assets/or configured agent knowledge. - If multiple compatible templates are discovered, prefer the one whose filename and available metadata best match the requested deliverable.
- If multiple templates remain equally suitable, ask the user to choose.
- Resolve the selected template:
- For a manifest-selected template, resolve its ordered
sources: use an existingassetfirst, then retrieve the exact configuredsharepointKnowledgefile. - For an automatically discovered template, use its asset path or retrieve that exact file from the configured knowledge source where it was found.
- Retrieve the actual Office binary. Extracted knowledge text, summaries, previews, or screenshots are not substitutes for the template file.
- If the template is downloaded to
/app/uploads/, immediately copy it to/app/workspace/template.pptxfor PowerPoint or/app/workspace/template.docxfor Word. Pass only the workspace copy to preprocessing and generation scripts. - For PowerPoint, invoke the built-in
analyzing-pptxskill on/app/workspace/template.pptxto inspect slide masters, layouts, and placeholder indices before generation. Retain the workspace binary for template-based generation. - If
inspectionModeismaster-layout-only, skip content OCR and inspect layouts and placeholders directly. If automatic analysis returns zero OCR characters for every slide, stop further OCR attempts and switch immediately to master, layout, and placeholder inspection. - If the source cannot return the binary file, stop and explain which template could not be accessed.
- For a manifest-selected template, resolve its ordered
- If no compatible template exists, stop before generating the file. Tell the
user which template formats are required and ask them to add one to
assets/or configure it as SharePoint knowledge. Generate without a template only when the user explicitly approves an unbranded exception. - Copy the selected template to a new output file. NEVER overwrite or modify the bundled template.
- Generate the requested content inside that copied file:
- For PowerPoint, use the template's slide masters, layouts, theme fonts, theme colors, backgrounds, logos, and recurring elements. Create slides from existing layouts rather than blank slides.
- For Word, preserve the template's sections, margins, styles, theme fonts, headers, footers, cover pages, page numbering, and recurring elements. Apply named styles rather than direct formatting.
- Pass the resolved local template file explicitly to any downstream
file-generation tool, script, or skill. Do not merely describe the brand or
approximate its colors in a newly created blank file. NEVER pass an
/app/uploads/path to a generation script. - Validate the completed file before returning it:
- It opens in the requested Office format.
- Template branding, layouts, styles, headers, footers, and logos remain.
- No template placeholder text remains unless the user requested it.
- Content is readable and does not visibly overflow or overlap.
- Return the branded output and identify the template filename and source used.
See template selection rules for manifest behavior and PowerPoint generation procedures for safe template manipulation.
Brand adherence guidance
Customize the placeholders below when explicit brand-writing rules are
available. Unresolved placeholders MUST NOT block use of a valid template.
Ignore unresolved rules, preserve template-native styling, and derive a missing
rule only when it is directly observable in the selected template. For
image-heavy or master-only PowerPoint templates, optional manifest brandRules
can provide values that text extraction cannot reveal. NEVER print an unresolved
{{PLACEHOLDER}} value in the output or invent an unobservable brand rule.
Brand identity
- Organization or brand name:
{{BRAND_NAME}} - Brand description:
{{BRAND_DESCRIPTION}} - Approved logo usage:
{{LOGO_USAGE_RULES}} - Required tr