跳到正文
Skillpedia
分析与电子表格5.5k · #14813

terminal-line-plot

它能做什么

这项技能教智能体如何直接在终端或聊天中,把数值趋势显示为文字图表。它适用于分数、指标和随时间变化的历史记录,无需打开图形应用。

适用场景

  • ✓当用户要求在终端中查看曲线、趋势线或分数变化的时候。
  • ✓当用户希望在聊天中显示指标历史,而不生成图片文件的时候。
  • ✓当用户从命令输出中获得了一组数字,想快速生成文字图表的时候。

技能链接

https://github.com/sapientinc/PRAXIST/blob/main/skills/terminal-line-plot/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sapientinc/PRAXIST/blob/main/skills/terminal-line-plot/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在终端中以折线图的形式,展示我最近十代的训练分数。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会收集数据序列,确认绘制的是哪项指标,以及数值越高还是越低越好,然后运行随附的脚本打印图表。它还可以打印一个简短的表格,便于阅读数值。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Terminal Line Plot

Use this skill to turn numeric sequences into terminal-readable line charts. It is task-agnostic: do not assume any domain, metric direction, filtering rule, or data layout unless the user or artifacts define it.

Workflow

  1. Identify the series to plot:
    • x values are usually ordered steps, dates, versions, generations, epochs, or run ids.
    • y values must be numeric.
    • If multiple plausible metrics exist, choose the one the user asked for; otherwise state the selected metric before plotting.
  2. Preserve metric semantics:
    • Use exact metric names from artifacts when available.
    • Label whether higher or lower is better if known.
    • Do not mix partial and complete points silently; mark provisional or incomplete points in the title, notes, or point list.
  3. Use scripts/plot_series.py for deterministic plotting.
  4. Print a compact table or point list when it prevents misreading the curve.
  5. Do not write image files unless the user explicitly asks. Prefer stdout.

Script Usage

Run the bundled script from the skill directory:

python /path/to/terminal-line-plot/scripts/plot_series.py \
  --points "0:-4.49,1:-4.53,2:-4.87,3:-4.77,4:-3.23" \
  --title "Best future_fitness by generation" \
  --x-label generation \
  --y-label future_fitness \
  --higher-better

Input options:

  • --points "x:y,x:y,..." for quick point lists.
  • --csv FILE --x-field FIELD --y-field FIELD for CSV.
  • --json FILE --x-field FIELD --y-field FIELD for JSON arrays of objects, arrays of pairs, or mappings.
  • --stdin csv|json|points to read data from stdin.

Useful options:

  • --height N controls chart height.
  • --x-step N controls horizontal spacing between points.
  • --provisional-x X may be repeated to mark incomplete points with ○.
  • --value-table prints the plotted values below the chart.
  • --invert-y-note only changes the note; it does not invert the axis.

Plotting Guidelines

  • Prefer line drawing characters ●, ○, ╱, ╲, and ─.
  • Keep the x-axis readable. If labels collide, increase --x-step or plot fewer points.
  • Use a taller chart for noisy or close-valued curves.
  • For negative scores where "higher is better", the visually higher point should still mean numerically larger.
  • If the active/final point is incomplete, mark it provisional and do not draw conclusions from it.
  • For dense data, aggregate intentionally: best per generation, mean per epoch bucket, rolling median, or another stated rule.

Example Patterns

Manual points:

python /path/to/terminal-line-plot/scripts/plot_series.py \
  --points "0:7.88,1:7.78,2:8.45,3:8.61,4:9.28" \
  --title "Mean objective value by generation" \
  --y-label "objective" \
  --value-table

CSV:

python /path/to/terminal-line-plot/scripts/plot_series.py \
  --csv metrics.csv \
  --x-field generation \
  --y-field score \
  --title "Score by generation"

JSON:

python /path/to/terminal-line-plot/scripts/plot_series.py \
  --json metrics.json \
  --x-field gen \
  --y-field best_score
常见问题

它会生成图片文件吗?

除非用户要求,否则不会。这项技能更倾向于直接打印到屏幕上。

支持哪些输入格式?

这项技能列出的输入包括点列表、CSV、JSON 和命令输出。

不完整的数据点如何处理?

这项技能说明,应在标题或备注中标明临时或不完整的数据点,而不是悄悄将它们混在一起。

详情

作者的原始描述

Draw readable ASCII line charts directly in the terminal from numeric series, command output, CSV, JSON, or manually extracted points. Use when the user asks for a curve, trend line, score progression, leaderboard trend, metric history, or any plot that should be visible in a CLI/chat transcript without opening a GUI or writing image files.

repo: sapientinc/PRAXIST

热度

GitHub 星标
5.5k
排名
#14813
许可证
—
更新时间
2026/9/23

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能