数据分析与咨询
#browser
tikz
Use TikZ to create high-quality vector diagrams and visualizations rendered to SVG with instant browser preview. Use this skill whenever the user asks to draw, visualize, or create diagrams — flowcharts, architecture diagrams, neural networks, mathematical figures, circuit diagrams, graphs, trees, state machines, timelines, or any structured visual. Also triggers on mentions of TikZ, LaTeX drawing, or pgfplots. Even if the user just says 'draw me a diagram' without mentioning TikZ, use this skill if TikZ is a good fit.
DeepseekModel
官方收录技能
质量 良好 · 64
v1.0.0
获取
https://deepseekmodel.com/api/download.php?id=lldxflwb-claude-code-skills-skills-tikz-skill-md&format=skill
下载 .skill
标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
name tikz description Use TikZ to create high-quality vector diagrams and visualizations rendered to SVG with instant browser preview. Use this skill whenever the user asks to draw, visualize, or create diagrams — flowcharts, architecture diagrams, neural networks, mathematical figures, circuit diagrams, graphs, trees, state machines, timelines, or any structured visual. Also triggers on mentions of TikZ, LaTeX drawing, or pgfplots. Even if the user just says 'draw me a diagram' without mentioning TikZ, use this skill if TikZ is a good fit. user-invocable true argument-hint <description of the diagram to create> TikZ Diagram Skill How to Use Step 1. Write a .tex file in the project directory using the Write tool: \usetikzlibrary{arrows.meta, positioning} \begin{tikzpicture} \node[circle, draw] (a) {A}; \node[circle, draw, right=of a] (b) {B}; \draw[->] (a) -- (b); \end{tikzpicture} Step 2. Pass the file path to the render script: python3 /Users/karlchen/.claude/skills/tikz/scripts/render_tikz.py <path-to-tex-file> Output is two lines: the URL and the local PNG file path. Each render gets a unique timestamp, so re-running the same file produces a new URL. Step 3. Spawn a subagent to verify the rendering result and iterate if needed: Use the Agent tool to spawn a subagent with this prompt: "Read the PNG image at <png-path> and the TikZ source at <tex-path>. Verify the rendering quality: - Is any text overlapping or cut off? - Are elements too crowded or poorly spaced? - Are arrows and connections clear? - Is the overall layout readable? If issues are found, edit the .tex file to fix them (increase node distance, adjust font size, reposition elements, etc.), then re-render: python3 /Users/karlchen/.claude/skills/tikz/scripts/render_tikz.py <tex-path> Read the new PNG and verify again. Repeat until the result looks good. Return the final URL." Step 4. Return the final URL from the subagent to the user. Do NOT: Call ensure_server.py — the render script handles server internally Open the URL with open command or browser tools Embedding in Plan Documents When creating diagrams for a plan or markdown document, render the diagram first, then use the relative URI as a markdown image:  Use relative URI (e.g. /name.svg ), not absolute URL or local file path. The plan viewer will display the image inline. TikZ Tips Write partial code (just \begin{tikzpicture}...\end{tikzpicture} + \usetikzlibrary / \usepackage lines) — auto-wrapped in standalone document Or write a full document with \documentclass — used as-is Use positioning library for right=of syntax Use arrows.meta for modern arrow styles Temp Markdown Preview The preview server hosts a /temp/ directory for viewing arbitrary markdown files (translations, notes, etc.). Submit content via the script (similar to render_tikz.py ): # Copy a file into temp preview python3 /Users/karlchen/.claude/skills/tikz/scripts/submit_temp.py <path-to-file> # Symlink instead of copy (good for large files or live-editing) python3 /Users/karlchen/.claude/skills/tikz/scripts/submit_temp.py -- link <path> # Symlink a directory python3 /Users/karlchen/.claude/skills/tikz/scripts/submit_temp.py -- link /path/to/docs/ # Custom name python3 /Users/karlchen/.claude/skills/tikz/scripts/submit_temp.py --name translated.md <path> Output is two lines: the preview URL and the path in the temp directory. The script ensures the server is running automatically. .md files are rendered with full markdown viewer (e-ink / normal / eyecare modes, TOC, auto-refresh) Directories get an auto-generated index page Other files are served as static downloads Do NOT manipulate the temp directory directly — always use the script. Error Recovery Compilation errors are printed to stderr. Read the error, fix the .tex file, re-render. Prerequisites Before first use, read setup.md and follow both steps: Install dependencies (tectonic + pdf2svg) Ask the user if they want to configure host, port, or default view mode Server Management Server runs automatically. To stop (only when user explicitly asks): python3 /Users/karlchen/.claude/skills/tikz/scripts/ensure_server.py --stop
Agent 识别该技能的关键词,点击任意一个即可复制。
该技能未提供触发词。
下载的 .skill 包内含以下字段。
| 字段 | 说明 |
|---|---|
| format | 格式标识(skill/v1) |
| skill_id | 技能唯一 ID |
| name | 技能名称 |
| version | 版本号 |
| description | 技能描述 |
| category | 所属分类(数组) |
| trigger_words | 触发词列表 |
| tags | 标签列表 |
| source | 来源标识 |
| source_url | 来源链接(本页地址) |
| exported_at | 导出时间(每次下载生成) |
| system_prompt | 系统提示词正文 |
| model_config | 模型参数:provider / model / temperature / max_tokens / top_p |
| examples | 示例 |
| install_guide | 各平台导入说明(Coze / Dify / Claude / 自定义框架) |