Agent skill
svg-logo-generator
Generate high-quality, minimalistic, and geometric SVG logos using Python scripts. Use this skill when users need to create logos, icons, or visual identities with geometric primitives (circles, rects, paths) and specific color schemes. Applies generative design principles with standardized workflows for scalable SVG output.
Install this agent skill to your Project
npx add-skill https://github.com/Dwsy/agent/tree/main/skills/svg-logo-generator
SKILL.md
SVG Logo Generator
Workflow
Before writing any code, follow these steps:
1. Design Analysis
- Analyze the user's request to determine key visual metaphors
- Decide on a color palette using Hex codes
- Plan geometric composition (primitives: circles, rects, paths)
2. SVG Configuration
- Define standard canvas size (e.g., 512x512)
- Always use
viewBoxfor scalability and responsiveness - Ensure correct XML namespace:
xmlns="http://www.w3.org/2000/svg"
3. Python Implementation
- Write self-contained Python scripts
- Constraint: Do NOT rely on external non-standard libraries (like
cairoorsvgwrite). Use standard string formatting orxml.etree.ElementTree - Separate styles (CSS within SVG or inline styles) from geometry
- Output/save file as
logo.svg
Code Structure
Follow this pattern:
import textwrap
def generate_logo():
# 1. Configuration
width, height = 512, 512
primary_color = "#YOUR_COLOR"
secondary_color = "#YOUR_COLOR"
# 2. SVG Header with ViewBox
svg_header = f'<svg viewBox="0 0 {width} {height}" xmlns="http://www.w3.org/2000/svg">'
# 3. Geometric Elements
# Use formatted strings for shapes (Circle, Rect, Path, Polygon)
shapes = f'<circle cx="{width/2}" cy="{height/2}" r="100" fill="{primary_color}" />'
# 4. Assembly & Output
svg_content = f"{svg_header}\n{shapes}\n</svg>"
with open("logo.svg", "w", encoding="utf-8") as f:
f.write(svg_content)
print(f"Logo generated: logo.svg")
if __name__ == "__main__":
generate_logo()
Key Principles
- Scalability: Always use
viewBoxinstead of fixedwidth/heightalone - Minimal dependencies: Use Python standard library only
- Separation of concerns: Define styles separately from geometry
- Geometric primitives: Focus on circles, rects, paths, polygons
- Color consistency: Use defined palette with Hex codes
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
undo-redo
Use the undo_redo tool to rewind or reapply buffered file changes or inspect diffs without UI navigation. Use when you need to adjust or verify changes in the current session history.
exa
使用 Exa.ai API 进行高质量的互联网搜索。需要 EXA_API_KEY 环境变量。
backend-unit-test
后端单元测试技能。触发场景: - 用户要求运行/创建单元测试 - 用户要求验证数据 - 用户要求用 Maven 运行测试 - 关键词:test, maven test, junit, springboot test, 单元测试, 测试验证 核心:不改 pom,用 reactor 模式运行。
mermaid-flow-image
将流程需求整理为可渲染的 Mermaid(简化版/详细版),并通过 Kroki 生成可发送的高分辨率 PNG 图片。适用于“把架构流程画出来并直接发图”的场景。
web-browser
Allows to interact with web pages by performing actions such as clicking buttons, filling out forms, and navigating links. It works by remote controlling Google Chrome or Chromium browsers using the Chrome DevTools Protocol (CDP). When Claude needs to browse the web, it can use this skill to do so.
ralph-loop-gen
任务管理系统模板生成器 - 根据用户输入或JSON配置生成完整的任务管理结构(模板生成器,非直接执行器)
Didn't find tool you were looking for?