Génération de graphiques et diagrammes

VérifiéPrudence

Générez des graphiques et diagrammes à partir de données CSV, JSON ou requêtes. Supports barres, lignes, camemberts, nuages de points et histogrammes avec matplotlib.

Spar Skills Guide Bot
Data & IAIntermédiaire
4002/06/2026
Claude CodeCursorWindsurf
#charts#visualization#matplotlib#data-analysis

Recommandé pour

Notre avis

Génère des graphiques et diagrammes à partir de données CSV, JSON ou de résultats de requêtes en utilisant matplotlib.

Points forts

  • Prend en charge plusieurs types de graphiques (barres, lignes, camemberts, nuages de points, histogrammes).
  • Accepte des données en ligne, depuis un fichier, ou via un pipe.
  • S'intègre facilement avec des requêtes de base de données pour visualiser les résultats.
  • Options de personnalisation basiques comme le titre et le fichier de sortie.

Limites

  • Graphiques statiques uniquement (pas d'interactivité).
  • Styles limités à matplotlib (pas de thèmes avancés).
  • Nécessite que les données soient dans un format compatible (colonnes, valeurs numériques).
Quand l'utiliser

Utilisez cette compétence pour visualiser rapidement des données numériques à partir de fichiers CSV, JSON ou de requêtes SQL.

Quand l'éviter

Ne l'utilisez pas si vous avez besoin de graphiques interactifs, d'annotations complexes ou de visualisations hautement personnalisées.

Analyse de sécurité

Prudence
Score qualité88/100

The skill runs Python scripts to generate charts. While it does not perform destructive/evasive actions, it processes arbitrary input (inline, file, stdin) which could be crafted to exploit vulnerabilities in the underlying scripts. The risk is moderate given the legitimate purpose.

Points d'attention
  • Executes user-supplied data through matplotlib scripts, which could theoretically allow injection if data is not properly sanitized.

Exemples

Bar chart from inline data
Create a bar chart showing monthly sales: Jan 12000, Feb 15000, Mar 13500, Apr 18000. Title it 'Monthly Sales'.
Line chart from CSV file
Generate a line chart from sales.csv using month on x-axis and revenue on y-axis, with title 'Revenue Trend'.
Pie chart from piped data
Make a pie chart of traffic by device: Desktop 55, Mobile 35, Tablet 10. Title it 'Traffic by Device'.

name: charts description: Generate charts and graphs from data for reports. Use when user wants to visualize data, create charts, graphs, plots, or diagrams from CSV, JSON, or query results. allowed-tools:

  • Read
  • Bash(~/.claude/skills/charts/:)

Charts Skill

Generate charts and graphs from data using matplotlib.

Commands

| Command | Description | |---------|-------------| | charts bar | Bar chart (vertical or horizontal) | | charts line | Line chart for trends/time series | | charts pie | Pie chart for proportions | | charts scatter | Scatter plot for correlations | | charts histogram | Histogram for distributions | | charts help | Show help |

Data Input Methods

1. Inline data

charts bar --labels "A,B,C" --values "10,20,30"

2. From CSV/JSON file

charts line --file data.csv --x date --y revenue

3. From stdin (pipe)

echo "name,value
Product A,100
Product B,150" | charts bar --x name --y value

4. Combined with database skill

database query "SELECT status, COUNT(*) as count FROM orders GROUP BY status" | charts pie --x status --y count --title "Order Status"

Common Options

  • --title "Text" - Set chart title
  • --output file.png - Specify output path (default: /tmp/chart_<type>_<timestamp>.png)
  • --open - Open image after generating
  • --x column - Column for X axis / labels
  • --y column - Column for Y axis / values

Chart-Specific Options

Bar chart

  • --horizontal - Horizontal bars instead of vertical

Histogram

  • --column name - Column to analyze
  • --bins N - Number of bins (default: 10)

Output

By default, charts are saved to /tmp/chart_<type>_<timestamp>.png and the path is printed to stdout.

Use the Read tool to view the generated chart image.

Examples

# Sales by month
charts bar --labels "Jan,Feb,Mar,Apr" --values "12000,15000,13500,18000" --title "Monthly Sales"

# Revenue trend from CSV
charts line --file sales.csv --x month --y revenue --title "Revenue Trend"

# Distribution pie chart
charts pie --labels "Desktop,Mobile,Tablet" --values "55,35,10" --title "Traffic by Device"

# Query results visualization
database query "SELECT date, amount FROM transactions ORDER BY date" | charts line --x date --y amount --title "Transaction History"

# Age distribution histogram
charts histogram --file users.csv --column age --bins 15 --title "User Age Distribution"
Skills similaires