@qvac/skills 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +198 -0
- package/README.md +49 -0
- package/index.d.ts +4 -0
- package/index.js +9 -0
- package/package.json +87 -1
- package/skills/apple-notes/SKILL.md +92 -0
- package/skills/apple-notes/append-note.applescript +9 -0
- package/skills/apple-notes/cli.schema.json +32 -0
- package/skills/apple-notes/create-note.applescript +15 -0
- package/skills/apple-notes/delete-note.applescript +10 -0
- package/skills/apple-notes/edit-note.applescript +10 -0
- package/skills/apple-notes/read-note.applescript +28 -0
- package/skills/apple-notes/references/read.md +65 -0
- package/skills/apple-notes/references/write.md +105 -0
- package/skills/apple-notes/search-notes.applescript +21 -0
- package/skills/apple-reminders/SKILL.md +129 -0
- package/skills/apple-reminders/cli.schema.json +201 -0
- package/skills/apple-reminders/references/edit.md +69 -0
- package/skills/apple-reminders/references/view.md +58 -0
- package/skills/asana/SKILL.md +59 -0
- package/skills/diagrams/SKILL.md +107 -0
- package/skills/diagrams/references/class.md +29 -0
- package/skills/diagrams/references/er.md +27 -0
- package/skills/diagrams/references/flowchart.md +33 -0
- package/skills/diagrams/references/gantt.md +38 -0
- package/skills/diagrams/references/mindmap.md +35 -0
- package/skills/diagrams/references/pie.md +27 -0
- package/skills/diagrams/references/sequence.md +32 -0
- package/skills/diagrams/references/state.md +30 -0
- package/skills/diagrams/references/timeline.md +28 -0
- package/skills/excel/SKILL.md +120 -0
- package/skills/excel/references/create.md +374 -0
- package/skills/excel/references/edit.md +353 -0
- package/skills/excel/references/read.md +99 -0
- package/skills/github/SKILL.md +42 -0
- package/skills/gmail/SKILL.md +142 -0
- package/skills/gmail/operations.json +71 -0
- package/skills/google-calendar/SKILL.md +139 -0
- package/skills/google-calendar/operations.json +62 -0
- package/skills/google-docs/SKILL.md +74 -0
- package/skills/google-docs/operations.json +61 -0
- package/skills/google-docs/references/create.md +97 -0
- package/skills/google-docs/references/edit.md +146 -0
- package/skills/google-docs/references/read.md +49 -0
- package/skills/google-drive/SKILL.md +118 -0
- package/skills/google-drive/operations.json +40 -0
- package/skills/google-sheets/SKILL.md +71 -0
- package/skills/google-sheets/operations.json +85 -0
- package/skills/google-sheets/references/create.md +54 -0
- package/skills/google-sheets/references/edit.md +124 -0
- package/skills/google-sheets/references/read.md +74 -0
- package/skills/image-generation/SKILL.md +48 -0
- package/skills/music-generation/SKILL.md +76 -0
- package/skills/notion/SKILL.md +61 -0
- package/skills/notion/operations.json +53 -0
- package/skills/notion/references/comments.md +65 -0
- package/skills/notion/references/databases.md +68 -0
- package/skills/notion/references/pages.md +119 -0
- package/skills/notion/references/tasks.md +28 -0
- package/skills/obsidian/SKILL.md +122 -0
- package/skills/obsidian/cli.schema.json +392 -0
- package/skills/obsidian/references/read.md +79 -0
- package/skills/obsidian/references/write.md +67 -0
- package/skills/pdf/SKILL.md +110 -0
- package/skills/pdf/references/create.md +169 -0
- package/skills/pdf/references/transform.md +270 -0
- package/skills/pdf/scripts/decrypt.py +26 -0
- package/skills/pdf/scripts/encrypt.py +25 -0
- package/skills/pdf/scripts/extract_text.py +25 -0
- package/skills/pdf/scripts/merge.py +21 -0
- package/skills/pdf/scripts/rotate.py +27 -0
- package/skills/presentations/SKILL.md +118 -0
- package/skills/presentations/references/create.md +399 -0
- package/skills/presentations/references/edit.md +314 -0
- package/skills/presentations/references/read.md +127 -0
- package/skills/spotify/SKILL.md +86 -0
- package/skills/weather/SKILL.md +33 -0
- package/skills/word/SKILL.md +141 -0
- package/skills/word/references/create.md +368 -0
- package/skills/word/references/edit.md +704 -0
- package/skills/word/references/read.md +141 -0
- package/skills/word/references/replace.md +86 -0
- package/skills/word/scripts/list_paragraphs.py +19 -0
- package/skills/word/scripts/replace_paragraphs.py +58 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: diagrams
|
|
3
|
+
description: Draw diagrams in the chat - flowcharts, sequence, state and ER diagrams, Gantt charts, pie charts, mindmaps and timelines - written as Mermaid code blocks the app renders. Use when the user asks to draw, diagram, sketch, chart, plan, visualize, or map a process, flow, schedule, architecture, or relationship.
|
|
4
|
+
aliases: [diagram, mermaid, flowchart, mindmap]
|
|
5
|
+
platform: [darwin, linux, win32, ios, android]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Diagrams
|
|
9
|
+
|
|
10
|
+
Draw a diagram by writing one ```mermaid code block. The app renders it as a
|
|
11
|
+
picture automatically - never describe the rendering, never apologize about
|
|
12
|
+
being text-only, never paste ASCII art. A diagram, chart, or plan is ONLY a
|
|
13
|
+
Mermaid block in your reply: never run `exec`, Python, matplotlib, or fpdf2,
|
|
14
|
+
never call an image tool, and never deliver it as a PDF or image file.
|
|
15
|
+
|
|
16
|
+
Your reply STARTS with the fence. No preamble, no plan, no "I'll create a
|
|
17
|
+
diagram showing..." - never announce or describe a diagram instead of drawing
|
|
18
|
+
it. Decide the type silently, load its recipe, write the code block, close its
|
|
19
|
+
fence, then add one short sentence saying what it shows - after the closing
|
|
20
|
+
fence, never inside it. A complete reply looks like this:
|
|
21
|
+
|
|
22
|
+
```mermaid
|
|
23
|
+
flowchart TD
|
|
24
|
+
A["User sends a message"] --> B{"Needs a tool?"}
|
|
25
|
+
B -->|yes| C["Run the tool"]
|
|
26
|
+
B -->|no| D["Answer directly"]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Flow of a message through the assistant.
|
|
30
|
+
|
|
31
|
+
## Pick the Type, Then Load Its Recipe
|
|
32
|
+
|
|
33
|
+
Each type's syntax lives in its own reference file, named by the Mermaid
|
|
34
|
+
keyword. Pick the type from the ask, then call the `skill` tool with
|
|
35
|
+
`name: "diagrams"` and `file: "references/<type>.md"` in the SAME turn you
|
|
36
|
+
draw, BEFORE writing the fence - even when you drew another diagram earlier in
|
|
37
|
+
this chat. Copy the recipe's syntax exactly; a diagram written from memory is
|
|
38
|
+
the usual cause of a parse error. Each load is a real `skill` tool call -
|
|
39
|
+
printing the call as JSON or text in your reply loads nothing. After the load,
|
|
40
|
+
reply with the fenced block directly: no further tool calls of any kind.
|
|
41
|
+
|
|
42
|
+
| The ask | Type | File |
|
|
43
|
+
| ---------------------------------------------------- | ------------------- | --------------------------- |
|
|
44
|
+
| steps, decisions, a process, "map / structure this" | `flowchart TD` | `references/flowchart.md` |
|
|
45
|
+
| a pipeline left to right | `flowchart LR` | `references/flowchart.md` |
|
|
46
|
+
| a family tree, org chart, reporting lines | `flowchart TD` | `references/flowchart.md` |
|
|
47
|
+
| who calls whom over time, requests and replies | `sequenceDiagram` | `references/sequence.md` |
|
|
48
|
+
| modes and transitions | `stateDiagram-v2` | `references/state.md` |
|
|
49
|
+
| tables and their relations | `erDiagram` | `references/er.md` |
|
|
50
|
+
| code types, classes, inheritance | `classDiagram` | `references/class.md` |
|
|
51
|
+
| a schedule or plan with durations | `gantt` | `references/gantt.md` |
|
|
52
|
+
| dated events in order | `timeline` | `references/timeline.md` |
|
|
53
|
+
| shares of a whole, percentages | `pie` | `references/pie.md` |
|
|
54
|
+
| a brainstorm, idea tree, "mindmap" | `mindmap` | `references/mindmap.md` |
|
|
55
|
+
|
|
56
|
+
Use `gitGraph` ONLY when the user names it. Never use experimental or beta
|
|
57
|
+
diagram types, and never invent a keyword a recipe does not show.
|
|
58
|
+
|
|
59
|
+
## Hard Rules (every type)
|
|
60
|
+
|
|
61
|
+
- One diagram per code block, and the fence language is exactly `mermaid`. The
|
|
62
|
+
first line inside the fence is the type keyword from the table. Default to
|
|
63
|
+
ONE block; use two only when the recipe's budget forces an overview plus one
|
|
64
|
+
detail. Never more than two.
|
|
65
|
+
- Except in mindmaps, node ids are letters, digits, and underscores, starting
|
|
66
|
+
with a letter, never reused. Mindmap nodes have no ids.
|
|
67
|
+
- Except in mindmaps, every label with a space, punctuation, or brackets goes
|
|
68
|
+
in double quotes: `A["Send request (HTTP)"]`. Never leave bare `()[]{}` `:`
|
|
69
|
+
`;` inside a label. Mindmap labels are unquoted text.
|
|
70
|
+
- Never write lowercase `end` as a node or label - write `"End"`. Line breaks
|
|
71
|
+
inside a label are `<br/>`, never `\n`.
|
|
72
|
+
- No `%%{init}%%` directives, no `%%` comments, no `classDef` or `style`
|
|
73
|
+
lines. The app themes the diagram itself.
|
|
74
|
+
- Keep every label at 40 characters or fewer, one node per concept, with its
|
|
75
|
+
attributes inside that node's label. Dates, roles, counts, and statuses are
|
|
76
|
+
never standalone nodes.
|
|
77
|
+
- Syntax in one line per type, so a skimmed recipe still lands: flowchart
|
|
78
|
+
`A["x"] --> B{"y?"}` with `-->|yes|` labels; sequence `A->>B: msg` and
|
|
79
|
+
`B-->>A: reply`; state `[*] --> Idle` and `Idle --> Run : start`; pie
|
|
80
|
+
`"Sleep" : 8` (quoted label, plain number); gantt `Name :id, 2026-09-01, 5d`
|
|
81
|
+
or `after id`; timeline `2024 : Event`; mindmap `root[Topic]` then every
|
|
82
|
+
other line indented deeper than the root, unquoted, no ids (a line at the
|
|
83
|
+
root's indentation is a second root and fails).
|
|
84
|
+
|
|
85
|
+
## When NOT to use
|
|
86
|
+
|
|
87
|
+
- Images, scenes, logos, or anything artistic - use the `image-generation`
|
|
88
|
+
skill instead.
|
|
89
|
+
- Plots of numeric data - use `pie` for shares, otherwise a markdown table.
|
|
90
|
+
- Family trees, org charts, and reporting lines - `flowchart TD`, not
|
|
91
|
+
`mindmap`; a mindmap is for ideas around a topic, not people in a hierarchy.
|
|
92
|
+
|
|
93
|
+
## If the diagram fails
|
|
94
|
+
|
|
95
|
+
When a diagram cannot render, the app sends its parse error back to you once
|
|
96
|
+
on its own, and the user may send it again. Re-load the type's recipe and fix
|
|
97
|
+
by rewriting the ENTIRE code block, never a partial patch.
|
|
98
|
+
|
|
99
|
+
| Error contains | Fix |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| `Lexical error` / `Unrecognized text` | Remove every backslash in front of a quote and rewrite the block |
|
|
102
|
+
| `Expecting 'taskData'` | A gantt line is neither a header keyword nor a complete `Name :id, start, Nd` task - fix it or delete it |
|
|
103
|
+
| `Expecting ...` at a flowchart or sequence label | Put the whole label in double quotes |
|
|
104
|
+
| `got 'end'` | Rename the node label to `"End"` |
|
|
105
|
+
| `Maximum text size` or edge limit | Shrink the diagram or split it in two |
|
|
106
|
+
| `No diagram type detected` | Start the fence with one type keyword from the table |
|
|
107
|
+
| `Duplicate id` | Give every node a fresh unique id |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Class Diagram
|
|
2
|
+
|
|
3
|
+
For code types: classes, their members, inheritance.
|
|
4
|
+
|
|
5
|
+
Budget: 7 classes.
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
classDiagram
|
|
9
|
+
class Animal {
|
|
10
|
+
+String name
|
|
11
|
+
+speak()
|
|
12
|
+
}
|
|
13
|
+
Animal <|-- Dog
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Rules:
|
|
17
|
+
|
|
18
|
+
- Members go inside `class Name { }`, one per line, `+` public and `-`
|
|
19
|
+
private, methods end with `()`.
|
|
20
|
+
- Inheritance is `Parent <|-- Child`; composition `Whole *-- Part`;
|
|
21
|
+
association `A --> B`.
|
|
22
|
+
- Class names are single tokens; no quotes, no `classDef` lines.
|
|
23
|
+
|
|
24
|
+
## Now draw
|
|
25
|
+
|
|
26
|
+
This recipe is all you need. Your next output is the reply itself: one fenced
|
|
27
|
+
Mermaid code block (fence language `mermaid`), then one sentence. Do not call
|
|
28
|
+
any tool - not `exec`, not `skill` again, not an image tool. A tool call here
|
|
29
|
+
means the diagram was never drawn.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# ER Diagram
|
|
2
|
+
|
|
3
|
+
For tables and their relations.
|
|
4
|
+
|
|
5
|
+
Budget: 8 entities.
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
erDiagram
|
|
9
|
+
USER ||--o{ ORDER : "places"
|
|
10
|
+
ORDER ||--|{ LINE_ITEM : "contains"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Rules:
|
|
14
|
+
|
|
15
|
+
- Entities are UPPER_CASE single tokens.
|
|
16
|
+
- `||--o{` reads "one to zero-or-many"; `||--|{` "one to one-or-many";
|
|
17
|
+
`||--||` "one to one".
|
|
18
|
+
- The relationship label follows the colon in plain double quotes typed directly (no backslash in front).
|
|
19
|
+
- Attributes are optional; if used, list them inside `ENTITY { string name }`
|
|
20
|
+
blocks with one `type name` per line.
|
|
21
|
+
|
|
22
|
+
## Now draw
|
|
23
|
+
|
|
24
|
+
This recipe is all you need. Your next output is the reply itself: one fenced
|
|
25
|
+
Mermaid code block (fence language `mermaid`), then one sentence. Do not call
|
|
26
|
+
any tool - not `exec`, not `skill` again, not an image tool. A tool call here
|
|
27
|
+
means the diagram was never drawn.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Flowchart
|
|
2
|
+
|
|
3
|
+
For steps, decisions, processes, pipelines, and any "map this / structure
|
|
4
|
+
this" ask - also family trees, org charts, and reporting lines. `flowchart TD`
|
|
5
|
+
reads top-down; `flowchart LR` left-to-right for a pipeline.
|
|
6
|
+
|
|
7
|
+
Budget: 12 nodes and 16 edges. Over budget, simplify; if the detail is
|
|
8
|
+
essential, one overview block plus one detail block, never more.
|
|
9
|
+
|
|
10
|
+
```mermaid
|
|
11
|
+
flowchart LR
|
|
12
|
+
A["Request"] --> B{"Valid?"}
|
|
13
|
+
B -->|yes| C["Process"]
|
|
14
|
+
B -->|no| D["Reject with error"]
|
|
15
|
+
C --> E["Respond"]
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Rules:
|
|
19
|
+
|
|
20
|
+
- Nodes are `id["Label"]`; decisions are `id{"Question?"}` diamonds.
|
|
21
|
+
- Arrows are always `-->`; the label form is `-->|yes|`. Never `->>` here.
|
|
22
|
+
- Ids: letters, digits, underscores, starting with a letter, never reused.
|
|
23
|
+
- Every label goes in plain double quotes `"`, 40 characters or
|
|
24
|
+
fewer, `<br/>` for a line break. Never write lowercase `end` - use `"End"`.
|
|
25
|
+
- One node per person or concept, details inside its label; no separate nodes
|
|
26
|
+
for dates, roles, counts, or statuses.
|
|
27
|
+
|
|
28
|
+
## Now draw
|
|
29
|
+
|
|
30
|
+
This recipe is all you need. Your next output is the reply itself: one fenced
|
|
31
|
+
Mermaid code block (fence language `mermaid`), then one sentence. Do not call
|
|
32
|
+
any tool - not `exec`, not `skill` again, not an image tool. A tool call here
|
|
33
|
+
means the diagram was never drawn.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Gantt Chart
|
|
2
|
+
|
|
3
|
+
For a schedule or plan with durations.
|
|
4
|
+
|
|
5
|
+
Budget: 12 tasks across 4 sections.
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
gantt
|
|
9
|
+
title MVP delivery
|
|
10
|
+
dateFormat YYYY-MM-DD
|
|
11
|
+
excludes weekends
|
|
12
|
+
section Planning
|
|
13
|
+
Requirements :a1, 2026-09-01, 5d
|
|
14
|
+
Design :a2, after a1, 7d
|
|
15
|
+
section Build
|
|
16
|
+
Core platform :b1, after a2, 21d
|
|
17
|
+
API :b2, after a2, 17d
|
|
18
|
+
section Launch
|
|
19
|
+
Release :c1, after b1, 2d
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Rules:
|
|
23
|
+
|
|
24
|
+
- The only header lines are `title`, `dateFormat YYYY-MM-DD`, `axisFormat`,
|
|
25
|
+
`excludes weekends`, and `section Name`. Nothing else is a header.
|
|
26
|
+
- EVERY other line is a task and must be `Name :id, start, duration` - start
|
|
27
|
+
is a date or `after otherId`, duration is like `5d` or `2w`. A line that is
|
|
28
|
+
not one of these fails with `Expecting 'taskData'`.
|
|
29
|
+
- No colons inside task names, no quotes, no arrows.
|
|
30
|
+
- Ids are unique short tokens (`a1`, `b2`); `after` may name several ids
|
|
31
|
+
separated by spaces.
|
|
32
|
+
|
|
33
|
+
## Now draw
|
|
34
|
+
|
|
35
|
+
This recipe is all you need. Your next output is the reply itself: one fenced
|
|
36
|
+
Mermaid code block (fence language `mermaid`), then one sentence. Do not call
|
|
37
|
+
any tool - not `exec`, not `skill` again, not an image tool. A tool call here
|
|
38
|
+
means the diagram was never drawn.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Mindmap
|
|
2
|
+
|
|
3
|
+
For a brainstorm or idea tree around one topic. Not for people in a hierarchy
|
|
4
|
+
- that is a `flowchart TD`.
|
|
5
|
+
|
|
6
|
+
Budget: 3 levels, 10 nodes, 2-4 balanced top-level branches.
|
|
7
|
+
|
|
8
|
+
```mermaid
|
|
9
|
+
mindmap
|
|
10
|
+
root[Launch plan]
|
|
11
|
+
Marketing
|
|
12
|
+
Blog post
|
|
13
|
+
Social campaign
|
|
14
|
+
Engineering
|
|
15
|
+
Release build
|
|
16
|
+
Monitoring
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Rules:
|
|
20
|
+
|
|
21
|
+
- The first line is `mindmap`; the second is the rectangular `root[Topic]`.
|
|
22
|
+
- One node per line, two more spaces of indentation per level; the tree shape
|
|
23
|
+
comes only from indentation. Every line after `root[...]` is indented deeper
|
|
24
|
+
than the root - a line at the root's indentation is a second root and fails
|
|
25
|
+
with `There can be only one root`.
|
|
26
|
+
- Labels are unquoted plain text with no ids, no quotes, no arrows,
|
|
27
|
+
no brackets except the `root[...]` form.
|
|
28
|
+
- One node per item with its details in that node; no attribute leaves.
|
|
29
|
+
|
|
30
|
+
## Now draw
|
|
31
|
+
|
|
32
|
+
This recipe is all you need. Your next output is the reply itself: one fenced
|
|
33
|
+
Mermaid code block (fence language `mermaid`), then one sentence. Do not call
|
|
34
|
+
any tool - not `exec`, not `skill` again, not an image tool. A tool call here
|
|
35
|
+
means the diagram was never drawn.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Pie Chart
|
|
2
|
+
|
|
3
|
+
For shares of a whole: hours in a day, budget split, percentages.
|
|
4
|
+
|
|
5
|
+
Budget: 8 slices; combine the remainder as `"Other"`.
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
pie title Time spent
|
|
9
|
+
"Coding" : 60
|
|
10
|
+
"Review" : 25
|
|
11
|
+
"Meetings" : 15
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Rules:
|
|
15
|
+
|
|
16
|
+
- The first line is `pie title Your title` (or just `pie`).
|
|
17
|
+
- Every slice is `"Label" : number` - the label in plain double quotes typed
|
|
18
|
+
directly (never unquoted, never with a backslash in front), then a
|
|
19
|
+
space-colon-space, then a plain number with no unit or `%` sign.
|
|
20
|
+
- One slice per line; values need not add up to 100.
|
|
21
|
+
|
|
22
|
+
## Now draw
|
|
23
|
+
|
|
24
|
+
This recipe is all you need. Your next output is the reply itself: one fenced
|
|
25
|
+
Mermaid code block (fence language `mermaid`), then one sentence. Do not call
|
|
26
|
+
any tool - not `exec`, not `skill` again, not an image tool. A tool call here
|
|
27
|
+
means the diagram was never drawn.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Sequence Diagram
|
|
2
|
+
|
|
3
|
+
For who calls whom over time: requests and replies between an app, a server,
|
|
4
|
+
a browser, a service.
|
|
5
|
+
|
|
6
|
+
Budget: 5 participants and 12 messages.
|
|
7
|
+
|
|
8
|
+
```mermaid
|
|
9
|
+
sequenceDiagram
|
|
10
|
+
participant App
|
|
11
|
+
participant Server
|
|
12
|
+
App->>Server: POST /login
|
|
13
|
+
Server-->>App: 200 with token
|
|
14
|
+
Note over App: stores the token
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Rules:
|
|
18
|
+
|
|
19
|
+
- Declare every `participant` first, as a bare name without quotes.
|
|
20
|
+
- A call is `A->>B: message`; a reply is `B-->>A: message`. Never use the
|
|
21
|
+
flowchart `-->` arrow here.
|
|
22
|
+
- A note is `Note over A: text` (or `Note over A,B: text`).
|
|
23
|
+
- Message text follows the colon unquoted; keep it short. No backslashes anywhere.
|
|
24
|
+
- No ids, no brackets, no `end` except to close a Mermaid `loop`/`alt` block
|
|
25
|
+
you opened.
|
|
26
|
+
|
|
27
|
+
## Now draw
|
|
28
|
+
|
|
29
|
+
This recipe is all you need. Your next output is the reply itself: one fenced
|
|
30
|
+
Mermaid code block (fence language `mermaid`), then one sentence. Do not call
|
|
31
|
+
any tool - not `exec`, not `skill` again, not an image tool. A tool call here
|
|
32
|
+
means the diagram was never drawn.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# State Diagram
|
|
2
|
+
|
|
3
|
+
For modes and transitions: a device, a job, a session moving between states.
|
|
4
|
+
|
|
5
|
+
Budget: 8 states.
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
stateDiagram-v2
|
|
9
|
+
[*] --> Idle
|
|
10
|
+
Idle --> Running : start
|
|
11
|
+
Running --> Idle : stop
|
|
12
|
+
Running --> [*] : shutdown
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Rules:
|
|
16
|
+
|
|
17
|
+
- The first line is exactly `stateDiagram-v2`.
|
|
18
|
+
- `[*]` is both the start and the end marker.
|
|
19
|
+
- A transition is `From --> To : label`; the label is optional and follows a
|
|
20
|
+
colon, unquoted.
|
|
21
|
+
- State names are single words or `snake_case`; for a spaced display name use
|
|
22
|
+
`state "Waiting for input" as Waiting` once, then `Waiting` everywhere.
|
|
23
|
+
- No backslashes, no `classDef`, no `%%` lines.
|
|
24
|
+
|
|
25
|
+
## Now draw
|
|
26
|
+
|
|
27
|
+
This recipe is all you need. Your next output is the reply itself: one fenced
|
|
28
|
+
Mermaid code block (fence language `mermaid`), then one sentence. Do not call
|
|
29
|
+
any tool - not `exec`, not `skill` again, not an image tool. A tool call here
|
|
30
|
+
means the diagram was never drawn.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Timeline
|
|
2
|
+
|
|
3
|
+
For dated events in order: a history, a roadmap already dated.
|
|
4
|
+
|
|
5
|
+
Budget: 8 events.
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
timeline
|
|
9
|
+
title Product history
|
|
10
|
+
2024 : Prototype
|
|
11
|
+
2025 : Public beta : First paying customers
|
|
12
|
+
2026 : Version 1.0
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Rules:
|
|
16
|
+
|
|
17
|
+
- `title` first, then one line per period as `period : event`, with another
|
|
18
|
+
` : event` for each extra event in the same period.
|
|
19
|
+
- Periods are years, dates, or short phase names; events are short unquoted
|
|
20
|
+
text.
|
|
21
|
+
- No arrows, no ids, no quotes.
|
|
22
|
+
|
|
23
|
+
## Now draw
|
|
24
|
+
|
|
25
|
+
This recipe is all you need. Your next output is the reply itself: one fenced
|
|
26
|
+
Mermaid code block (fence language `mermaid`), then one sentence. Do not call
|
|
27
|
+
any tool - not `exec`, not `skill` again, not an image tool. A tool call here
|
|
28
|
+
means the diagram was never drawn.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: excel
|
|
3
|
+
description: Create, edit, or read Excel spreadsheets (.xlsx) with openpyxl — deliver workbooks as chat attachments, or read an attached one to summarize it or answer questions in the chat. Computes values in Python; can also write live formulas and embed images. Opens in Numbers and Google Sheets too.
|
|
4
|
+
aliases: [xlsx, spreadsheet, workbook]
|
|
5
|
+
tools: [exec(python)]
|
|
6
|
+
platform: [darwin, linux, win32]
|
|
7
|
+
metadata:
|
|
8
|
+
{
|
|
9
|
+
"openclaw":
|
|
10
|
+
{
|
|
11
|
+
"setup":
|
|
12
|
+
{
|
|
13
|
+
"summary": "Runs openpyxl in the in-process Python runtime, from packages that ship with the app. The first use waits for the runtime to start."
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Excel
|
|
20
|
+
|
|
21
|
+
Build or edit an `.xlsx` workbook by running openpyxl through the `exec` tool with
|
|
22
|
+
`language: "python"`. Declare the workbook in `outputs` and it comes back as a chat
|
|
23
|
+
attachment the user can save. To answer *from* a workbook instead of building one,
|
|
24
|
+
run a read call — no `outputs` — and reply in the chat.
|
|
25
|
+
|
|
26
|
+
## Load the Recipe File First
|
|
27
|
+
|
|
28
|
+
This file contains no Python. The working recipes live in three reference files —
|
|
29
|
+
load the one for the job with the `skill` tool BEFORE writing any Python, then
|
|
30
|
+
copy its recipe and change the content:
|
|
31
|
+
|
|
32
|
+
Each load is a real `skill` tool call — printing the call as JSON or text in
|
|
33
|
+
your reply loads nothing.
|
|
34
|
+
|
|
35
|
+
- **Creating a new workbook** (no existing file involved, including one that embeds
|
|
36
|
+
an image): call the `skill` tool with `name: "excel"` and
|
|
37
|
+
`file: "references/create.md"`.
|
|
38
|
+
- **Editing an attached workbook** (change cells, add/insert/delete rows, columns or
|
|
39
|
+
sheets, or embed an image into one that already exists): call the `skill` tool with
|
|
40
|
+
`name: "excel"` and `file: "references/edit.md"`.
|
|
41
|
+
- **Answering from an attached workbook** (a summary, a question answered,
|
|
42
|
+
values pulled into the chat — the deliverable is your reply, not a file): call
|
|
43
|
+
the `skill` tool with `name: "excel"` and `file: "references/read.md"`.
|
|
44
|
+
- **Read then build** (e.g. "summarize this workbook into a new file"): load
|
|
45
|
+
`references/read.md` and the create or edit file — the read call runs first.
|
|
46
|
+
|
|
47
|
+
Never write the Python from memory. The recipes carry required patterns (the
|
|
48
|
+
fill-in template, staging rules, guard asserts) that fail in non-obvious ways
|
|
49
|
+
when improvised; loading the file is one cheap read-only call.
|
|
50
|
+
|
|
51
|
+
## When to Use
|
|
52
|
+
|
|
53
|
+
- The user asks for a spreadsheet, workbook, `.xlsx`, Excel, or Numbers/Sheets-openable file.
|
|
54
|
+
- The user attaches a spreadsheet and wants cells changed, rows/columns/sheets added or removed, or data extracted from it.
|
|
55
|
+
- The user attaches a spreadsheet and asks what it holds — a summary, a question
|
|
56
|
+
answered, or values pulled out into the chat.
|
|
57
|
+
- The user wants a workbook that embeds an image — one generated in this chat or
|
|
58
|
+
one they uploaded. Both recipe files carry it.
|
|
59
|
+
|
|
60
|
+
## When NOT to Use
|
|
61
|
+
|
|
62
|
+
- The user wants a table in the chat built from content already in the
|
|
63
|
+
conversation — no workbook involved — write a markdown table. Answering or
|
|
64
|
+
summarizing from an attached workbook **is** this skill: load
|
|
65
|
+
`references/read.md`.
|
|
66
|
+
- The user wants a comma-separated text file only — write the `.csv` directly with Python's `csv` module (`.csv` is an allowed output), no openpyxl needed.
|
|
67
|
+
|
|
68
|
+
## Values vs Formulas — decide before writing
|
|
69
|
+
|
|
70
|
+
This runtime has no spreadsheet engine: openpyxl writes a formula as text and
|
|
71
|
+
computes nothing. A formula cell has **no value** until the user opens the file
|
|
72
|
+
in a spreadsheet app and it recalculates. So pick the mode from what the user
|
|
73
|
+
wants:
|
|
74
|
+
|
|
75
|
+
- **They want numbers** (a report, totals, statistics, cleaned data): compute in
|
|
76
|
+
Python and write **literal values**. This is the default.
|
|
77
|
+
- **They want a live spreadsheet** (totals that update when they edit cells):
|
|
78
|
+
write formulas — and say so in the reply, because the formula cells look empty
|
|
79
|
+
in the chat preview: "the total is a live formula, so it shows up once you
|
|
80
|
+
open the file in Excel, Numbers, or Sheets."
|
|
81
|
+
- Never write a formula and then read it back expecting a number, and never
|
|
82
|
+
"verify" a formula by reloading the file — there is nothing to verify.
|
|
83
|
+
|
|
84
|
+
Writing both is fine: literal values everywhere, plus a `=SUM(...)` total row if
|
|
85
|
+
the user wants it to stay live.
|
|
86
|
+
|
|
87
|
+
## Rules for Every Job
|
|
88
|
+
|
|
89
|
+
**You build it, not the user.** Deliver the workbook, never the recipe. Do NOT
|
|
90
|
+
print the python source in chat, do NOT tell the user to install openpyxl, run
|
|
91
|
+
a script, or open a terminal — they have no terminal in this chat and the code
|
|
92
|
+
would not run there. The workbook exists only if an `exec` call with `outputs`
|
|
93
|
+
succeeds and returns the attachment.
|
|
94
|
+
|
|
95
|
+
**Success = stop.** When `exitCode` is `0` and `attachments` lists the `.xlsx`,
|
|
96
|
+
the workbook is done — do not call `exec` again, not to "confirm", not to
|
|
97
|
+
"improve", not to reload the file to "check the formulas". Exactly one
|
|
98
|
+
successful *build* call per request (a no-`outputs` read that precedes a build
|
|
99
|
+
delivers nothing and is not one of them, but it belongs before the build, never
|
|
100
|
+
after). Reply with a single line: file name + the sheet/row summary from stdout.
|
|
101
|
+
If the result has `missingOutputs`, read stderr first: an `AssertionError` there
|
|
102
|
+
means a guard stopped the save on purpose and its message names what to fix;
|
|
103
|
+
only when stderr is clean check the `save()` name matches the declared output
|
|
104
|
+
and rerun once.
|
|
105
|
+
|
|
106
|
+
**Failures are fixed in the code, not around it.** If a run fails, fix the
|
|
107
|
+
Python against the loaded reference file's recipes and Errors table and call
|
|
108
|
+
`exec` again. If two consecutive calls fail with the same error, re-read the
|
|
109
|
+
traceback line-by-line before a third. An error is never a fault in openpyxl or
|
|
110
|
+
the runtime — keep `packages: ["openpyxl==3.1.5"]`, never wrap source in
|
|
111
|
+
`python -c` or shell, never "debug" with `os.listdir` or no-op scripts.
|
|
112
|
+
|
|
113
|
+
**The runtime is sealed.** No shell (`ls`, `cat` raise `SyntaxError` — the
|
|
114
|
+
`command` is Python source) and no network (`requests` and `urllib` fail — a
|
|
115
|
+
URL to a spreadsheet cannot be downloaded; ask the user to attach the file).
|
|
116
|
+
The working directory starts empty on every call: a file from an earlier call
|
|
117
|
+
is gone unless staged again via `inputs`, and a file you write but do not
|
|
118
|
+
declare in `outputs` is discarded.
|
|
119
|
+
|
|
120
|
+
**Never overwrite a staged input.** Edits always save under a new output name.
|