xiaohongshu
xiaohongshu
data-wrangler
Transform and export data using DuckDB SQL. Read CSV/Parquet/JSON/Excel/databases, apply SQL transformations (joins, aggregations, PIVOT/UNPIVOT, sampling), and optionally write results to files. Use when the user wants to: (1) Clean, filter, or transform data, (2) Join multiple data sources, (3)...
Full skill instructions
Transform and export data using DuckDB SQL.
IMPORTANT - Windows Shell Escaping:
cd to the skill directory first\")cd "<skill_directory>" && echo "{\"query\": \"SELECT * FROM 'D:/path/to/file.csv'\"}" | uv run scripts/query_duckdb.py
Get schema, statistics, and sample in one call. Use before writing queries to understand data structure.
{"mode": "explore", "path": "D:/data/sales.csv"}
Response:
{
"file": "D:/data/sales.csv",
"format": "csv",
"row_count": 15234,
"columns": [
{"name": "order_id", "type": "BIGINT", "null_count": 0, "null_percent": 0.0},
{"name": "customer", "type": "VARCHAR", "null_count": 45, "null_percent": 0.3}
],
"sample": "| order_id | customer | ... |\\n|----------|----------|-----|\\n| 1001 | Alice | ... |"
}
Options:
sample_rows: Number of sample rows (default: 10, max: 100)sources: For database tables (same as query mode)Return results directly to Claude for analysis.
{"query": "SELECT * FROM 'data.csv' LIMIT 10"}
{
"query": "SELECT s.*, p.category FROM sales s JOIN products p ON s.product_id = p.id",
"sources": [
{"type": "file", "alias": "sales", "path": "/data/sales.parquet"},
{"type": "file", "alias": "products", "path": "/data/products.csv"}
]
}
Export query results to files. Add an output object to write instead of returning data.
{
"query": "SELECT * FROM 'raw.csv' WHERE status = 'active'",
"output": {
"path": "D:/output/filtered.parquet",
"format": "parquet"
}
}
{
"query": "SELECT *, YEAR(date) as year, MONTH(date) as month FROM 'events.csv'",
"output": {
"path": "D:/output/events/",
"format": "parquet",
"options": {
"compression": "zstd",
"partition_by": ["year", "month"],
"overwrite": true
}
}
}
| Format | Options |
|---|---|
parquet | compression (zstd/snappy/gzip/lz4), partition_by, row_group_size |
csv | header (default: true), delimiter, compression, partition_by |
json | array (true=JSON array, false=newline-delimited) |
Response includes verification info - no need for follow-up queries:
{
"success": true,
"output_path": "D:/output/events/",
"format": "parquet",
"rows_written": 15234,
"files_created": ["D:/output/events/year=2023/data_0.parquet", "..."],
"total_size_bytes": 5678901,
"duration_ms": 1234
}
By default, existing files are not overwritten. Set options.overwrite: true to allow.
{
"query": "SQL statement",
"sources": [...],
"output": {"path": "...", "format": "..."},
"options": {"max_rows": 200, "format": "markdown"},
"secrets_file": "path/to/secrets.yaml"
}
max_rows: Maximum rows to return (default: 200)max_bytes: Maximum response size (default: 200000)format: markdown (default), json, records, or csv| column1 | column2 |
|---|---|
| value1 | value2 |
{
"schema": [{"name": "col1", "type": "INTEGER"}],
"rows": [[1, "value"]],
"truncated": false,
"warnings": [],
"error": null
}
{"type": "file", "alias": "data", "path": "/path/to/file.csv"}
Glob patterns: {"path": "/logs/**/*.parquet"}
Custom delimiter: {"path": "/data/file.csv", "delimiter": "|"}
{
"type": "postgres", "alias": "users",
"host": "host", "port": 5432, "database": "db",
"user": "user", "password": "pass",
"schema": "public", "table": "users"
}
{
"type": "mysql", "alias": "orders",
"host": "host", "port": 3306, "database": "db",
"user": "user", "password": "pass", "table": "orders"
}
{"type": "sqlite", "alias": "data", "path": "/path/to/db.sqlite", "table": "tablename"}
{
"type": "s3", "alias": "logs",
"url": "s3://bucket/path/*.parquet",
"aws_region": "us-east-1",
"aws_access_key_id": "...", "aws_secret_access_key": "..."
}
See TRANSFORMS.md for advanced patterns including:
USING SAMPLE n ROWS or SAMPLE 10%EXCLUDE, REPLACE, COLUMNS('pattern')-- PIVOT: Convert rows to columns
PIVOT sales ON quarter USING SUM(revenue) GROUP BY region
-- UNPIVOT: Convert columns to rows
UNPIVOT data ON q1, q2, q3, q4 INTO NAME quarter VALUE amount
-- Sampling: Random 10% with reproducible seed
SELECT * FROM large_table USING SAMPLE 10% REPEATABLE(42)
-- Dynamic columns: Exclude sensitive, transform email
SELECT * EXCLUDE (ssn) REPLACE (LOWER(email) AS email) FROM users
DESCRIBE SELECT * FROM 'file.csv'SELECT * FROM 'file.csv' LIMIT 5output to write resultserror is non-null: Check column names, verify pathstruncated is true: Use more aggregation or filtersoptions.overwrite: trueStore credentials securely in YAML. See SECRETS.md for complete documentation.
{
"query": "SELECT * FROM customers LIMIT 10",
"secrets_file": "D:/path/to/secrets.yaml",
"sources": [{
"type": "postgres", "alias": "customers",
"secret": "my_postgres", "table": "customers"
}]
}
Supported: PostgreSQL, MySQL, S3, GCS, Azure, R2, HTTP, HuggingFace, Iceberg, DuckLake.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience