export-excel
Skill22 starsChanged 9 days agoMITView on GitHub
Export structured tabular data to an Excel .xlsx file using a Node.js script and the exceljs library. The skill writes a generator script to gen-excel.js in the working directory, installs exceljs locally under .ethos-work/tools in the workspace if needed, then runs the script to produce the workbook. Handles multiple sheets, column headers, and typed cell values.
- Installs packages
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- dependency-analyzerSkill
- docsSkill
- handoffSkill
- openai-reviewerSkill
- plugin-homeSkill
- schema-validatorSkill
- security-auditSkill
- session-auditSkill
- test-validatorSkill
- claude-codeSkill
- codexSkill
- opencodeSkill
- chartsSkill
- export-csvSkill
- make-chartSkill
- make-html-reportSkill
- make-pdfSkill
- a2a-communicateSkill
- a2a-handle-inboundSkill
- codebase-inspectionSkill
- ethos-skill-authoringSkill
- native-mcpSkill
- github-authSkill
- github-code-reviewSkill
- github-issuesSkill
- github-pr-workflowSkill
- github-repo-managementSkill
- birth-ritualSkill
- get-to-know-youSkill
- xurlSkill
- arxivSkill
- grounded-citationsSkill
- research-paper-writingSkill
- reddit-researchSkill
- code-reviewSkill
- coding-agentSkill
- planSkill
- requesting-code-reviewSkill
- spikeSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- tddSkill
- writing-plansSkill
- no-ai-slopSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 50
If not found, stop and tell the user:
- Distinctive: line 54
Do not proceed further.
- Very specific: line 66
Use write_file to write a Node.js script to the relative path gen-excel.js, which resolves inside the working directory.
- Very specific: line 69
Use exceljs to create a workbook with one sheet per logical table.
- Distinctive: line 71
Write each row of data.
- Distinctive: line 110
If not found, install it locally:
- Distinctive: line 116
If install fails (no npm, no network, permission denied), stop and tell the user:
- Very specific: line 145
All generated files go to the working directory.
- Distinctive: line 146
Always tell the user the exact output path after completion.
- Very specific: line 147
If node is not installed, show the fallback message verbatim — do not proceed.
- Very specific: line 148
If exceljs install fails, show the fallback message verbatim — do not proceed.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Export Excel
Export structured tabular data to an Excel .xlsx file. A Node.js script using exceljs is written to a temp path, exceljs is installed locally if missing, and the script is run to produce the workbook. Output is written to the working directory as <filename>.xlsx.
When to use this skill
- User asks to export data to Excel, save as
.xlsx, create a spreadsheet, or produce a file they can open in Excel or Google Sheets. - The data is tabular (rows and columns) — query results, lists, comparison tables, reports.
- User says "I need an Excel file", "export this as a spreadsheet", "make an xlsx".
When NOT to use this skill
- User wants CSV — use the
export-csvskill (simpler, no installation needed). - User wants a PDF or HTML report — use
make-pdformake-html-report. - The data is not tabular (free-form prose, charts only).
- User wants formulas or charts in the workbook — this skill produces data-only workbooks; complex Excel features are out of scope.
Workflow
Step 1: Check that Node.js is available
which node 2>/dev/null || echo "not found"If not found, stop and tell the user:
"This skill requires Node.js. Install it from https://nodejs.org, then try again."
Do not proceed further.
Step 2: Create the tools directory
mkdir -p .ethos-work/tools.ethos-work/ is the workspace's scratch directory for agent work. The Ethos state dir (~/.ethos) is not usable from the terminal: the terminal guard refuses any command that names it.
Step 3: Write the generator script
Use write_file to write a Node.js script to the relative path gen-excel.js, which resolves inside the working directory. The script should:
- Embed the data directly (as a JavaScript object literal).
- Use
exceljsto create a workbook with one sheet per logical table. - Set column headers from the data keys.
- Write each row of data.
- Save to the relative path
<filename>.xlsx.
Minimal script template:
const ExcelJS = require('exceljs');
async function main() {
const workbook = new ExcelJS.Workbook();
const sheet = workbook.addWorksheet('Sheet1');
// Set headers
sheet.columns = [
{ header: 'Column A', key: 'colA', width: 20 },
{ header: 'Column B', key: 'colB', width: 20 },
];
// Add rows
const rows = [
{ colA: 'value1', colB: 'value2' },
];
rows.forEach(row => sheet.addRow(row));
await workbook.xlsx.writeFile('<filename>.xlsx');
console.log('Done');
}
main().catch(err => { console.error(err); process.exit(1); });Replace <filename> with a lowercase-hyphenated slug derived from the user's request (e.g. sales-data-2026-06). Embed the actual data in the rows array.
Step 4: Check if exceljs is available
test -d .ethos-work/tools/node_modules/exceljs && echo found || echo "not found"If not found, install it locally:
npm install exceljs --prefix .ethos-work/toolsIf install fails (no npm, no network, permission denied), stop and tell the user:
"This skill requires the exceljs npm package. Run:
npm install exceljs --prefix .ethos-work/toolsIf npm is unavailable, ask your system administrator to install it."
Do not proceed further.
Step 5: Run the generator script
NODE_PATH="$PWD/.ethos-work/tools/node_modules" node gen-excel.jsStep 6: Confirm to the user
Tell the user:
"Excel file created at:
<filename>.xlsxin the working directory — visible in the Documents tab."
Anti-patterns
- Do not install
exceljsglobally — use--prefix .ethos-work/toolsto keep it isolated and avoid permission issues. - Do not use an absolute output path in the script — write to a bare relative filename so the workbook lands in the working directory.
- Do not write a generic script and ask the user to fill in the data — embed the actual data in the script before running it.
- Do not produce an empty workbook — always include at least a header row.
- Do not reuse a stale
gen-excel.jsfrom a previous run without overwriting it with the current data.
Hard rules
- All generated files go to the working directory. Always write a relative path — never write the
.xlsxoutside the working directory. - Always tell the user the exact output path after completion.
- If
nodeis not installed, show the fallback message verbatim — do not proceed. - If
exceljsinstall fails, show the fallback message verbatim — do not proceed. - The filename slug must be lowercase, hyphen-separated, and contain no spaces or special characters.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

