skills/skills.netease.im/mouse-trajectory-plotter

mouse-trajectory-plotter

SKILL.md

Mouse Trajectory Plotter

Purpose

Convert mouse trajectory input into a trajectory image.

Required Input Parameter

Use a required parameter named mouse_trajectory.

Accepted shapes:

  1. Array of point objects:
[
  { "x": 120, "y": 340, "t": 0 },
  { "x": 125, "y": 336, "t": 16 },
  { "x": 131, "y": 331, "t": 33 }
]
  1. Object with points:
{
  "points": [
    { "x": 120, "y": 340, "t": 0 },
    { "x": 125, "y": 336, "t": 16 }
  ]
}
  1. File path pointing to JSON with one of the two shapes above.

Workflow

  1. Validate mouse_trajectory exists and includes at least 2 points.
  2. Save normalized points to a JSON file if needed.
  3. Run:
python3 scripts/plot_mouse_trajectory.py --input <input-json-or-path> --output <output-svg-path> --title "Mouse Trajectory"
  1. Return:
    • output image path
    • point count
    • min/max x and y

Command Reference

Script path:

scripts/plot_mouse_trajectory.py

Arguments:

  • --input (required): inline JSON string or JSON file path
  • --output (required): output SVG path
  • --title (optional): chart title
  • --width (optional): canvas width, default 1000
  • --height (optional): canvas height, default 700
  • --padding (optional): canvas padding, default 40

Error Handling

  • If mouse_trajectory is missing, ask for it explicitly.
  • If point count < 2, ask for more points.
  • If any point misses x or y, return a clear validation error.

Additional Resource

Installs
1
First Seen
Apr 15, 2026