SkillsGrove
SkillsGrove/Documentos de oficina/drtranquanghung91-vn/grand-rounds/template-matching

template-matching

Instalación

$npx skills add https://github.com/drtranquanghung91-vn/grand-rounds --skill template-matching
$git clone --depth 1 https://github.com/drtranquanghung91-vn/grand-rounds.git /tmp/grand-rounds && mkdir -p ~/.claude/skills && cp -r /tmp/grand-rounds/skills/template-matching ~/.claude/skills/template-matching
Instala por favor esta Agent Skill por mí: https://github.com/drtranquanghung91-vn/grand-rounds/tree/91df8f3c6cf86b4d593dc64266272343fdf60290/skills/template-matching. Lee primero su SKILL.md y sus scripts, y solo instálala en mi carpeta de skills cuando hayas confirmado que es segura.

Resumen

Descripción original · MITUse when a medical presentation must follow a supplied template or house style: a hospital, university or congress .pptx/.potx, a previous deck whose look should be copied, a brand guide, or a logo and colour set; also when converting a PowerPoint template's look into an HTML deck.
El SKILL.md siguiente se reproduce de drtranquanghung91-vn/grand-rounds (commit 91df8f3) bajo la licencia MIT. El texto no se ha modificado; solo se omiten los metadatos de cabecera del archivo, las imágenes se muestran como enlaces y los archivos muy largos se truncan. Copyright 2026 Trần Quang Hưng. Licencia: LICENSE. Solo se muestra el archivo de instrucciones; consulta el repositorio original para ver los scripts.

Template matching

Overview

The template is the user's institution speaking; reproduce it, don't reinterpret it. Measure the template, write what you measured into theme/theme.json, and let both builders read that file. Template elements (header bars, logos, footers, closing slides) are never "slop" and never improved upon.

Procedure

  1. Scan the file:

    python scripts/scan_template.py template.pptx --out <talk>/theme --render
    

    This writes scan.json: slide size, theme colours, theme fonts, fonts actually used on slides, every layout and its placeholders, background images, and media with sizes. It also extracts the media files. --render exports a PNG of each slide when PowerPoint (Windows) or LibreOffice is installed.

  2. Look at the renders. Background images often carry the real design (a coloured header band, a footer with the logo). Theme colours are often Office defaults that the template never uses. Sample colours from the renders or background images:

    python scripts/scan_template.py template.pptx --sample theme/media/image2.jpeg 500,40 500,700
    
  3. Write theme/theme.json (shape below). Record geometry in the template's own proportions (fractions of slide width/height), so it maps onto 1920 × 1080 or 13.33 in.

  4. Note what not to copy: watermarked stock photos, low-resolution logos (ask for the original file), 4:3 backgrounds stretched to 16:9. Put these in theme/notes.md and tell the user.

theme/theme.json

{
  "source": "template.pptx", "aspect": "16:9",
  "fonts": {"heading": "Arial", "body": "Arial", "serif_banner": "Times New Roman"},
  "colors": {"primary": "#09B1BE", "primary_dark": "#057E88", "rule": "#400D12",
             "title_text": "#FFFFFF", "accent": "#E8141B", "ink": "#1A1A1A",
             "muted": "#666666", "band": "#EBE8E3",
             "intervention": "#D7262E", "control": "#5B6B82"},
  "logo": {"file": "theme/logo.png", "position": "footer-right", "height_frac": 0.11},
  "layouts": {
    "title":   {"header_banner": true, "band_frac": [0.19, 0.71], "title_case": "upper", "title_color": "accent"},
    "content": {"header_frac": [0, 0.134], "header_rule_px": 6, "footer_frac": [0.852, 1],
                "title_case": "upper", "title_align": "center"},
    "closing": {"use": "title layout with thank-you text"}
  },
  "type_scale_px": {"title": 64, "subtitle": 34, "body": 24, "small": 20, "footer": 21}
}

Add intervention and control colours that fit the template and stay readable. Check that they differ in lightness, so they survive colour-blindness and greyscale printing.

When there is no template

Propose a restrained palette from the brief (a hospital's brand colour if public, else a neutral one). Ask the user to confirm it in one question with a rendered swatch, then write theme.json the same way.

Ver el texto completo de la licencia (MIT)
MIT License

Copyright (c) 2026 Trần Quang Hưng

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Ver NOTICE
# Third-party material

The MIT licence in `LICENSE` covers this repository's code and text. These files are under
their own licences:

| Files | Source | Licence |
|-------|--------|---------|
| `examples/fictional-trial/figures/icons/t-lymphocyte.svg`, `cancerous-cell-1.svg` and the copies inlined in `figures/s02-checkpoint.svg`, `out/nova1-journal-club.html`, `skills/medical-figures/examples/checkpoint-blockade.html` and `assets/screenshots/mechanism.*` | Servier Medical Art via Bioicons (https://bioicons.com) | [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/) |
| `examples/fictional-trial/figures/icons/immuneglobuline_igG_blue.svg` and its inlined copies (same files as above) | Helicase_11 via Bioicons | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
| `examples/heart-anatomy/figures/servier/*`, the illustrations embedded in `examples/heart-anatomy/figures/four-chambers.labelled.svg` and `examples/heart-anatomy/out/heart-anatomy.html`, and the heart frames in `assets/screenshots/` | Servier Medical Art (https://smart.servier.com), exported from the "Heart physiology" kit; labels added | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |

`examples/heart-anatomy/figures/ai/heart-chatgpt.jpg` was generated with ChatGPT (OpenAI) by
the repository author and is released under MIT with the rest of the repository.