code-engineer

Execute Python and R code to inspect, analyze, and export structured data results.

64|15|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/openJiuwen-ai/sciencediscovery --skill code-engineer-openjiuwen-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: code-engineer
Source: https://github.com/openJiuwen-ai/sciencediscovery/tree/main/skills/code-engineer
Command: npx skills add https://github.com/openJiuwen-ai/sciencediscovery --skill code-engineer-openjiuwen-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires duckdb, openpyxl, pandas, and includes scripts (resource) components.

What problem does it solve? Running reproducible data analysis requires writing code, inspecting unfamiliar data files, managing execution environments, and documenting methodology. This Skill handles the full cycle: it inspects Excel/CSV schemas, executes Python or R analysis code in a sandbox, and exports structured results with complete methodology documentation. ## Core Features & Use Cases - Data Inspection: Automatically loads Excel and CSV files into DuckDB to report sheet names, column types, row counts, non-null counts, and sample rows before any analysis begins. - Python/R Code Execution: Runs inline code snippets or script files in a subprocess with automatic data-file loading, package auto-installation, and a 300-second timeout. - Structured Result Export: Captures a DataFrame assigned to result and exports it as CSV, JSON, or Markdown with proper headers and rows. - Use Case: Given a sales dataset in Excel, inspect its schema, run a Pearson correlation analysis between two variables in Python, and export the aggregated results as a JSON file alongside documented methodology and data traceability. ## Quick Start Use the code-engineer skill to inspect the columns in sales_2024.xlsx and then run a Python analysis computing total sales by region, exporting the result to results.csv.

Frequently Asked Questions about code-engineer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Python code on an Excel file for data analysis?▼

Invoke the execute.py script with --action run, --language python, --code-file pointing to your script, and --files pointing to the Excel file. The file is auto-loaded via pandas read_excel into a variable named after the file, and results can be exported with --output-file.

How to inspect CSV or Excel schema before analysis?▼

Run execute.py with --action inspect and --files listing your data files. It loads them into DuckDB and returns column names, data types, non-null counts, row counts, and the first five sample rows per sheet or file.

Can I execute R code instead of Python for statistical analysis?▼

Yes, pass --language r with your R script or inline code. The script auto-detects R via Rscript or R on the system, loads Excel files with readxl and CSVs with read.csv, and captures a data frame assigned to result for structured export.

What output formats does the analysis export support?▼

Structured results export to CSV, JSON, or Markdown when your code assigns a pandas DataFrame or list of dicts to a variable named result. Without a result variable, raw stdout and stderr are exported as a fallback.

Why does my analysis execution fail or time out?▼

Executions have a 300-second timeout, so long-running code is terminated. Failures also occur from missing libraries, unsupported file formats (only xlsx, xls, csv are loaded), or schema mismatches; error output includes hints listing available data variables.

Does the inspect caching work for code execution runs?▼

No, caching applies only to --action inspect, which stores DuckDB tables keyed by a SHA256 hash of file contents. The run action re-reads data files through pandas or R on every invocation, so cache results yourself for pipelines.