SkillsGrove
SkillsGrove/Офисные документы/LY2260789/routegraph-skill/routegraph

routegraph

Установка

$npx skills add https://github.com/LY2260789/routegraph-skill --skill routegraph
$git clone --depth 1 https://github.com/LY2260789/routegraph-skill.git /tmp/routegraph-skill && mkdir -p ~/.claude/skills && cp -r /tmp/routegraph-skill/. ~/.claude/skills/routegraph
Пожалуйста, установи для меня этот Agent Skill: https://github.com/LY2260789/routegraph-skill/tree/2d5bd81bbc561d7fdd7528716d9d16fe52e7d207/ — сначала прочитай его SKILL.md и скрипты и устанавливай в мою папку навыков только после того, как убедишься, что он безопасен.

Кратко

Исходное описание · MITGenerate editable PowerPoint technical route diagrams and reconstruct scientific instrument figures using native shapes through PowerShell and PowerPoint COM. Use for research workflows, paper schematics, exploded views, and reference-based instrument illustrations where topology, component structure and editability matter. Instrument reconstruction supports semantic scenes, cylinders, hollow cylinders, cuboids and detailed panels; photo interpretation remains an Agent review task.
Приведённый ниже SKILL.md воспроизведён из LY2260789/routegraph-skill (коммит 2d5bd81) под лицензией MIT. Текст не изменён; опущены только метаданные заголовка файла, изображения показаны как ссылки, а очень длинные файлы сокращены. Авторские права: 2026 LY2260789. Лицензия: LICENSE. Показан только файл с инструкциями; скрипты смотрите в исходном репозитории.

RouteGraph

Purpose

Create editable PowerPoint technical route diagrams, not flattened screenshots. Prefer PowerShell + PowerPoint COM scripts that draw native PPT shapes, text boxes, connectors, and grouped visual structure so the user can refine the result in PowerPoint.

RouteGraph optimizes for correct scientific and workflow logic first. Visual polish is secondary to arrow topology, readable layout, stable text, and editability.

Instrument reconstruction mode

For instrument diagrams, exploded views, or instrument photographs, read references/instrument_reconstruction.md. Use the scene compiler and existing COM renderer described there. Keep the technical-route workflow below for ordinary diagrams.

  • Inspect accessible references before creating a scene. Separate visible structure, justified simplification and unverified inference. Do not render an unknown interior as established fact.
  • Use semantic components before geometry. Cylinder, HollowCylinder, Cuboid and Panel are implemented. NativeReference preserves selected editable components from an existing PPTX for incremental migration; it is not an image or SVG fallback.
  • For an actual instrument photograph, read references/photo_exterior.md. Keep visible exterior features and record uncertainty; do not merge different panel configurations from multiple photographs.
  • Scientific Metallic is implemented. Scientific Flat and Anime Tech are reserved interfaces, not completed presets.
  • Render previews locally, inspect them and run structural checks. Apply explicit local scene patches when needed. Ask for a screenshot only if local rendering is unavailable.
  • Routegraph owns scientific structure, parametric geometry and native COM rendering. General presentation tools may validate the resulting file; they do not need to redraw it with a second engine. See the audited call chain.
  • Do not claim automated OCR, photo segmentation, internal reconstruction, physical CAD accuracy, or reference fidelity beyond the available evidence.

Workflow

  1. Understand the input.

    • For reference images, read references/reference_reconstruction.md for transparency, photographic insets and source-parameter handling.
    • For an uploaded figure or sketch, identify panels, reading order, text blocks, boxes, model blocks, result blocks, background regions, and arrows.
    • For a text-only request, infer the same structure before writing code.
    • If the diagram is complex, read references/prompts/image_to_structure.md.
  2. Output a structure plan before code.

    • Always include an arrow topology table before generating a full script.
    • Use this format:
Arrow ID | From | To | Style | Meaning | Priority
  1. Generate a PowerShell COM script.

    • Use native editable PPT elements.
    • Use absolute coordinates.
    • Reuse helper patterns from assets/templates/*.ps1.
    • Keep PowerShell special symbols stable, especially Greek letters and subscripts.
    • Do not paste the entire source figure as a background image unless the user explicitly asks.
  2. Provide run instructions.

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\routegraph_generate.ps1
  1. Iterate from screenshots.
    • Export a PNG with PowerPoint COM and inspect it when local rendering is available. Otherwise ask the user to return a screenshot.
    • On revision, inspect arrows first, then layout, then text and styling.
    • If revising from a screenshot, read references/prompts/screenshot_revision.md.

Critical Rules

  • Arrow logic has highest priority. Wrong source, target, direction, missing critical arrows, or mismatched arrow style are high-severity failures.
  • Draw each logical arrow as one continuous PowerPoint shape whenever possible.
    • Use Add-LineArrow for direct straight arrows.
    • Use Add-ElbowArrow for simple L-shaped or Z-shaped routes.
    • Use Add-PolylineArrow for controlled multi-bend routes.
    • Do not build one logical arrow from several independent Add-LineSegment calls plus a final arrowhead unless there is a true branching junction.
    • For dashed arrows, this is mandatory: a dashed route must normally be one shape so the dash pattern is continuous across bends.
  • Avoid this old segmented pattern for a single logical arrow:
Add-LineSegment
Add-LineSegment
Add-LineArrow
  • Prefer editable plain text for chemical/subscript-heavy labels:
    • PM2.5 instead of PM2.5 with rich text subscripts unless explicitly requested.
    • NO2, SO2, and O3 instead of Unicode subscripts.
  • Generate standalone special symbols through PowerShell code:
$Delta = [char]0x0394
Add-TextBox $slide "$Delta PM2.5 air quality" 340 213 190 22 13 $true $black
  • Use helper functions consistently: RGB, Add-TextBox, Add-Box, Add-LineArrow, Add-ElbowArrow, and Add-PolylineArrow. Use Add-LineSegment only for non-arrow helper lines or true branching trunks.
  • Cast PowerPoint COM line weights and freeform coordinates to [single] so generated scripts remain compatible with PowerShell 7.
  • Keep generated scripts easy to modify. Prefer semantic coordinate variables for complex diagrams.

Resource Guide

Read only the resource needed for the task:

  • references/powershell_com_conventions.md: PowerPoint COM helper conventions, layering, colors, fonts, and coordinates.
  • references/text_normalization_rules.md: text, symbols, chemical labels, and encoding-safe notation.
  • references/arrow_topology_review.md: arrow review checklist and topology failure modes.
  • references/second_pass_review.md: screenshot-based revision process.
  • references/prompts/structure_to_powershell.md: guidance for converting a structure plan into PowerShell.
  • assets/templates/four_panel_route_template.ps1: starter for multi-panel technical route diagrams.
  • assets/templates/horizontal_pipeline_template.ps1: starter for simple horizontal pipelines.
  • assets/templates/pm25_counterfactual_framework.ps1: detailed PM2.5 counterfactual framework example.
  • assets/templates/continuous_arrow_regression.ps1: focused regression deck for straight, elbow, multi-bend dashed, and true-branch routes.
  • assets/style_presets/manuscript_clean.json: restrained manuscript-style colors and typography.
  • assets/examples/: lightweight examples for expected use cases.
  • assets/examples/photonion_exterior/: complete instrument exterior example with editable PPTX, preview, scene, palette, validation and reproduction commands.

Output Contract

When generating a diagram script, include:

  1. A brief interpretation of the intended diagram.
  2. The arrow topology table.
  3. The PowerShell script or a path to the generated .ps1 file.
  4. The run command.
  5. The rendered preview and review outcome, or a request for a screenshot when local rendering is unavailable.
Полный текст лицензии (MIT)
MIT License

Copyright (c) 2026 LY2260789

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.