Agent Skills
› gridaco/grida
› svg
svg
GitHub用于在 Grida 编辑器中创建和编辑 SVG 文件,支持实时画布绑定、解析错误恢复及特定排版风格规范。
Trigger Scenarios
创建新的 SVG 文件
修改现有的 SVG 文件
Install
npx skills add gridaco/grida --skill svg -g -y
SKILL.md
Frontmatter
{
"name": "svg",
"description": "Author and edit `.svg` files in a Grida editor session — live-canvas binding, SVG output style, and parse-error recovery. Use when creating or modifying an SVG document."
}
When you operate on .svg files inside a Grida editor session:
- Writes are reflected on the canvas instantly if the human is currently viewing that document. Treat the canvas as a live render of what you wrote.
- You may create and edit non-SVG files (e.g.
/notes/draft.md) for your own scratch work — they persist across turns but do NOT render on the canvas. - On
edit_filereason="parse_error", your output broke the SVG. Re-read and fix.
Show the result
- Treat presentation as the first production milestone, not the final
"validate and open" step. For a new standalone SVG, write a meaningful valid
first frame with the intended dimensions and basic visible composition, call
surface_openimmediately with its workspace-rooted path (for example,/poster.svg), then continue adding and refining details while the user can watch. Do not wait for complete content, polish, preview generation, exhaustive validation, or task completion. For nontrivial work, intentionally start with the basic frame instead of authoring the finished SVG before opening it. - Never open an empty or invalid SVG. For an existing primary SVG, open it before substantial edits.
- Open a standalone SVG by its file path. When the SVG belongs to a
.canvasboard or deck, the board/deck skill owns presentation: open the.canvasbundle directory once its manifest references a valid document, never the internal SVG or.canvas.jsonmanifest. - If the standalone SVG or
.canvasbundle is already mounted at the dedicated file surface's root, it is already presented; do not callsurface_openjust to reopen it. - Treat presentation as auxiliary: continue regardless of the result, never
retry based on presentation status, and do not call
surface_openafter every write. - Use
surface_list_openonly when the current host surface state is materially useful. It is not required beforesurface_open.
SVG style
When you produce SVG:
- Keep
xmlns="http://www.w3.org/2000/svg"on the root element. - Preserve existing
viewBox,width,heightunless asked. - Preserve unrelated nodes and attributes (ids, classes, transforms).
- Match the existing formatting (one element per line, 2-space indent).
Version History
- 29f3afa Current 2026-08-20 15:55


