@antaif3ng/til-work 0.3.0 → 0.4.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.
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: Excel / XLSX
3
+ slug: excel-xlsx
4
+ version: 1.0.2
5
+ homepage: https://clawic.com/skills/excel-xlsx
6
+ description: "Create, inspect, and edit Microsoft Excel workbooks and XLSX files with reliable formulas, dates, types, formatting, recalculation, and template preservation. Use when (1) the task is about Excel, `.xlsx`, `.xlsm`, `.xls`, `.csv`, or `.tsv`; (2) formulas, formatting, workbook structure, or compatibility matter; (3) the file must stay reliable after edits."
7
+ changelog: Tightened formula anchoring, recalculation, and model traceability after a stricter external spreadsheet audit.
8
+ metadata: {"clawdbot":{"emoji":"📗","requires":{"bins":[]},"os":["linux","darwin","win32"]}}
9
+ ---
10
+
11
+ ## When to Use
12
+
13
+ Use when the main artifact is a Microsoft Excel workbook or spreadsheet file, especially when formulas, dates, formatting, merged cells, workbook structure, or cross-platform behavior matter.
14
+
15
+ ## Core Rules
16
+
17
+ ### 1. Choose the workflow by job, not by habit
18
+
19
+ - Use `pandas` for analysis, reshaping, and CSV-like tasks.
20
+ - Use `openpyxl` when formulas, styles, sheets, comments, merged cells, or workbook preservation matter.
21
+ - Treat CSV as plain data exchange, not as an Excel feature-complete format.
22
+ - Reading values, preserving a live workbook, and building a model from scratch are different spreadsheet jobs.
23
+
24
+ ### 2. Dates are serial numbers with legacy quirks
25
+
26
+ - Excel stores dates as serial numbers, not real date objects.
27
+ - The 1900 date system includes the false leap-day bug, and some workbooks use the 1904 system.
28
+ - Time is fractional day data, so formatting and conversion both matter.
29
+ - Date correctness is not enough if the number format still displays the wrong thing to the user.
30
+
31
+ ### 3. Keep calculations in Excel when the workbook should stay live
32
+
33
+ - Write formulas into cells instead of hardcoding derived results from Python.
34
+ - Use references to assumption cells instead of magic numbers inside formulas.
35
+ - Cached formula values can be stale, so do not trust them blindly after edits.
36
+ - Check copied formulas for wrong ranges, wrong sheets, and silent off-by-one drift before delivery.
37
+ - Absolute and relative references are part of the logic, so copied formulas can be wrong even when they still "work".
38
+ - Test new formulas on a few representative cells before filling them across a whole block.
39
+ - Verify denominators, named ranges, and precedent cells before shipping formulas that depend on them.
40
+ - A workbook should ship with zero formula errors, not with known `#REF!`, `#DIV/0!`, `#VALUE!`, `#NAME?`, or circular-reference fallout left for the user to fix.
41
+ - For model-style work, document non-obvious hardcodes, assumptions, or source inputs in comments or nearby notes.
42
+
43
+ ### 4. Protect data types before Excel mangles them
44
+
45
+ - Long identifiers, phone numbers, ZIP codes, and leading-zero values should usually be stored as text.
46
+ - Excel silently truncates numeric precision past 15 digits.
47
+ - Mixed text-number columns need explicit handling on read and on write.
48
+ - Scientific notation, auto-parsed dates, and stripped leading zeros are common corruption, not cosmetic issues.
49
+
50
+ ### 5. Preserve workbook structure before changing content
51
+
52
+ - Existing templates override generic styling advice.
53
+ - Only the top-left cell of a merged range stores the value.
54
+ - Hidden rows, hidden columns, named ranges, and external references can still affect formulas and outputs.
55
+ - Shared strings, defined names, and sheet-level conventions can matter even when the visible cells look simple.
56
+ - Match styles for newly filled cells instead of quietly introducing a new visual system.
57
+ - If the workbook is a template, preserve sheet order, widths, freezes, filters, print settings, validations, and visual conventions unless the task explicitly changes them.
58
+ - Conditional formatting, filters, print areas, and data validation often carry business meaning even when users only mention the numbers.
59
+ - If there is no existing style guide and the file is a model, keep editable inputs visually distinguishable from formulas, but never override an established template to force a generic house style.
60
+
61
+ ### 6. Recalculate and review before delivery
62
+
63
+ - Formula strings alone are not enough if the recipient needs current values.
64
+ - `openpyxl` preserves formulas but does not calculate them.
65
+ - Verify no `#REF!`, `#DIV/0!`, `#VALUE!`, `#NAME?`, or circular-reference fallout remains.
66
+ - If layout matters, render or visually review the workbook before calling it finished.
67
+ - Be careful with read modes: opening a workbook for values only and then saving can flatten formulas into static values.
68
+ - If assumptions or hardcoded overrides must stay, make them obvious enough that the next editor can audit the workbook.
69
+
70
+ ### 7. Scale the workflow to the file size
71
+
72
+ - Large workbooks can fail for boring reasons: memory spikes, padded empty rows, and slow full-sheet reads.
73
+ - Use streaming or chunked reads when the file is big enough that loading everything at once becomes fragile.
74
+ - Large-file workflows also need narrower reads, explicit dtypes, and sheet targeting to avoid accidental damage.
75
+
76
+ ## Common Traps
77
+
78
+ - Type inference on read can leave numbers as text or convert IDs into damaged numeric values.
79
+ - Column indexing varies across tools, so off-by-one mistakes are common in generated formulas.
80
+ - Newlines in cells need wrapping to display correctly.
81
+ - External references break easily when source files move.
82
+ - Password protection in old Excel workflows is not serious security.
83
+ - `.xlsm` can contain macros, and `.xls` remains a tighter legacy format.
84
+ - Large files may need streaming reads or more careful memory handling.
85
+ - Google Sheets and LibreOffice can reinterpret dates, formulas, or styling differently from Excel.
86
+ - Dynamic array or newer Excel functions like `FILTER`, `XLOOKUP`, `SORT`, or `SEQUENCE` may fail or degrade in older viewers.
87
+ - A workbook can look fine while still carrying stale cached values from a prior recalculation.
88
+ - Saving the wrong workbook view can replace formulas with cached values and quietly destroy a live model.
89
+ - Copying formulas without checking relative references can push one bad range across an entire block.
90
+ - Hidden sheets, named ranges, validations, and merged areas often keep business logic that is invisible in a quick skim.
91
+ - A workbook can appear numerically correct while still failing because filters, conditional formats, print settings, or data validation were stripped.
92
+ - A workbook can be numerically correct and still fail visually because wrapped text, clipped labels, or narrow columns were never reviewed.
93
+
94
+ ## Related Skills
95
+ Install with `clawhub install <slug>` if user confirms:
96
+ - `csv` — Plain-text tabular import and export workflows.
97
+ - `data` — General data handling patterns before spreadsheet output.
98
+ - `data-analysis` — Higher-level analysis that can feed workbook deliverables.
99
+
100
+ ## Feedback
101
+
102
+ - If useful: `clawhub star excel-xlsx`
103
+ - Stay updated: `clawhub sync`
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: nano-pdf
3
+ description: "Edit PDFs with natural-language instructions using the nano-pdf CLI."
4
+ homepage: https://pypi.org/project/nano-pdf/
5
+ metadata: {"clawdbot":{"emoji":"📄","requires":{"bins":["nano-pdf"]},"install":[{"id":"uv","kind":"uv","package":"nano-pdf","bins":["nano-pdf"],"label":"Install nano-pdf (uv)"}]}}
6
+ ---
7
+
8
+ # nano-pdf
9
+
10
+ Use `nano-pdf` to apply edits to a specific page in a PDF using a natural-language instruction.
11
+
12
+ ## Quick start
13
+
14
+ ```bash
15
+ nano-pdf edit deck.pdf 1 "Change the title to 'Q3 Results' and fix the typo in the subtitle"
16
+ ```
17
+
18
+ Notes:
19
+ - Page numbers are 0-based or 1-based depending on the tool's version/config; if the result looks off by one, retry with the other.
20
+ - Always sanity-check the output PDF before sending it out.
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: Word / DOCX
3
+ slug: word-docx
4
+ version: 1.0.2
5
+ homepage: https://clawic.com/skills/word-docx
6
+ description: "Create, inspect, and edit Microsoft Word documents and DOCX files with reliable styles, numbering, tracked changes, tables, sections, and compatibility checks. Use when (1) the task is about Word or `.docx`; (2) the file includes tracked changes, comments, fields, tables, templates, or page layout constraints; (3) the document must survive round-trip editing without formatting drift."
7
+ changelog: Tightened the skill around fragile review workflows, reference stability, and layout drift after a stricter external audit.
8
+ metadata: {"clawdbot":{"emoji":"📘","os":["linux","darwin","win32"]}}
9
+ ---
10
+
11
+ ## When to Use
12
+
13
+ Use when the main artifact is a Microsoft Word document or `.docx` file, especially when tracked changes, comments, headers, numbering, fields, tables, templates, or compatibility matter.
14
+
15
+ ## Core Rules
16
+
17
+ ### 1. Treat DOCX as OOXML, not plain text
18
+
19
+ - A `.docx` file is a ZIP of XML parts, so structure matters as much as visible text.
20
+ - The critical parts are usually `word/document.xml`, `styles.xml`, `numbering.xml`, headers, footers, and relationship files.
21
+ - Text may be split across multiple runs; never assume one word or sentence lives in one XML node.
22
+ - Use different workflows on purpose: structured extraction for quick reading, style-driven generation for new files, and OOXML-aware editing for fragile existing documents.
23
+ - If the job is mainly reading, extracting, or reviewing, prefer a structure-preserving read path before touching OOXML.
24
+ - For deep edits, inspect the package layout instead of relying only on rendered output.
25
+ - Reading, generating, and preserving an existing reviewed document are different jobs even when the format is the same.
26
+ - Legacy `.doc` inputs usually need conversion before you can trust modern `.docx` assumptions.
27
+
28
+ ### 2. Preserve styles and direct formatting deliberately
29
+
30
+ - Prefer named styles over direct formatting so the document stays editable.
31
+ - Styles layer: paragraph styles, character styles, and direct formatting do not behave the same.
32
+ - Removing direct formatting is often safer than stacking more inline formatting on top.
33
+ - When editing an existing file, extend the current style system instead of inventing a parallel one.
34
+ - Copying content between documents can silently import foreign styles, theme settings, and numbering definitions.
35
+
36
+ ### 3. Lists and numbering are their own system
37
+
38
+ - Bullets and numbering belong to Word's numbering definitions, not pasted Unicode characters.
39
+ - `abstractNum`, `num`, and paragraph numbering properties all matter, so restart behavior is rarely "visual only".
40
+ - Indentation and numbering are related but not identical; a list can have broken numbering even if the indent looks right.
41
+ - A list that looks correct in one editor can restart, flatten, or renumber itself later if the underlying numbering state is wrong.
42
+
43
+ ### 4. Page layout lives in sections
44
+
45
+ - Margins, orientation, headers, footers, and page numbering are section-level behavior.
46
+ - First-page and odd/even headers can differ inside the same document, so one header fix may not fix the document.
47
+ - Set page size explicitly because A4 and US Letter defaults change pagination and table widths.
48
+ - Use section breaks for layout changes; manual spacing and stray page breaks usually create drift.
49
+ - Header and footer media use part-specific relationships, so copied IDs often break images or links.
50
+ - Tables, page breaks, and headers often drift together, so treat layout fixes as document-wide, not local cosmetic edits.
51
+ - Table geometry depends on page width, margins, and fixed widths, so "close enough" table edits often break later in Google Docs or LibreOffice.
52
+
53
+ ### 5. Track changes, comments, and fields need precise edits
54
+
55
+ - Visible text is not the full document when tracked changes are enabled.
56
+ - Insertions, deletions, and comments carry metadata that can survive careless edits.
57
+ - Deleted text may still exist in the XML even when it no longer appears on screen.
58
+ - Comment anchors and review ranges can break if edits move text without preserving the surrounding structure.
59
+ - Comment markers and review wrappers do not behave like inline formatting, so moving text carelessly can orphan or misplace them.
60
+ - Comments, footnotes, bookmarks, and linked media may live in separate parts, not only in the main document body.
61
+ - Tables of contents, page numbers, dates, cross-references, and mail merge placeholders are fields.
62
+ - Edit the field source carefully and expect cached display values to lag until refresh.
63
+ - Hyperlinks, bookmarks, and references can break if IDs or relationships stop matching.
64
+ - Bookmarks, footnotes, comment ranges, and cross-references depend on stable anchors even when the visible text seems untouched.
65
+ - A document can look correct while still containing stale field output that refreshes later into something different.
66
+ - For review workflows, make minimal replacements instead of rewriting whole paragraphs.
67
+ - In tracked-change workflows, only the changed span should look changed; broad rewrites create noisy reviews and can destroy the original formatting context.
68
+ - For legal, academic, or business review documents, default to review-style edits over wholesale paragraph rewrites unless the user explicitly wants a rewrite.
69
+
70
+ ### 6. Verify round-trip compatibility before delivery
71
+
72
+ - Complex documents can shift between Word, LibreOffice, Google Docs, and conversion tools.
73
+ - Tables, headers, embedded fonts, and copied styles are common sources of layout drift.
74
+ - Treat `.docm` as macro-bearing and higher risk; treat `.doc` as legacy input that may need conversion first.
75
+ - When layout matters, explicit table widths are safer than auto-fit or percentage-style behavior that different editors reinterpret.
76
+ - A document that passes a text check can still fail on pagination, table widths, or reference refresh after the recipient opens it.
77
+
78
+ ## Common Traps
79
+
80
+ - Copy-paste can import unwanted styles and numbering definitions.
81
+ - Header or footer images use part-specific relationships, so reusing IDs blindly breaks them.
82
+ - Empty paragraphs used as spacing make templates fragile; spacing belongs in paragraph settings.
83
+ - A clean-looking export can still hide unresolved revisions, comments, or stale field values.
84
+ - Restarting lists "by eye" usually fails because numbering state lives outside the paragraph text.
85
+ - One visible phrase can be split across several runs, bookmarks, revision tags, or field boundaries.
86
+ - Replacing a whole paragraph to change one clause often breaks review quality, bookmarks, comments, or nearby inline formatting.
87
+ - Deleting all visible text from a paragraph or list item can still leave behind an empty paragraph mark, empty bullet, or unstable numbering.
88
+ - Table auto-fit and percentage-like width behavior can look acceptable in Word and still drift in Google Docs or LibreOffice.
89
+ - LibreOffice and Google Docs can shift complex tables, section behavior, and embedded fonts even when Word looks perfect.
90
+ - Compatibility mode can silently cap newer features or change pagination behavior.
91
+ - A single change in page size or margin defaults can ripple through tables, headers, TOC, and cross-references.
92
+ - A revision workflow can look accepted on screen while leftover metadata, comments, or field caches still make the file unstable later.
93
+ - TOC entries, footnotes, and cross-references can look correct until the recipient updates fields and exposes broken anchors.
94
+
95
+ ## Related Skills
96
+ Install with `clawhub install <slug>` if user confirms:
97
+ - `documents` — General document handling and format conversion.
98
+ - `brief` — Concise business writing and structured summaries.
99
+ - `article` — Long-form drafting and editorial structure.
100
+
101
+ ## Feedback
102
+
103
+ - If useful: `clawhub star word-docx`
104
+ - Stay updated: `clawhub sync`
@@ -1,90 +0,0 @@
1
- ---
2
- name: playwright-mcp
3
- description: "Browser automation via Playwright MCP server. Use when the user needs to navigate websites, click elements, fill forms, extract data, take screenshots, or perform browser automation workflows."
4
- ---
5
-
6
- # Playwright MCP Skill
7
-
8
- Browser automation powered by Playwright MCP server.
9
-
10
- ## Prerequisites
11
-
12
- Install the Playwright MCP server:
13
-
14
- ```bash
15
- npm install -g @playwright/mcp
16
- npx playwright install chromium
17
- ```
18
-
19
- ## MCP Configuration
20
-
21
- Add to your `~/.til/config.json`:
22
-
23
- ```json
24
- {
25
- "mcpServers": {
26
- "playwright": {
27
- "command": "npx",
28
- "args": ["@playwright/mcp", "--headless"]
29
- }
30
- }
31
- }
32
- ```
33
-
34
- For headed mode (visible browser):
35
- ```json
36
- {
37
- "mcpServers": {
38
- "playwright": {
39
- "command": "npx",
40
- "args": ["@playwright/mcp"]
41
- }
42
- }
43
- }
44
- ```
45
-
46
- ## MCP Tools Reference
47
-
48
- | Tool | Description |
49
- |------|-------------|
50
- | `browser_navigate` | Navigate to URL |
51
- | `browser_click` | Click element by CSS selector or coordinates |
52
- | `browser_type` | Type text into input field |
53
- | `browser_select_option` | Select dropdown option |
54
- | `browser_get_text` | Get text content of element or page |
55
- | `browser_evaluate` | Execute JavaScript in page context |
56
- | `browser_snapshot` | Get accessible page snapshot (recommended before interactions) |
57
- | `browser_close` | Close browser context |
58
- | `browser_choose_file` | Upload file to input |
59
- | `browser_press` | Press keyboard key (Enter, Tab, etc.) |
60
-
61
- ## Workflow
62
-
63
- 1. **Navigate** to the target URL
64
- 2. **Snapshot** to understand the page structure
65
- 3. **Interact** with elements (click, type, select)
66
- 4. **Extract** data or take screenshots as needed
67
- 5. **Close** when done
68
-
69
- ## Configuration Options
70
-
71
- | Flag | Description |
72
- |------|-------------|
73
- | `--allowed-hosts` | Restrict navigation to specific hosts |
74
- | `--blocked-origins` | Block specific origins |
75
- | `--browser` | Browser engine (chromium, firefox, webkit) |
76
- | `--headless` | Run without visible browser window |
77
- | `--viewport-size` | Set viewport dimensions (e.g. "1280x720") |
78
- | `--timeout-action` | Action timeout in ms |
79
- | `--timeout-navigation` | Navigation timeout in ms |
80
- | `--output-dir` | Directory for screenshots and traces |
81
- | `--save-trace` | Save Playwright trace file |
82
- | `--save-video` | Record browser session video |
83
-
84
- ## Tips
85
-
86
- - Always use `browser_snapshot` before interacting with elements
87
- - Use CSS selectors for reliable element targeting
88
- - Set appropriate timeouts for slow-loading pages
89
- - Use `--headless` in CI/automation environments
90
- - Use `browser_evaluate` for complex page manipulation