بنقرة واحدة
icon-generation
Generate SVG icons and convert them to 48x48 PNG format for Canvas plugins and applications
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate SVG icons and convert them to 48x48 PNG format for Canvas plugins and applications
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Canvas SDK reference and documentation. Use whenever a question, claim, or piece of code touches Canvas SDK capabilities, API usage, implementation patterns, or testing — including quick conversational questions ("how do I ingest ADTs?", "what's the import for X?", "does Canvas support Y?"). The bundled docs are the source of truth; do not answer Canvas SDK questions from memory.
FHIR API reference and documentation for Canvas plugins that need to read or write data via FHIR endpoints
This skill should be used when the user asks to "write tests", "create tests", "generate tests", "unit tests", "pytest", "test guidelines", "testing rules", "test standards", "how to test", "test this code", "add tests", "validate tests", "check tests", "improve tests", or when working with Python test files. Provides comprehensive guidelines for creating pytest unit tests with 100% coverage following strict naming conventions, mock patterns, and parametrization standards.
Custom Data anti-patterns and corrections for Canvas plugins - unnecessary compatibility checks, misuse of AttributeHubs vs CustomModels
Database query optimization for Canvas plugins - N+1 detection, prefetch_related, select_related
Security review for plugins acting as FHIR API clients - token management, scope validation, and patient-scoped authorization
| name | icon-generation |
| description | Generate SVG icons and convert them to 48x48 PNG format for Canvas plugins and applications |
This skill provides the capability to generate SVG icons from descriptions and automatically convert them to 48x48 PNG format, which is the standard size for Canvas Medical plugin icons.
Execution standard: Run Python scripts and Python-based tooling with uv run ... (for scripts, uv run python <script>.py ...). Do not invoke bare python or pip.
This skill should be automatically invoked when:
CANVAS_MANIFEST.json and an icon field needs to be populatedFollow these steps to generate an icon:
Extract or generate a clear description of the icon. If working on a plugin:
Examples:
Create a clean, professional SVG icon based on the description:
SVG Best Practices:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<!-- Simple, clear shapes -->
<!-- Appropriate colors -->
<!-- Professional styling -->
</svg>
Convert the description to kebab-case:
medical-chart-with-checkmark.svgvitals-monitoring-icon.svgUse the Write tool to save the SVG content:
assets/ folder (snake_case folder)assets/ directory if it doesn't exist: mkdir -p {plugin_name_snake}/assets{plugin_name_snake}/assets/medical-chart-icon.svgBefore converting, verify uv is installed:
which uv
If not installed, install it:
curl -LsSf https://astral.sh/uv/install.sh | sh
After installation, you may need to use the full path: ~/.cargo/bin/uv
Use the conversion script to create a 48x48 PNG:
uv run --with cairosvg python ${CLAUDE_PLUGIN_ROOT}/scripts/convert_svg_to_png.py <svg-file> <png-file>
Replace:
<svg-file> with the generated SVG filename<png-file> with the same base name but .png extensionThe script creates a 48x48 pixel PNG suitable for Canvas applications.
If generating an icon for a Canvas plugin, update the manifest:
{
"name": "Plugin Name",
"version": "1.0.0",
"applications": [
{
"class": "plugin_name.applications.my_app:MyApp",
"name": "My Application",
"icon": "assets/icon-filename.png",
...
}
]
}
The icon field should reference the path relative to the manifest location (e.g., assets/icon-filename.png).
On Success:
On Failure:
After successful generation, display:
Icon created successfully:
SVG: /path/to/assets/icon-name.svg
PNG: /path/to/assets/icon-name.png (48x48)
For Canvas plugins, also mention:
CANVAS_MANIFEST.json updated with icon reference: "assets/icon-name.png"
assets/ folder (e.g., {plugin_name_snake}/assets/)assets/ directory if it doesn't exist before saving iconsWhen generating icons for Canvas Medical plugins:
User is creating a "vitals-alert" plugin that monitors patient vital signs.
1. Generate description: "medical vitals monitor with alert icon"
2. Create SVG with heart rate line and alert symbol
3. Create assets directory: mkdir -p vitals_alert/assets
4. Save as: vitals_alert/assets/vitals-alert-icon.svg
5. Convert to: vitals_alert/assets/vitals-alert-icon.png
6. Update CANVAS_MANIFEST.json applications entry: "icon": "assets/vitals-alert-icon.png"
User says: "I need a blue database icon with a checkmark"
1. Use description: "blue database icon with checkmark"
2. Create SVG with database cylinder and green checkmark
3. Save as: blue-database-icon-with-checkmark.svg
4. Convert to: blue-database-icon-with-checkmark.png
5. Report both files created
Assistant is running canvas init for a new plugin called "patient-scheduler"
After scaffold is created, CANVAS_MANIFEST.json needs an icon.
1. Generate description from plugin purpose: "calendar scheduling icon for patient appointments"
2. Create professional SVG with calendar and medical cross
3. Create assets directory: mkdir -p patient_scheduler/assets
4. Save as: patient_scheduler/assets/patient-scheduler-icon.svg
5. Convert to: patient_scheduler/assets/patient-scheduler-icon.png
6. Update manifest applications entry: "icon": "assets/patient-scheduler-icon.png"
7. Commit with other scaffold files