All Posts
Guide

Example Agent Skill

Package wb spreadsheet workflows into a reusable skill for Codex-style agents.

Example Agent Skill

If your agent runtime supports reusable skills, instruction packs, or workflow profiles, capture the spreadsheet workflow once instead of restating it in every prompt.

The example below uses the Codex skill format because it is concrete and small, but the same pattern works as a system prompt plus tool notes in other agent frameworks.

Suggested Layout

werkbook-budget-auditor/
├── SKILL.md
└── references/
    └── review-checklist.md

Keep the skill operational. The goal is to tell the agent when to use wb, which commands to prefer, and how to report results.

Example SKILL.md

---
name: werkbook-budget-auditor
description: Use this skill when reviewing budgeting, forecast, or finance workbooks with wb. Inspect target ranges, trace formulas, propose safe JSON patches, and summarize findings with exact sheet and cell references.
---

# Budget Auditor

Use `wb` for workbook access. Do not parse `.xlsx` ZIP contents manually and do not infer formulas from screenshots when the workbook file is available.

## Workflow

1. Start with `wb info <file>` to confirm sheet names and data ranges.
2. Use `wb read --headers --range ...` to inspect only the rows needed for the task.
3. If the command shape is unclear, run `wb capabilities --format json` or `wb --mode agent help <command>`.
4. Before changing a workbook, build a JSON patch and validate it with `wb edit --validate-only --plan`.
5. After edits that affect formulas, run `wb calc`.
6. Use `wb dep` when the user asks for precedents, dependents, or impact analysis.

## Output Rules

- Always cite workbook path, sheet name, and cell or range.
- Separate observations, proposed patch, and confirmed results.
- Prefer deterministic JSON patches over prose-only edit instructions.
- If headers are present, use them in summaries.

Optional Reference File

Put task-specific rules in a reference file only when they are genuinely reusable:

# Review Checklist

- Confirm the total row still covers the intended data rows.
- Flag formulas that mix percentage and currency cells.
- Note sheets with hidden tabs before proposing edits.
- Report any patch that changes a formula and a hard-coded value in the same area.

This keeps SKILL.md short while still giving the agent a deeper checklist when it needs one.

Why This Skill Works

  • The trigger description is specific enough to activate on the right tasks.
  • The workflow tells the agent which wb commands to use and in what order.
  • The output rules force cell-level citations instead of vague spreadsheet summaries.
  • Validation and recalculation are built into the process instead of being optional.

Variations

Use the same structure for other workbook jobs:

  • invoice cleanup and normalization
  • payroll review
  • pricing model QA
  • fixture generation for workbook tests

Only change the trigger description, review checklist, and expected output format. The wb command loop can stay nearly identical.