Token导航 LogoToken导航TokenDH.com
效率敏感数据clawhub未标认证来源可访问clear审计通过

csv-brainCSV brain 效率

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

9,817

周安装

405

GitHub Stars

公开资料未说明

下载量

3,208
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:csv-brain(CSV brain 效率)
来源仓库:https://github.com/theshadowrose/csv-brain
安装命令:
openclaw skills install csv-brain
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install csv-brain

简介

加载 CSV 文件并用简单的英语提问。通过 Anthropic、OpenAI 或本地 Ollama 进行人工智能驱动的自然语言查询。无需 SQL。

SKILL.md

name
CSVBrain Natural Language Data Queries
description
Load CSV files and ask questions in plain English. AI-powered natural language queries via Anthropic, OpenAI, or local Ollama. No SQL required.
author
@TheShadowRose
version
1.0.3
tags
["csv", "data-analysis", "natural-language", "ai", "query"]
license
MIT
env
ANTHROPIC_API_KEY
Optional - for Anthropic/Claude models
OPENAI_API_KEY
Optional - for OpenAI/GPT models
OLLAMA_HOST
Optional - Ollama base URL, default http://localhost:11434

CSVBrain

Version: 1.0.3 Author: @TheShadowRose License: MIT

Description

Load CSV files and ask questions in plain English. AI-powered natural language queries via Anthropic, OpenAI, or local Ollama. No SQL required.

CSVBrain parses CSV files (comma, semicolon, or tab-delimited), profiles your data automatically, and lets you query it with structured filters or plain English questions powered by AI.

Features

  • CSV Loading — Parse CSV files with automatic delimiter detection (comma, semicolon, tab). Handles quoted fields and escaped quotes.
  • Data Profiling — Instant statistics for every column: count, missing values, unique values, min/max/avg for numeric columns.
  • Structured Queries — Filter, sort, limit, and aggregate your data programmatically.
  • Natural Language Ask — Ask questions about your data in plain English. AI analyzes your dataset's structure, types, and statistics to give accurate answers with specific numbers.
  • Multi-Provider AI — Route questions to Anthropic (Claude), OpenAI (GPT), or local Ollama models. Just change the model prefix.
  • Zero Dependencies — Pure Node.js. No npm packages required. HTTP calls use built-in https/http modules.

Installation

Copy src/csv-brain.js into your project.

const { CSVBrain } = require('./src/csv-brain');

Quick Start

const { CSVBrain } = require('./src/csv-brain');

const brain = new CSVBrain();
const info = brain.load('sales.csv');
console.log(info);
// { rows: 1200, columns: 8, types: { month: 'text', revenue: 'number', ... } }

// Profile your data
const stats = brain.profile();
console.log(stats.revenue);
// { type: 'number', count: 1200, missing: 0, unique: 987, min: 12.5, max: 94200, avg: 8450.32 }

// Ask a question in plain English
const result = await brain.ask('What was our best month for revenue?');
console.log(result.answer);
// "Based on the data, March had the highest total revenue at $94,200."
console.log(result.model);
// "anthropic/claude-haiku-4-5"

API

new CSVBrain(options?)

Create a new instance.

OptionTypeDefaultDescription
modelstring"anthropic/claude-haiku-4-5"Default AI model for ask()
const brain = new CSVBrain({ model: 'openai/gpt-4o-mini' });

load(filePath, options?)

Load a CSV file synchronously.

OptionTypeDefaultDescription
delimiterstringauto-detectForce a specific delimiter

Returns: { rows: number, columns: number, types: object }

const info = brain.load('data.csv');
const info2 = brain.load('data.tsv', { delimiter: '\	' });

profile()

Get statistical profile of all columns.

Returns: Object keyed by column name, each with type, count, missing, unique, and (for numeric columns) min, max, avg.

const stats = brain.profile();
console.log(stats);

query(options)

Run a structured query against loaded data.

OptionTypeDescription
filter{ column, operator, value }Filter rows. Operators: >, <, >=, <=, =, contains
sort{ column, order }Sort by column. Order: "asc" or "desc"
limitnumberMaximum rows to return
aggregate{ column }Return count, sum, avg, min, max for a numeric column
// Filter and sort
const topSales = brain.query({
  filter: { column: 'revenue', operator: '>', value: 10000 },
  sort: { column: 'revenue', order: 'desc' },
  limit: 10
});

// Aggregate
const totals = brain.query({
  aggregate: { column: 'revenue' }
});
console.log(totals);
// { count: 1200, sum: 10140384, avg: 8450.32, min: 12.5, max: 94200 }

async ask(question, options?)

Ask a natural language question about your data. Requires an AI provider API key (or local Ollama).

OptionTypeDefaultDescription
modelstringInstance defaultAI model with provider prefix
apiKeystringFrom environmentOverride the API key
ollamaHoststring"http://localhost:11434"Ollama server URL

Returns: { answer: string, data: any, query: object|null, model: string }

// Using Anthropic (default)
// Requires ANTHROPIC_API_KEY environment variable
const result = await brain.ask('Which product category has the highest average price?');
console.log(result.answer);
// "Electronics has the highest average price at $342.50, followed by Appliances at $289.00."

// Using OpenAI
// Requires OPENAI_API_KEY environment variable
const result2 = await brain.ask('How many orders were placed in Q4?', {
  model: 'openai/gpt-4o-mini'
});

// Using local Ollama (no API key needed)
const result3 = await brain.ask('Summarize the sales trends', {
  model: 'ollama/llama3'
});

AI Provider Setup

Anthropic (Claude)

Set your API key as an environment variable:

export ANTHROPIC_API_KEY="sk-ant-..."

Models: anthropic/claude-haiku-4-5, anthropic/claude-sonnet-4-20250514, etc.

OpenAI (GPT)

export OPENAI_API_KEY="sk-..."

Models: openai/gpt-4o-mini, openai/gpt-4o, etc.

Ollama (Local)

No API key required. Just run Ollama locally:

ollama serve
ollama pull llama3

Models: ollama/llama3, ollama/mistral, etc.

Optionally set a custom host:

export OLLAMA_HOST="http://192.168.1.100:11434"

Error Handling

If the AI provider is unavailable, ask() returns a graceful error instead of throwing:

const result = await brain.ask('What is the trend?');
if (result.answer.startsWith('AI unavailable:')) {
  console.log('Falling back to manual query...');
  const data = brain.query({ sort: { column: 'date', order: 'asc' } });
}

Supported File Formats

  • CSV — Comma-separated values (.csv)
  • TSV — Tab-separated values (.tsv, .txt)
  • Semicolon-delimited — Common in European locale exports

Delimiter is auto-detected from the first line, or can be specified manually.

Note: Excel files (.xlsx, .xls) are not supported. Export your spreadsheet to CSV first.

Limitations

  • Files are loaded synchronously and fully into memory. Very large files (100MB+) may cause performance issues.
  • AI answers depend on the quality and context window of the chosen model. Only column profiles and the first 5 sample rows are sent to the AI — not the entire dataset.
  • No streaming support. The full AI response is returned at once.
  • No built-in export functionality. Use query() results with your own file-writing logic.

Disclaimer

CSVBrain is provided as-is under the MIT License. AI-generated answers may not always be accurate — always verify critical data analysis. API usage may incur costs from your AI provider.

Support

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

75.7%
按下载量换算2,428

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills