Token导航 LogoToken导航TokenDH.com
前端设计执行命令github未标认证来源可访问clear审计通过

viz

Agent Skill

viz 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

192

周安装

8

GitHub Stars

公开资料未说明

下载量

64
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:viz(即)
来源仓库:https://github.com/robdmc/claude_skills
仓库路径:skills/viz
安装命令:
npx skills add https://github.com/robdmc/claude_skills --skill viz
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/robdmc/claude_skills --skill viz

简介

viz 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合整理项目状态与协作事项。

  • 它帮助 Agent 围绕仓库变更、代码审查或协作流程进行信息组织与汇总。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。
  • 安装前应核实权限范围、维护状态,并评估是否涉及联网、命令执行或文件读写操作。
  • viz 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Viz Skill: Data Visualization and Inspection

Purpose

This skill directly executes visualizations. The calling agent provides a visualization spec along with data context, and the skill:

  1. Infers the data loading code from the provided context
  2. Generates the complete plotting script
  3. Executes it via the viz_runner.py helper
  4. Returns artifact paths for the caller to reference

Key pattern:

Caller (with data context) → Skill (infers data loading, generates script, executes) → Plot appears

The caller does NOT need to write any execution code. The skill handles everything.

Input Specification

The calling agent should provide:

Required

  • Visualization spec: What to plot (chart type, axes, title, special features)

Data Context (one of these forms)

  • Database + query: "Data from /full/path/to/operational_forecast.ddb, table forecast, columns month, members"
  • SQL query: "Run this SQL: SELECT * FROM forecast WHERE year >= 2024"
  • Code snippet: "Load data like this: df = pd.read_parquet('/full/path/to/data.parquet')"
  • File path: "CSV at /tmp/data.csv with columns X, Y, Z"

CRITICAL: Absolute Paths Required

The viz_runner.py executes scripts from /tmp/viz/, NOT the caller's working directory. All file paths in generated scripts MUST be absolute paths. The calling agent should:

  1. Determine the absolute path to any data files before invoking the skill
  2. Pass the full absolute path in the data context
  3. Never use relative paths like ./data.ddb or data.parquet

Example - WRONG:

con = duckdb.connect('operational_forecast.ddb')  # Will fail!

Example - CORRECT:

con = duckdb.connect('/Users/rob/projects/forecast/operational_forecast.ddb')

Optional

  • Suggested ID: A name hint (e.g., pop_bar, churn_trend). The runner ensures uniqueness.

Intent Detection

Before generating any code, analyze the user's request to determine the appropriate mode.

Inspection Mode (use --show)

Use when the user wants to see the data itself, not a visualization:

  • "Show me the dataframe"
  • "Display the first N rows"
  • "What does the data look like?"
  • "Print the data"
  • "What columns are in X?"
  • "Inspect the data"
  • "Let me see the data"

Action: Use --show flag. Do NOT generate plot code.

Visualization Mode (generate plot)

Use when the user wants a chart, graph, or visual representation:

  • "Plot the data"
  • "Create a chart of..."
  • "Visualize the trend"
  • "Show a graph of..."
  • "Bar chart showing..."
  • "Scatter plot of..."

Action: Generate matplotlib/seaborn code and pass via stdin.

Ambiguous Requests

If unclear (e.g., "show me X over time"), default to asking or interpret based on context:

  • If the request mentions chart types (bar, line, scatter) → visualization
  • If the request is about structure/columns/rows → inspection
  • When in doubt, use --show first (it's cheaper), then offer to plot

Artifact Management

All artifacts are managed in /tmp/viz/ via the helper script.

Helper: viz_runner.py

python /Users/rob/.claude/skills/viz/viz_runner.py [--id NAME] [--desc "Description"] << 'EOF'
<generated script>
EOF

The runner:

  1. Creates /tmp/viz/ if needed
  2. Ensures ID uniqueness (appends _2, _3, etc. if collision)
  3. Injects plt.savefig('/tmp/viz/<id>.png', dpi=150, bbox_inches='tight') before plt.show()
  4. Writes the script to /tmp/viz/<id>.py
  5. Executes the script
  6. Writes metadata to /tmp/viz/<id>.json
  7. Prints human-readable results to stdout

Output Format

Terminal output:

Plot: pop_bar
  "Bar chart of members by month"
  png: /tmp/viz/pop_bar.png

Sidecar JSON (/tmp/viz/<id>.json):

{
  "id": "pop_bar",
  "desc": "Bar chart of members by month",
  "png": "/tmp/viz/pop_bar.png",
  "script": "/tmp/viz/pop_bar.py",
  "created": "2025-01-22T11:31:00",
  "pid": 46368
}

The caller can then:

  • Read the PNG into context to discuss the plot
  • Reference the script for modifications
  • Look up plots by ID or description via the JSON metadata

List

To see all available visualizations:

python /Users/rob/.claude/skills/viz/viz_runner.py --list

Output:

ID              Description                          Created
--------------  -----------------------------------  ----------------
pop_bar         Bar chart of members by month        2025-01-22 11:31
churn_trend     Monthly churn rate                   2025-01-22 10:45
test_scatter    -                                    2025-01-22 09:20

Cleanup

To remove all visualization files from /tmp/viz/:

python /Users/rob/.claude/skills/viz/viz_runner.py --clean

Output:

Cleaned 12 files from /tmp/viz

Skill Workflow

  1. Infer data loading: From the provided context, generate Python code to load/create the DataFrame. Use absolute paths for all file references - the script runs from /tmp/viz/, not the caller's directory.
  2. Generate visualization: Add matplotlib/seaborn code for the requested plot
  3. Execute via runner (always include --desc with a short summary): python /Users/rob/.claude/skills/viz/viz_runner.py --id suggested_name --desc "Short description of plot" << 'EOF' <complete script> EOF
  4. Parse output: Capture the ID and paths from stdout
  5. Return to caller: Report final ID and paths. Do NOT read the PNG into context unless the user needs analysis.

Library Selection

Use Seaborn When:

  • Statistical distributions (histogram + KDE, violin, box plots)
  • Regression with confidence intervals
  • Categorical comparisons with error bars
  • Heatmaps and correlation matrices

Use Matplotlib When:

  • Fine-grained control over appearance
  • Time series with date formatting
  • Custom annotations and reference lines
  • Simple plots without statistical features

Combine Both:

Use seaborn for the statistical plot, matplotlib for customizations like reference lines.

Publication Quality Standards

  • Labels: Descriptive axis labels with units, 12pt+ font
  • Titles: Clear, informative, 14pt+ font
  • Figure size: figsize=(10, 6) or appropriate aspect ratio
  • Layout: Always use tight_layout() to prevent clipping
  • Grids: Subtle guidance with alpha=0.3
  • Colors: Colorblind-friendly palettes (viridis, coolwarm, Set2)
  • Transparency: Alpha for overlapping points
  • Imports: Inside the script for self-contained execution

End-to-End Example

Request from caller:

/viz id=pop_bar
     bar chart showing total_initial_members and total_final_members by month
     with dashed vertical line at history/forecast boundary (Dec 2025 / Jan 2026).
     Data from operational_forecast.ddb, forecast table.

Skill generates and executes:

python /Users/rob/.claude/skills/viz/viz_runner.py --id pop_bar --desc "Bar chart of members by month with forecast boundary" << 'EOF'
import duckdb
import matplotlib.pyplot as plt
import numpy as np

# Load data from DuckDB (MUST use absolute path!)
con = duckdb.connect('/Users/rob/projects/forecast/operational_forecast.ddb', read_only=True)
df = con.execute("""
    SELECT month, total_initial_members, total_final_members
    FROM forecast
    ORDER BY month
""").df()
con.close()

# Create grouped bar chart
fig, ax = plt.subplots(figsize=(12, 6))
x = np.arange(len(df))
width = 0.35

bars1 = ax.bar(x - width/2, df['total_initial_members'], width, label='Initial Members', color='steelblue')
bars2 = ax.bar(x + width/2, df['total_final_members'], width, label='Final Members', color='coral')

# History/forecast boundary
boundary_idx = df[df['month'] == '2025-12'].index[0] + 0.5
ax.axvline(x=boundary_idx, color='gray', linestyle='--', linewidth=1.5, label='Forecast Start')

ax.set_xlabel('Month', fontsize=12)
ax.set_ylabel('Members', fontsize=12)
ax.set_title('Member Population by Month: Historical vs Forecast', fontsize=14)
ax.set_xticks(x)
ax.set_xticklabels(df['month'], rotation=45, ha='right')
ax.legend()
ax.grid(True, alpha=0.3, axis='y')
plt.tight_layout()
plt.show()
EOF

Runner output:

Plot: pop_bar
  "Bar chart of members by month with forecast boundary"
  png: /tmp/viz/pop_bar.png

Skill returns to caller:

Plot generated successfully. - ID: pop_bar - Script: /tmp/viz/pop_bar.py - PNG: /tmp/viz/pop_bar.png

Important: Do NOT Auto-Read PNGs

Do NOT automatically read the PNG into context after generating a plot.

Reading images consumes significant context tokens and is usually unnecessary. The plot window opens automatically via plt.show(), so the user can already see the visualization.

Only read the PNG into context when:

  • The user explicitly asks you to analyze or interpret the graph
  • The user asks questions about what the graph shows
  • You need to learn something from the visual output to answer a question

Instead of reading the PNG, offer to open it:

open /tmp/viz/pop_bar.png  # macOS

This displays the image in the system viewer without consuming context tokens.

Refinement Workflow

When refining an existing plot:

  1. Caller provides the existing script path + requested changes
  2. Skill reads the script, applies modifications
  3. Executes with a new ID (e.g., pop_bar_2)
  4. Both versions remain available for comparison

Regeneration

When a user asks to regenerate an existing plot (e.g., after data has changed):

By ID

Request: "regenerate pop_bar"

Run the saved script directly:

python /tmp/viz/pop_bar.py

The script already contains the hardcoded savefig path, so it overwrites the existing PNG.

By Description

Request: "regenerate the churn plot"

  1. Run --list to find matching plot
  2. Identify the ID from the description
  3. Run python /tmp/viz/<id>.py

Ambiguous Request

Request: "regenerate a plot"

  1. Run --list to show available plots
  2. Ask user which one to regenerate
  3. Run the selected script

Key Point

Regeneration does NOT require viz_runner.py - the saved .py scripts are self-contained and can be executed directly with python.

Interactive Backend Note

Generated scripts use plt.show() which works with the macosx backend for interactive display. The injected savefig() ensures a PNG copy is always saved before display.

Marimo Notebook Support

The viz skill can extract data from marimo notebooks and generate plots without modifying the original notebook.

How It Works

  1. Copy notebook to /tmp/viz/<id>.py
  2. Analyze dependencies to identify cells needed for target data
  3. Prune unneeded cells from the copied notebook
  4. Inject plotting code as a new cell at the end
  5. Execute via subprocess with cwd set to original notebook's directory (so relative paths work)

CLI Interface

python /Users/rob/.claude/skills/viz/viz_runner.py \
    --marimo \
    --notebook /path/to/notebook.nb.py \
    --target-var df_forecast \
    --id forecast_plot \
    --desc "Monthly forecast visualization" \
    << 'EOF'
# Plotting code that uses df_forecast
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.plot(df_forecast['date'], df_forecast['total_final_members'])
plt.show()
EOF

Parameters

  • --marimo: Enable marimo notebook mode (required)
  • --notebook: Path to the marimo notebook file (required)
  • --target-var: Variable to extract from the notebook (required)
  • --target-line: Optional line number for capturing intermediate state (for mutated variables)
  • --id: Suggested ID for the visualization (optional)
  • --desc: Description of the visualization (optional)
  • --show: Show mode - print dataframe info to console instead of plotting (no stdin required)
  • --rows: Number of rows to display in show mode (default: 5)

Dependency Analysis

Marimo notebooks encode dependencies explicitly:

  • Cell parameters = variables the cell reads (refs)
  • Cell return tuple = variables the cell defines (defs)

The skill walks backwards from the target variable through the dependency graph to find all required cells.

Target Line (Advanced)

When a variable is mutated within a cell, use --target-line to capture intermediate state:

@app.cell
def _(raw_data):
    df = raw_data.copy()           # line 45
    df = df[df['value'] > 0]       # line 46 - filtered
    df = df.groupby('cat').sum()   # line 47 - aggregated
    return (df,)

Use --target-var df --target-line 46 to capture df after filtering but before aggregation.

Show Mode (Data Inspection)

Use --show to print dataframe info to console instead of generating a plot. Useful for quickly inspecting data at a specific point in the notebook pipeline.

python /Users/rob/.claude/skills/viz/viz_runner.py \
    --marimo \
    --notebook /path/to/notebook.nb.py \
    --target-var df \
    --show \
    --rows 10

Output:

Shape: (12345, 5)
Columns: ['date', 'profile_id', 'kind', 'state', 'channel_type']

Dtypes:
date              datetime64[ns]
profile_id                 int64
kind                      object
state                     object
channel_type              object

First 10 rows:
        date  profile_id     kind state channel_type
0 2021-01-01      123456  monthly    CA      organic
1 2021-01-02      123457  monthly    TX         paid
...

No stdin (plot code) is required for show mode - it only prints dataframe metadata and contents.

Example Workflow

User request:

"Plot the member forecast over time from the operational forecast notebook"

Agent workflow:

  1. Read the notebook to identify candidate variables
  2. Ask clarifying questions if multiple candidates exist
  3. Execute:
python /Users/rob/.claude/skills/viz/viz_runner.py \
    --marimo \
    --notebook /Users/rob/repos/project/forecast.nb.py \
    --target-var df_deliverable \
    --id member_forecast \
    --desc "Historical and forecast members" \
    << 'EOF'
import matplotlib.pyplot as plt

fig, ax = plt.subplots(figsize=(12, 6))
ax.plot(df_deliverable['date'], df_deliverable['total_final_members'])
ax.set_xlabel('Date')
ax.set_ylabel('Members')
ax.set_title('Member Population Over Time')
plt.tight_layout()
plt.show()
EOF

Important Notes

  • The original notebook is never modified (read-only access)
  • All work happens on a copy in /tmp/viz/
  • The script runs with the notebook's directory as cwd, so relative file paths work
  • Uses uv run python if the notebook directory contains pyproject.toml or uv.lock

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

windsurf

27.32%
按下载量换算17

Claude Code

24.34%
按下载量换算16

Antigravity

16.95%
按下载量换算11

Gemini CLI

13.77%
按下载量换算9

trae

8.41%
按下载量换算5

OpenCode

3.48%
按下载量换算2

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/robdmc/claude_skills --skill viz;npx skills add robdmc/claude_skills --skill "viz" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills