SkillsGrove
SkillsGrove/Офисные документы/OICWS/Coscribe/Excel Spreadsheets

Excel Spreadsheets

Установка

$npx skills add https://github.com/OICWS/Coscribe --skill 'Excel Spreadsheets'
$git clone --depth 1 https://github.com/OICWS/Coscribe.git /tmp/Coscribe && mkdir -p ~/.claude/skills && cp -r /tmp/Coscribe/office-agent/src/coscribe/builtin_skills/excel ~/.claude/skills/Excel-Spreadsheets
Пожалуйста, установи для меня этот Agent Skill: https://github.com/OICWS/Coscribe/tree/cf9a00cd7333f2318db917713fbe12c3f6a96079/office-agent/src/coscribe/builtin_skills/excel — сначала прочитай его SKILL.md и скрипты и устанавливай в мою папку навыков только после того, как убедишься, что он безопасен.

Кратко

Исходное описание · MITHow to build or change an Excel workbook with write_xlsx_cells and modify_xlsx - layout, formulas, styles, charts, and checking the result. Load before writing a workbook.
Приведённый ниже SKILL.md воспроизведён из OICWS/Coscribe (коммит cf9a00c) под лицензией MIT. Текст не изменён; опущены только метаданные заголовка файла, изображения показаны как ссылки, а очень длинные файлы сокращены. Авторские права: 2026 OICWS. Лицензия: LICENSE. Показан только файл с инструкциями; скрипты смотрите в исходном репозитории.

Plan the workbook, then write it whole

Decide first, in two or three lines, what the reader needs: which sheets, what each holds, where the inputs are and where the results go.

  • A report for a manager starts with a summary sheet (the key figures, a breakdown, a chart) and keeps the raw data on its own sheet behind it.
  • A model puts every assumption in one labelled block, one per cell with its unit, and the calculation below or beside it, one period per column.

Then write it with write_xlsx_cells, the whole table or the whole workbook in one call:

  • one block per table;
  • the header styled through row_styles;
  • number formats through col_styles;
  • the styles named once in styles.

Add charts, freeze panes, column widths, conditional formats and print setup with one modify_xlsx call. Two or three calls make a good workbook; twenty small ones make a worse one.

For a large input (hundreds of rows), give the block "from_csv": "明细.csv" instead of rows: the tool copies the file and you never retype it. If the data is messy, clean it into a CSV with run_python_script (pandas) first. The totals stay formulas in the workbook.

Formulas over typed numbers, always

Every result is a formula on the cells it comes from, never a number you computed:

  • =SUMIF(明细!B:B,A2,明细!F:F), =B5*(1+$B$3);
  • an assumption is referenced by its cell ($B$3), never retyped into a formula;
  • use the same formula shape along a row or column; fill_down_to repeats it.

A typed number between formulas is the most common silent error, and the result reports it. Use SUMIF/SUMIFS/COUNTIF/INDEX/MATCH. Avoid FILTER, UNIQUE, SORT and SEQUENCE, which the tool refuses.

Make it readable

  • Header row: bold, with a fill (white text on a dark fill reads well), and frozen with {"op": "freeze", "at": "A2"}.
  • Number formats on every number:
    • thousands separators: #,##0;
    • the unit in the header (销售额(元), Revenue ($)) rather than in each cell;
    • percentages stored as fractions, shown as 0.0%;
    • dates as yyyy-mm-dd.
  • Financial models: inputs in blue font (0000FF), formulas in black, links to another sheet in green (008000).
  • Charts: a chart where a trend or a comparison is the point, with a title, anchored beside its table (two columns right of it), never over cells that hold data.
    • A chart in a workbook is always a native one, from modify_xlsx's chart op, so the person can edit it and it follows the data. It is never a picture drawn in a script and inserted, and never a chart a script writes with openpyxl.
    • Its source is the table the person sees, such as each question's own rows for a chart per question. Use a helper sheet only when the data must be reshaped first.
    • A reference line (a mean, a target) is one more series of two points, so a quadrant chart is a scatter chart with two such series.
    • Many charts go in the same single modify_xlsx call.
  • Columns widen themselves to what they show; set a width only for a long label column.
  • Print setup: a report or a sheet with a chart is printed or sent as a PDF, so give it {"op": "print", "sheet": ..., "landscape": true, "fit_width": 1}, which keeps every column and the chart on the page.

Changing a user's workbook

  • Read it first (read_xlsx): its Layout: lines name the header's look, each column's number format and formula, frozen panes, rules and charts. No script is needed to inspect it.

  • Match its look:

    • a new column takes the look of its neighbour with "like": "C2";
    • a new row takes each column's look with "like_row": 7.

    Keep their conventions over these defaults.

  • Cells that hold something are not written over unless overwrite is true. Read them and be sure before you set it.

  • If the result says saved_as_copy, the user's file has something that could not be kept (lost_if_saved_over_original). Tell the user where the new file is and what it lacks.

Check before saying it is done

Each call returns:

  • formula_results, the value every formula you wrote computed. Compare two or three with what you expect by hand;
  • recalc, formula errors by cell;
  • findings by cell: ###, cut-off text, a typed number between formulas, a chart over data, a new cell unlike the table above it.

Fix what they name in one more call. After two rounds, stop and say what is left. If a number has no clear source, say where it came from.

Полный текст лицензии (MIT)
MIT License

Copyright (c) 2026 OICWS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.