snipgrapher

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

When to use

使用场景

Use this skill when you need to:
  • Generate image snippets from source code
  • Configure reusable snippet rendering defaults
  • Batch-render snippet assets for docs, social posts, or changelogs
  • Use published
    snipgrapher
    from npm to generate snippet images
在以下场景中可以使用该技能:
  • 从源代码生成代码片段图片
  • 配置可复用的代码片段渲染默认值
  • 批量渲染代码片段资源,用于文档、社交帖子或更新日志
  • 使用npm上发布的
    snipgrapher
    生成代码片段图片

How to use

使用方法

Read these rule files in order:
  • rules/setup-and-configuration.md - Install, select executable, initialize config, and define profiles
  • rules/rendering-workflows.md - Render single snippets, batch jobs, watch mode, and output practices
请按顺序阅读以下规则文件:
  • rules/setup-and-configuration.md - 安装、选择可执行文件、初始化配置并定义配置文件
  • rules/rendering-workflows.md - 渲染单个代码片段、批量任务、监听模式及输出实践

Core principles

核心原则

  • Configure first: establish a project config before repeated renders
  • Reproducible output: prefer named profiles and explicit output paths
  • Portable commands: use command patterns that work with installed binaries and
    npx
  • Automation-friendly: rely on CLI flags/config/env precedence intentionally
  • 先配置:在重复渲染前先建立项目配置
  • 可复现的输出:优先使用命名配置文件和明确的输出路径
  • 可移植的命令:使用适用于已安装二进制文件和
    npx
    的命令模式
  • 自动化友好:有意依赖CLI标志/配置/环境变量的优先级