Engineering
infographic-template-updater avatar

infographic-template-updater

Automates the synchronization of new infographic templates by updating project documentation, gallery mappings, and AI playground prompts.

Introduction

The Infographic Template Updater is a specialized automation skill designed for the astro-koharu repository. It ensures that whenever a new infographic template is added to the project, all dependent files and configuration maps are synchronized to maintain internal consistency. This tool eliminates manual overhead in updating documentation and UI components, which is critical for developers extending the library of available infographic styles within the theme. It acts as a bridge between the core template source code and the user-facing documentation and AI generation interfaces, ensuring that the system's 'available templates' remain accurate across all reference points.

  • Automatically collects template identifiers from source files in src/templates/.

  • Handles template name resolution, including those composed via object spreads like listZigzagTemplates.

  • Updates critical reference documentation, specifically .skills/infographic-creator/SKILL.md and .skills/infographic-syntax-creator/references/prompt.md.

  • Maintains synchronization with the UI layer by updating site/src/components/AIPlayground/Prompt.ts.

  • Facilitates gallery integration by assisting with the update of site/src/components/Gallery/datasets.ts when example data is required.

  • Ensure template names are strictly formatted in lower-case and kept exact to prevent configuration drift.

  • Always perform a sanity check using 'rg -n' across the repository to confirm that the new template name is correctly indexed in all generated locations.

  • Use this skill after every commit that adds a file to src/templates/ to keep the AI and documentation layers in parity.

  • The workflow is additive; never remove or rename existing entries to avoid breaking legacy configuration or user UI expectations.

  • For templates requiring structured content, ensure corresponding updates are applied to the Gallery datasets to support front-end rendering.

Repository Stats

Stars
262
Forks
52
Open Issues
3
Language
TypeScript
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 05:02 AM
View on GitHub