new-diagram

new-diagram is a skill for Claude Code from pedrohcgs/claude-code-my-workflow. It costs 60 tokens per session (1,848 once invoked), scanned A, original, MIT.

A guided template for creating a TikZ diagram, where TikZ is a LaTeX system for drawing diagrams in documents. It starts from tested examples and checks dimensions, coordinates, labels, and the compiled result.

In plain words
What is it for?
Use it to create flowcharts, timelines, causal diagrams, event studies, regression figures, and other supported TikZ diagrams.
Why use it?
It helps avoid common layout and direction errors that are easy to miss when writing diagram code from scratch.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/check-tikz-prevention.py "$DST".

Good fit Use it to create flowcharts, timelines, causal diagrams, event studies, regression figures, and other supported TikZ diagrams.

Compare 6 skills from other repositories ↓
About the project

claude-code-my-workflow is a forkable setup for using Claude Code to produce and review academic papers, slides, data analyses, and replication packages. Researchers use its agents, skills, rules, hooks, and quality checks to coordinate these tasks and verify their results. The catalogue entries define the reusable workflow components for Claude Code.

pedrohcgs/claude-code-my-workflow · 1,672 stars · on GitHub · psantanna.com

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow
agentmods
npx agentmods add skills/pedrohcgs/claude-code-my-workflow/new-diagram

Made for: Claude Code.

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 new-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/new-diagram/github.svg)](https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/new-diagram)
Your own site
<a href="https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/new-diagram"><img src="https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/new-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 new-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/new-diagram"><img src="https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/new-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,848 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 140
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
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.00060 $0.01848
Opus 5.5 $0.00024 $0.00739
Sonnet 5.5 $0.00012 $0.00370
Haiku 4.5 $0.00006 $0.00185

Measured 1mo ago against content hash a86355d9e670, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

new-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 1mo 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.

.claude/skills/new-diagram/SKILL.md · 141 lines

How it starts

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

Create a New TikZ Diagram

Scaffold a diagram from templates/tikz-snippets/, check it against the prevention rules, compile standalone, run the reviewer with measurement citations, and loop until the diagram passes. Use this instead of writing TikZ from scratch; the snippets embed the invariants that tikz-prevention.md requires.

Inputs

  • $0 (optional) — snippet name (without .tex). One of the filenames in templates/tikz-snippets/. If omitted, list the gallery and ask the user to pick.
  • $1 (optional) — output path. Defaults to Figures/new_diagram.tex — ask the user if this target exists so we don't clobber.

Workflow

Step 1: Pick a snippet

ls -1 templates/tikz-snippets/*.tex

Current gallery (see templates/tikz-snippets/README.md for descriptions):

  • dag-basic — 3-node causal DAG (X → Y with confounder U)
  • dag-mediation — X → M → Y with direct path
  • did-two-period — two-period difference-in-differences
  • event-study — event-time coefficients with 95% CIs
  • timeline — horizontal timeline with staggered events
  • regression-scatter — scatter + OLS fit + confidence band
  • flowchart-3step — vertical flow with decision diamond
  • supply-demand — supply/demand with shifted demand

If $0 is not one of these, or is omitted, ask the user which to use.

Step 2: Copy the snippet to the output path

SRC="templates/tikz-snippets/$0.tex"
DST="${1:-Figures/new_diagram.tex}"

# Confirm before overwriting
if [ -f "$DST" ]; then
  echo "Output path already exists: $DST"
  # Ask the user whether to overwrite. Do NOT clobber silently.
fi

mkdir -p "$(dirname "$DST")"
cp "$SRC" "$DST"

Step 3: Edit the content to fit the user's intent

Ask the user what the diagram should show. Edit $DST with the Edit tool:

  1. Update the comment block at the top so the intent sentence matches the user's goal.
  2. Update the coordinate map comment if coordinates change.
  3. Rename nodes and edit labels. Keep node style (dag-node, flow-node, etc.) unless the meaning actually changes.
  4. Do not add a bare scale=X to the tikzpicture options. Coordinates shrink, text does not — collisions follow. Allowed forms: scale=X, every node/.style={scale=X} or scale=X, transform shape. See tikz-prevention.md P3 for the full rule and tikz-visual-quality.md for the scale=1.1 convention.
  5. Every new edge label must carry a directional keyword (above, below, left, right, above left, etc.). midway alone is a path position, not a direction — P4 violation.

Read the full file on GitHub · 141 lines

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. 1mo ago Changed · -1 lines a86355d9e670
  2. 1mo ago First seen · 142 lines · 60 tokens per session scan A ed8c7c515949

Subscribe to this mod's changes

new-diagram is a skill published in the GitHub repository pedrohcgs/claude-code-my-workflow (1,672 stars, last pushed 1mo ago), licensed MIT. It adds 60 tokens to every session and 1,848 once invoked, about $0.0002 per session on Opus 5.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

aer-consistency

Use when auditing a finished or near-finished AER, AER:Insights, or AEJ manuscript for internal consistency: headline numbers across abstract, introduction, results, and tables; sample sizes; log-point and percentage-point conversions; cross-references; and in-text-citation/bibliography matching. Apply after the body…

brycewang-stanford/AER-Skills · 85 tokens

aeja-tables-figures

Use when building or revising the exhibits of an American Economic Journal: Applied Economics (AEJ: Applied) manuscript so the main causal result is legible in one table or figure and respects AEA house presentation norms. Formats exhibits; it does not establish the result (aeja-identification / aeja-robustness) or…

brycewang-stanford/Awesome-Journal-Skills · 0 tokens

aejpol-replication-package

Use when assembling the data and code deposit for an AEJ: Economic Policy manuscript to satisfy the AEA Data and Code Availability Policy and the AEA Data Editor's pre-publication reproducibility check. Builds the openICPSR deposit, README, and restricted-data access paths; it does not run the analysis or write the…

brycewang-stanford/Awesome-Journal-Skills · 0 tokens

aejmac-tables-figures

Use when building or revising exhibits for an American Economic Journal: Macroeconomics (AEJ: Macro) manuscript — impulse-response figures, fan charts, model-fit overlays, and regression/moment tables — to AEA house standards and macro conventions. Formatting and clarity; it does not generate the underlying estimates.

brycewang-stanford/Awesome-Journal-Skills · 0 tokens

aaai-artifact-evaluation

Use when packaging AAAI code, data, multimedia appendices, technical appendices, reproducibility evidence, and post-acceptance artifact releases without violating double-blind or immutable-supplement rules.

brycewang-stanford/Awesome-Journal-Skills · 47 tokens

fin-paper-convert

Compile LaTeX to PDF and convert to target journal format.

csmar432/finai-research · 12 tokens