Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions skills/excel-wps-table-diagnosis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Excel / WPS Table Diagnosis

Inspect table structure first, then suggest practical Excel/WPS formulas and cleanup workflows.

## What It Does

This skill is designed for common spreadsheet tasks that usually start with messy data rather than a clean formula problem.

It helps with:

- table diagnosis from headers and sample rows
- cleanup planning for blanks, duplicates, and mixed formats
- lookup and matching workflows
- summarization guidance
- practical Excel and WPS compatibility choices
- common formula troubleshooting

## Working Style

The skill is meant to:

1. inspect the table first
2. explain what should be cleaned or checked
3. recommend a practical workflow
4. pause before direct spreadsheet work when user approval is needed
5. continue with concrete formulas or steps after approval

## Files

- `SKILL.md`: entry file
- `references/workflow.md`: longer working notes
- `references/use-cases.md`: common task shapes
- `references/approval-flow.md`: example of diagnose first, execute after approval
- `references/table-diagnosis.md`: messy table example
- `references/sheet-match.md`: matching example
- `references/text-cleanup.md`: text cleanup example

## Typical Prompts

- `Inspect this table and tell me what should be cleaned first.`
- `Suggest a WPS-friendly lookup formula for these two sheets.`
- `Check this formula workflow and tell me whether helper columns would be safer.`
85 changes: 85 additions & 0 deletions skills/excel-wps-table-diagnosis/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
name: excel-wps-table-diagnosis
description: Diagnose spreadsheet structure and recommend practical Excel/WPS-compatible formulas and workflows for cleaning, lookup and matching, summarization, text and date cleanup, and common formula troubleshooting. Use when the user asks what formula to use, how to process a table, how to clean messy columns, how to match sheets, how to make a solution work in both Excel and WPS, or when headers and sample rows should be inspected before deciding what to do next.
---

# Excel/WPS Table Diagnosis

Use this skill when a spreadsheet task should start with the table itself, not with a guess at the formula.

## Core Approach

1. Inspect the input.

- Identify whether the user provided headers, sample rows, CSV content, or only a task description.
- If the structure is unclear, ask for the smallest missing detail that would change the recommendation.

2. Diagnose the table.

- Identify likely column types such as IDs, dates, amounts, names, status fields, phone numbers, or free text.
- Look for blanks, duplicates, mixed formats, unstable lookup keys, and columns that should be cleaned before formulas are applied.

3. Choose the most practical path.

- Prefer simple formulas when they are stable and readable.
- Prefer Excel and WPS compatible approaches over newer functions with weaker compatibility.
- Prefer helper columns when a single long formula would be fragile.
- Recommend built-in spreadsheet tools when they are a better fit than formulas.

4. Present a clear recommendation.

- State what the table appears to contain.
- State what should be done first.
- Recommend the formula or workflow.
- Mention compatibility notes for Excel and WPS.
- Provide a fallback when the preferred formula may not work everywhere.

5. Pause before execution.

- If the next step would directly modify a workbook, add helper columns, rewrite formulas, or otherwise move from diagnosis into execution, ask for confirmation first.
- Once the user agrees, continue with the concrete formulas, helper columns, or execution steps instead of repeating the analysis.
- If the scope is already clear, finish the approved execution step before suggesting extra optional follow-up work.

## Priorities

- Diagnose before suggesting formulas.
- Prefer maintainability over cleverness.
- Treat compatibility as an early constraint.
- Do not force everything into one formula.
- Do not make direct spreadsheet changes without user confirmation.

## Output Shape

Keep the response close to this shape:

### Diagnosis

- what the table likely contains
- what looks inconsistent or risky

### Recommendation

- what to do first
- which formula or method to use

### Execution

- what can be done immediately after approval
- which formulas, helper columns, or spreadsheet steps should be applied

### Compatibility

- whether it should work in Excel
- whether it should work in WPS
- what fallback to use if needed

### Notes

- where to place the formula
- whether helper columns or built-in tools would be easier

## References

- Read `WORKFLOW.md` for the longer working notes.
- Read `docs/use-cases.md` for common task shapes.
- Read `examples/README.md` for example inputs and outputs.
66 changes: 66 additions & 0 deletions skills/excel-wps-table-diagnosis/references/approval-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Example: Approval Flow

## Scenario

The user provides a small customer table and asks what should be cleaned first.

Headers:

- Customer ID
- Name
- Phone
- Status

Sample rows:

- 001, Alice, 138 0013 8000, active
- 002, Bob, 13800138001, Active
- 002, Bob, 13800138001, active
- 003, Carol, , inactive

## Phase 1: Diagnose And Recommend

Expected shape:

- explain that `Customer ID` should stay as text
- point out mixed phone formatting
- point out inconsistent `Status` casing
- flag the duplicate `Customer ID`
- suggest helper columns and a cleanup order
- pause before execution

Example pause:

`I have not modified anything yet. If you want, I can continue with the exact helper-column setup and the spreadsheet steps.`

## Phase 2: Execute After Approval

Once the user agrees, the response should move straight into execution.

Expected shape:

- specify which helper columns to add
- give the exact formulas
- explain where to place them
- explain fill-down and cleanup steps
- avoid repeating the same diagnosis unless needed for clarity

Example execution elements:

- `E1: Clean Phone`
- `F1: Clean Status`
- `G1: Dedupe Key`
- `H1: Duplicate?`

- `E2: =SUBSTITUTE(SUBSTITUTE(TRIM(C2),CHAR(160),\"\"),\" \",\"\")`
- `F2: =LOWER(TRIM(D2))`
- `G2: =A2&\"|\"&B2&\"|\"&E2`
- `H2: =IF(COUNTIF($G:$G,G2)>1,\"Duplicate\",\"Keep\")`

## Purpose

This example exists to show the intended behavior of the repository:

1. diagnose first
2. pause before direct spreadsheet work
3. continue immediately once the user approves
38 changes: 38 additions & 0 deletions skills/excel-wps-table-diagnosis/references/sheet-match.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Example: Sheet Match

## Input

Sheet A:

- Customer ID
- Name
- Region

Sheet B:

- Customer ID
- Last Purchase Date
- Total Amount

User request:

`I need to match Sheet A and Sheet B by customer ID in WPS.`

## Expected Response Shape

### Diagnosis

- `Customer ID` is the most likely key column
- matching should be done only after checking for duplicate IDs

### Recommendation

- use a lookup formula based on `Customer ID`
- if broad compatibility matters, prefer `INDEX + MATCH`
- if the environment supports it, a simpler lookup function may also be suggested

### Compatibility

- provide a WPS-friendly formula first
- mention a newer Excel-only alternative only as a secondary option

44 changes: 44 additions & 0 deletions skills/excel-wps-table-diagnosis/references/table-diagnosis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Example: Table Diagnosis

## Input

Headers:

- Order ID
- Customer ID
- Order Date
- Amount
- Status

Sample rows:

- 1001, C001, 2026/03/01, 89.5, Paid
- 1002, C001, 03-02-2026, 120, paid
- 1003, , 2026.03.05, 45, Pending
- 1003, C004, 2026/03/05, 45, Pending

User request:

`Please inspect this table and tell me what I should clean first.`

## Expected Response Shape

### Diagnosis

- `Order Date` uses mixed date formats
- `Customer ID` has blank values
- `Order ID` contains duplicates
- `Status` is inconsistent because `Paid` and `paid` should likely be standardized

### Recommendation

- standardize `Status` first
- fix blank `Customer ID` values if possible
- normalize `Order Date` into one format
- investigate duplicate `Order ID` before summarizing data

### Compatibility

- prefer simple cleanup formulas and helper columns
- avoid depending on newer dynamic-array functions for this workflow

32 changes: 32 additions & 0 deletions skills/excel-wps-table-diagnosis/references/text-cleanup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Example: Text Cleanup

## Input

Column values:

- ` Alice`
- `Bob `
- ` Carol`
- `DAVE`
- `eve `

User request:

`This column has extra spaces and inconsistent formatting. How should I clean it?`

## Expected Response Shape

### Diagnosis

- extra leading and trailing spaces
- mixed capitalization

### Recommendation

- trim extra spaces first
- then normalize capitalization if needed
- use helper columns if the cleanup should stay easy to review

### Compatibility

- prefer basic text functions that work in both Excel and WPS
60 changes: 60 additions & 0 deletions skills/excel-wps-table-diagnosis/references/use-cases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Use Cases

## 1. Cleanup Before Analysis

Use the project to inspect a table before writing formulas.

This is usually the least exciting step and also the one that prevents the most avoidable trouble.

Typical signals:

- blank values in key columns
- inconsistent date formats
- duplicate identifiers
- status fields with inconsistent capitalization

## 2. Matching Across Sheets

Use the project when two sheets need to be matched by a shared field such as:

- customer ID
- employee ID
- order number
- product code

The goal is to choose a reliable lookup workflow that still works in Excel and WPS.

If the key column is messy, that problem should be handled first instead of hoping the lookup will be forgiving.

## 3. Text Cleanup

Use the project to normalize columns that contain:

- extra spaces
- hidden separators
- mixed capitalization
- text fragments that should be split or extracted

This is where helper columns usually age better than one heroic formula.

## 4. Summarization

Use the project when the user needs to:

- count records by status or department
- summarize sales or amounts
- classify rows by conditions
- prepare a table for a pivot workflow

The useful question here is often not just how to summarize the table, but whether the table is even ready to be summarized.

## 5. Formula Troubleshooting

Use the project when the spreadsheet already has formulas, but they return:

- missing matches
- obvious reference mistakes
- unstable behavior after copy-down
- errors caused by dirty source columns

Sometimes the formula is wrong. Sometimes the table is wrong. It helps to separate those two problems early.
Loading