text-logic-diagram

text-logic-diagram is a skill for Claude Code from SpaceZephyr/cowrite. It costs 88 tokens per session (2,428 once invoked), scanned A, original, MIT.

A text-to-diagram skill that turns written arguments or paragraphs into logical SVG diagrams. It supports flow, hierarchy, comparison, cycles, progression, and matrix layouts.

In plain words
What is it for?
Use it to create flowcharts, mind maps, relationship diagrams, and other visual explanations from articles or written arguments. It outputs the diagrams in an HTML file.
Why use it?
It helps make the structure of dense writing easier to see and review. It can also split text with several logical sections into separate diagrams.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cowrite plugin — 8 skills, 1 MCP server shipped together

Good fit Use it to create flowcharts, mind maps, relationship diagrams, and other visual explanations from articles or written arguments. It outputs the diagrams in an HTML file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/spacezephyr/cowrite/text-logic-diagram
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SpaceZephyr/cowrite --skill text-logic-diagram
Clone the repo
git clone --depth 1 https://github.com/SpaceZephyr/cowrite

Made for: Claude Code.

Or install cowrite, the plugin that ships this one along with the rest of its 8 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for text-logic-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/spacezephyr/cowrite/text-logic-diagram/github.svg)](https://agentmods.dev/skills/spacezephyr/cowrite/text-logic-diagram)
Your own site
<a href="https://agentmods.dev/skills/spacezephyr/cowrite/text-logic-diagram"><img src="https://agentmods.dev/badge/skills/spacezephyr/cowrite/text-logic-diagram/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for text-logic-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/spacezephyr/cowrite/text-logic-diagram"><img src="https://agentmods.dev/badge/skills/spacezephyr/cowrite/text-logic-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,428 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00088 $0.02428
Opus 5 $0.00044 $0.01214
Sonnet 5 $0.00018 $0.00486
Haiku 4.5 $0.00009 $0.00243

Measured 10d ago against content hash 11efb6675a8a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

text-logic-diagram scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/text-logic-diagram/SKILL.md · 235 lines

How it starts

The opening of the file, as written. The whole thing — 235 lines — stays where its author put it; the contents beside it link to each section on GitHub.

文本逻辑关系图

将文本转换为精准的逻辑关系 SVG 图,输出为独立 HTML 文件。

触发条件

当用户提到以下场景时,主动使用此技能:

  • "生成逻辑图" / "画逻辑关系图" / "文本转图"
  • "逻辑拆解" / "拆成图" / "可视化"
  • 用户粘贴了文章/段落/论述内容并要求分析逻辑
  • "递进图" / "流程图" / "循环图" / "层次图" / "对比图" / "矩阵图"
  • 用户要求对文本进行结构化可视化

工作流程

第一步:文本分析

  1. 通读全文,识别文本中的核心论点、关键概念和逻辑链条
  2. 段落拆解,将文本按自然段落或逻辑段落分割
  3. 判断关系类型,为每个段落选择最适合的逻辑关系:
关系类型 适用场景 视觉特征
递进关系 概念渐进发展、层层深入 阶梯式排列,箭头从左到右或从上到下
流程关系 步骤顺序、阶段推进 线性/蛇形排列,带编号的节点
循环关系 概念循环往复、闭环反馈 环形排列,首尾相连
层次结构 包含、从属、分类关系 树形/金字塔/嵌套结构
对比关系 对照、比较、优劣分析 左右/上下对称排列
矩阵关系 多维度交叉、复杂关联 网格/象限布局

第二步:概念抽象

  1. 提取关键词:从每个段落中提取 2-6 个核心概念
  2. 精简文字:每个概念节点文字控制在 15 字以内
  3. 标注关系:概念之间的连接线和箭头标注简要说明
  4. 分层整理:区分主要概念和次要概念

第三步:生成 SVG 图

根据分析结果,使用本技能的设计规范生成 HTML 文件。

多段拆解规则:

  • 当文本包含多个独立逻辑段落时,生成多张 SVG 图
  • 每张图使用独立的 <div class="diagram-card"> 容器
  • 每张图上方标注段落标题或逻辑类型
  • 所有图按顺序排列在同一 HTML 文件中

设计系统

主题系统

支持深色和浅色主题切换,默认深色。

深色主题(默认)
元素 颜色
页面背景 #0a0a0a
卡片背景 #141414
节点填充主色 #1a2332#243447
节点描边 #3f72af
主文字 #ffffff
副文字 #8899aa
连接线 #556677
箭头 #8899aa
强调色 #3f72af (蓝), #5dade2 (亮蓝)
浅色主题
元素 颜色
页面背景 #f5f7fa
卡片背景 #ffffff
节点填充主色 #e8edf2#dbe2ef
节点描边 #3f72af
主文字 #112d4e
副文字 #4a6785
连接线 #aabbcc
箭头 #8899aa
强调色 #3f72af (蓝), #112d4e (深蓝)

字体规范

  • 全局使用 JetBrains Mono 等宽字体
  • 节点标题:14px,font-weight 600
  • 节点子标签:11px,font-weight 400
  • 连接线标注:10px
  • 段落标题:16px,font-weight 700
  • 图例文字:10px

SVG 规范

通用规范
  • 画布尺寸:每张图 viewBox 0 0 800 500,按需调整
  • 内边距:上下左右各留 40px
  • 箭头标记:小巧箭头,线宽 1
  • 阴影效果:轻微阴影 dx=1.5, dy=1.5, stdDeviation=2
节点样式
<!-- 带阴影的圆角矩形节点 -->
<rect x="X" y="Y" width="W" height="H" rx="8"
  fill="url(#nodeGrad)" stroke="#3f72af" stroke-width="1.5"
  filter="url(#shadow)"/>
<text x="CX" y="CY" class="text-primary" font-size="14" font-weight="600"
  text-anchor="middle">概念名称</text>

Read the full file on GitHub · 235 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 235 lines · 88 tokens per session scan A 11efb6675a8a

Subscribe to this mod's changes

text-logic-diagram is a skill published in the GitHub repository SpaceZephyr/cowrite (91 stars, last pushed 1mo ago), licensed MIT. It adds 88 tokens to every session and 2,428 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

plan

Use when a request needs shaping before any code is written — a rough or vague prompt to sharpen, an ambiguous idea to design, or a clear-enough task to decompose. One chain-starter that amplifies the prompt, designs the approach, and decomposes it into a batched task file, skipping whichever phases the request…

jeremylongshore/tons-of-skills-marketplace · 144 tokens

enhance-prompt

Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.

google-labs-code/stitch-skills · 41 tokens

dstack-prototyping

Use with the dstack skill for model-serving work when the image, serving command, resources, backend/fleet choice, or service behavior is not proven. Guides task-first prototyping on real hardware, choosing fleets/backends that can reuse idle instances and caches, checking vLLM/SGLang sources, and verifying the final…

dstackai/dstack · 80 tokens

llm-icon-finder

Finding and accessing AI/LLM model brand icons from lobe-icons library. Use when users need icon URLs, want to download brand logos for AI models/providers/applications (Claude, GPT, Gemini, etc.), or request icons in SVG/PNG/WEBP formats.

daymade/claude-code-skills · 61 tokens

ss-dial

Turn ONE design axis up or down as a coordinated, deterministic transform — "denser", "sharper corners", "more muted", "bolder", "flatter", "livelier". Not a vibe the model reinterprets each time; a defined ramp that moves many tokens together, respects the guardrails (8px grid, a11y floors, single accent…

bitjaru/styleseed · 114 tokens

ss-reference

Compile screenshots, URLs, Figma exports, or an existing UI into a project-local StyleSeed output grammar with evidence, tokens, confidence, anti-patterns, and a validation screen. Use when the user supplies a design reference that StyleSeed does not already model.

bitjaru/styleseed · 56 tokens