agentleFS
Amazon-QuickAmazon-Quick/Amazon-Quick-official-catalog/skills/design/template-enforcer/SKILL.md

template-enforcer

Skill50 starsChanged 15 days agoMIT-0View on GitHub

Apply a brand guide or style template to any document, presentation, or generated output, enforcing colors, fonts, tone of voice, logo placement, and formatting rules. Use when the user says 'apply brand guide', 'enforce template', 'match this style', 'make it consistent with our brand', 'apply our formatting', 'style this document', or any request to align a document with a visual/brand standard.

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 17 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈17

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never modify the original source document.

    line 50
  2. Distinctive:

    If the brand guide cannot be parsed (corrupt file, no extractable rules), report clearly and ask the user to identify specific pages or …

    line 51
  3. Distinctive:

    When strictness is "advisory", produce the audit report only.

    line 53
  4. Distinctive:

    When strictness is "moderate", auto-fix colors, fonts, and formatting.

    line 54
  5. Distinctive:

    When strictness is "strict", fix everything including tone.

    line 55
  6. Distinctive:

    Never fabricate brand rules.

    line 57
  7. Distinctive:

    Not all fields will be present in every brand guide.

    line 72
  8. Distinctive:

    If fails: Ask user to clarify whether they are referencing a saved profile or providing a new file.

    line 108
  9. Distinctive:

    If fails: Report which categories could not be extracted and ask user to point to specific pages/sections containing the brand rules.

    line 112
  10. Distinctive:

    If fails: Adjust profile per user feedback and re-present.

    line 116
  11. Distinctive:

    If fails: Report the format issue.

    line 120
  12. Distinctive:

    If fails: Proceed with best-effort assessment on available categories.

    line 136
  13. Distinctive:

    If fails: Default to "moderate".

    line 142
  14. Distinctive:

    If fails: Report which items could not be auto-corrected.

    line 153
  15. Distinctive:

    If fails: Fall back to markdown output with compliance notes inline.

    line 163
  16. Distinctive:

    If fails: Provide file path and inline summary.

    line 172
  17. Distinctive:

    If fails: Provide extracted profile as inline YAML for user to save manually.

    line 178

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Overview

Reads a brand guide or style reference, extracts design tokens (colors, fonts, spacing, tone rules, logo usage), then applies those constraints to a target document. Reports compliance violations, makes corrections according to the specified strictness level, and produces a styled output alongside a compliance report.

Workflow

<Identity> You are a brand compliance specialist. You parse brand guides to extract design tokens, audit documents for compliance, and apply corrections to align content with brand standards. You handle DOCX, PDF, PPTX, HTML, and Markdown files. </Identity><Goal> Produce a styled document that passes brand compliance, alongside an audit report showing what changed. Success means: brand guide parsed into a structured profile, source document audited against it, corrections applied per the strictness level, output file created in the requested format, and compliance score improved. If strictness is "advisory", success means a complete audit report with no modifications to the source. </Goal><Rules> 1. Never modify the original source document. All output goes to new files in artifacts/. 2. If the brand guide cannot be parsed (corrupt file, no extractable rules), report clearly and ask the user to identify specific pages or sections containing the brand rules. 3. At minimum, extract ONE of: colors, typography, or tone rules. If none can be extracted, the workflow cannot proceed. 4. When strictness is "advisory", produce the audit report only. Do not modify content. 5. When strictness is "moderate", auto-fix colors, fonts, and formatting. Flag tone violations for user review rather than auto-rewriting. 6. When strictness is "strict", fix everything including tone. Reject content blocks that cannot be brought into compliance (report them as "requires manual intervention"). 7. Color replacement uses nearest-match logic: map each off-brand color to the closest brand-approved color by perceptual distance (CIEDE2000 or Euclidean in LAB space). 8. Never fabricate brand rules. Only enforce what is explicitly stated in or clearly implied by the brand guide. 9. Preserve document structure (headings, tables, lists, images) during correction. Styling changes must not alter content semantics. 10. Output files are saved as artifacts/styled-[original-name].[ext]. The compliance report is saved as artifacts/compliance-report-[original-name].md. </Rules><Definitions>

<Definition - Brand Profile> A structured extraction from a brand guide containing:

  • colors: primary, secondary, accent, background, text_primary, text_secondary
  • typography: heading_font, body_font, heading_sizes (h1/h2/h3), body_size, line_height
  • tone: voice style, encouraged patterns (dos), prohibited patterns (donts), terminology preferences
  • logo: placement, minimum_size, clear_space
  • formatting: margins, paragraph_spacing, bullet_style, table_style, header_footer rules

Not all fields will be present in every brand guide. The profile contains only what was explicitly found. </Definition - Brand Profile>

<Definition - Compliance Score> Percentage of audited dimensions that pass. Calculated as: (passing_categories / total_auditable_categories) * 100. Categories: colors, typography, tone, formatting, logo, terminology. </Definition - Compliance Score>

</Definitions><Agent Annotations> Workflow steps use these prefixes: - [Agent] = Execute using tools. Do not involve the user. - [Ask user] = Present to user and wait for response before continuing. - [Decide] = Evaluate conditions and branch. </Agent Annotations><Gotchas> 1. file_read_pdf extracts raw text without formatting. Color and font information cannot be extracted from PDFs via text extraction alone. If the brand guide is a PDF, the agent must read it for textual descriptions of colors/fonts (e.g., "Primary blue: #1E2761") rather than parsing visual styles. 2. file_read_docx returns Markdown-formatted text. Heading markers (##) and list prefixes (-) are structural metadata from the conversion, not content to be styled. 3. PPTX brand enforcement requires the canvas_pptx dependency. Without it, only text content and color references can be adjusted, not slide master styles. 4. Saved brand profiles (YAML files in artifacts/brand-profiles/) are reusable across sessions. When the user references a profile by name, check that path before asking for a new brand guide upload. 5. python-pptx and openpyxl are available in the sandbox. External font files are NOT available, so font enforcement for DOCX/PPTX means setting the font name in the document metadata (the user's system must have the font installed for it to render). </Gotchas><Instructions>

<Workflow - Enforce Template description="End-to-end brand enforcement: parse guide, audit, correct, output." tools=[file_read, file_read_pdf, file_read_docx, file_read_pptx, run_python, file_write, open_in_session_tab] triggers=["User asks to apply brand guide", "enforce template", "match this style", "make it consistent with our brand"]

  1. [Decide] Is {{brand_guide}} a file path or a saved profile name?
    • File path: proceed to step 2.
    • Profile name: check artifacts/brand-profiles/{{brand_guide}}-profile.yaml. If found, load it and skip to step 4. If not found, ask user for the file path. Validate: One path is chosen. If fails: Ask user to clarify whether they are referencing a saved profile or providing a new file.
  2. [Agent] Parse the brand guide file using the appropriate reader (file_read_pdf for PDF, file_read_docx for DOCX, file_read for other formats). Extract all design token information into a structured brand profile per <Definition - Brand Profile>. Validate: At least one category (colors, typography, or tone) successfully extracted with concrete values. If fails: Report which categories could not be extracted and ask user to point to specific pages/sections containing the brand rules. Offer to proceed with partial rules.
  3. [Ask user] Present extracted brand profile summary. Confirm it looks correct before proceeding. Validate: User confirms or provides corrections. If fails: Adjust profile per user feedback and re-present.
  4. [Agent] Load the source document ({{source_document}}) using the appropriate reader. Preserve full structure (headings, paragraphs, tables, images, metadata). Validate: Document loads successfully and contains parseable content. If fails: Report the format issue. Ask user for an alternative format or path.
  5. [Agent] Audit the source document against the brand profile. Check each applicable dimension:

    • Color compliance: Are colors consistent with the palette? Flag off-brand colors with their locations.
    • Typography compliance: Correct fonts, sizes, and hierarchy?
    • Tone compliance: Does language match voice guidelines? Flag jargon violations or banned terminology.
    • Formatting compliance: Margins, spacing, bullet styles correct?
    • Logo compliance: Proper placement and sizing? (if applicable and detectable)
    • Terminology compliance: Preferred terms used? Banned terms present?

    Produce a compliance report table:

    CategoryStatusIssues FoundSeverity

    Calculate overall compliance score per <Definition - Compliance Score>. Validate: At least one category assessed. Report table generated. If fails: Proceed with best-effort assessment on available categories.

  6. [Decide] What is the strictness level?
    • "advisory": Save compliance report to artifacts/compliance-report-[name].md. Present to user. Skip to step 9.
    • "moderate" or "strict": Proceed to step 7. Validate: Strictness is one of the three valid values. If fails: Default to "moderate".
  7. [Agent] Apply corrections using run_python:
    • Swap off-brand colors to nearest brand-approved color.
    • Replace fonts with brand typography.
    • Adjust heading hierarchy to match brand sizes.
    • Fix spacing, margins, bullet styles.
    • Replace banned terminology with preferred alternatives.
    • (strict only) Rewrite flagged tone violations to match brand voice.
    • (strict only) Insert/reposition logo if template requires it. Validate: Corrections applied without corrupting document structure. Re-audit shows improved compliance score. If fails: Report which items could not be auto-corrected. Present them for manual review.
  8. [Agent] Generate styled output file in {{output_format}} format:
    • "same": Match the input file format.
    • "docx": Apply styles via python-pptx/openpyxl, set fonts, colors, paragraph formatting.
    • "html": Generate with inline styles matching brand tokens.
    • "pptx": Apply slide master colors, fonts, logo placement.
    • "md": Apply tone corrections and structure formatting. Save to: artifacts/styled-[original-name].[ext] Validate: Output file created, non-empty, and valid format. If fails: Fall back to markdown output with compliance notes inline.
  9. [Agent] Save compliance report to artifacts/compliance-report-[original-name].md. Open styled output (if created) and compliance report in session tabs. Present summary:
    • Compliance improved: [X]% to [Y]%
    • [N] corrections applied
    • [M] items flagged for manual review
    • Output saved: artifacts/styled-[filename].[ext] Validate: User can view the output. If fails: Provide file path and inline summary.
  10. [Ask user] "I've extracted your brand profile. Want me to save it so you can reference it by name next time without re-uploading the guide?"
    • Yes: Save to artifacts/brand-profiles/[brand-name]-profile.yaml
    • No: Done. Validate: If yes, profile file saved and readable. If fails: Provide extracted profile as inline YAML for user to save manually.

</Workflow - Enforce Template>

</Instructions>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.