@e4779/skills 0.0.0-stage → 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.
Files changed (57) hide show
  1. package/chrome-devtools/README.md +76 -0
  2. package/chrome-devtools/SKILL.md +277 -0
  3. package/chrome-devtools/references/recipes.md +379 -0
  4. package/chrome-devtools/references/setup.md +138 -0
  5. package/drawio/SKILL.md +395 -0
  6. package/gh-cli/SKILL.md +83 -0
  7. package/grill/SKILL.md +72 -0
  8. package/layout-check/README.md +32 -0
  9. package/layout-check/SKILL.md +416 -0
  10. package/layout-check/scripts/layoutProbe.mjs +539 -0
  11. package/mcpls/SKILL.md +261 -0
  12. package/mcpls/references/configuration.md +131 -0
  13. package/mcpls/references/install.md +13 -0
  14. package/mcporter/SKILL.md +90 -0
  15. package/mindmap/SKILL.md +46 -0
  16. package/mindmap/references/drawio-recipe.md +60 -0
  17. package/mindmap/references/mindmap-design.md +63 -0
  18. package/opensource-contribution/SKILL.md +119 -0
  19. package/package.json +29 -5
  20. package/shell-taste/.shellcheckrc +16 -0
  21. package/shell-taste/SKILL.md +95 -0
  22. package/shell-taste/references/handbook/dialects.md +168 -0
  23. package/shell-taste/references/handbook/dom/01-output-logging.md +245 -0
  24. package/shell-taste/references/handbook/dom/02-errors-exit.md +48 -0
  25. package/shell-taste/references/handbook/dom/03-installation-setup.md +179 -0
  26. package/shell-taste/references/handbook/dom/04-network.md +384 -0
  27. package/shell-taste/references/handbook/dom/05-files-paths.md +74 -0
  28. package/shell-taste/references/handbook/dom/06-checks-validation.md +127 -0
  29. package/shell-taste/references/handbook/dom/07-system-administration.md +103 -0
  30. package/shell-taste/references/handbook/dom/08-privilege-users.md +58 -0
  31. package/shell-taste/references/handbook/dom/09-text-data.md +62 -0
  32. package/shell-taste/references/handbook/dom/10-terminal-ux.md +60 -0
  33. package/shell-taste/references/handbook/dom/11-process-control.md +28 -0
  34. package/shell-taste/references/handbook/dom/12-uncategorized.md +161 -0
  35. package/shell-taste/references/handbook/dom/13-containers.md +13 -0
  36. package/shell-taste/references/handbook/dom/14-agents-ai-tooling.md +13 -0
  37. package/shell-taste/references/handbook/family-index.md +230 -0
  38. package/shell-taste/references/handbook/index.md +41 -0
  39. package/skill-author/SKILL.md +86 -0
  40. package/sobesednik/SKILL.md +98 -0
  41. package/sobesednik/card-template.md +23 -0
  42. package/sobesednik/personas/advocate.md +27 -0
  43. package/sobesednik/personas/analyst.md +29 -0
  44. package/sobesednik/personas/chat.md +42 -0
  45. package/sobesednik/personas/ifs.md +32 -0
  46. package/sobesednik/personas/journal/README.md +6 -0
  47. package/sobesednik/personas/nasreddin.md +29 -0
  48. package/sobesednik/personas/premortem.md +29 -0
  49. package/sobesednik/personas/rogers.md +27 -0
  50. package/sobesednik/personas/socratic.md +29 -0
  51. package/sobesednik/personas/stoic.md +27 -0
  52. package/sobesednik/references/persona-design.md +41 -0
  53. package/zai-mcp/README.md +63 -0
  54. package/zai-mcp/SKILL.md +160 -0
  55. package/zai-mcp/references/recipes.md +273 -0
  56. package/zai-mcp/references/tools.md +266 -0
  57. package/README.md +0 -3
@@ -0,0 +1,416 @@
1
+ ---
2
+ name: layout-check
3
+ description: "CSS layout verification via coordinate tables. Computes pairwise element relations (alignment, gap, overlap, misalign) from getBoundingClientRect. Use to verify layout fixes, check alignment, compare before/after CSS changes. RU: проверь вёрстку, съехала вёрстка, выравнивание, наложение элементов, сравни до/после."
4
+ ---
5
+
6
+ # Layout Check
7
+
8
+ Verify CSS layout using **exact element coordinates** instead of screenshots. This skill provides `layoutProbe` — a function that collects DOM element positions and computes spatial relationships: alignment, gaps, overlaps, misalignments.
9
+
10
+ ## Prerequisites
11
+
12
+ **Chrome DevTools MCP is REQUIRED.** This skill cannot function without it.
13
+
14
+ - `evaluate_script` — executes `layoutProbe` in the browser
15
+ - `take_snapshot` — gets element UIDs for uid-based checks (Step 3)
16
+
17
+ If your agent doesn't have Chrome DevTools MCP, install it first:
18
+ ```bash
19
+ # For pi:
20
+ npm install -g @anthropic/chrome-devtools-mcp
21
+ ```
22
+
23
+ ## When to Use This Skill
24
+
25
+ Use `layout-check` to:
26
+
27
+ - Check if elements in a row/column are aligned
28
+ - Verify CSS changes didn't shift elements
29
+ - Find overlapping elements
30
+ - Measure exact gaps between elements
31
+ - Compare layout before and after changes
32
+
33
+ **Do NOT use** for colors, fonts, shadows — use screenshots for those.
34
+
35
+ ## How It Works
36
+
37
+ 1. Call `evaluate_script` with `layoutProbe` code and CSS selectors
38
+ 2. `layoutProbe` calls `getBoundingClientRect()` on each element
39
+ 3. Returns a markdown table with coordinates and a relations list
40
+
41
+ ---
42
+
43
+ ## Step 1: Read the layoutProbe Script
44
+
45
+ Before first use, **read the script file**. You'll paste its contents into every `evaluate_script` call.
46
+
47
+ ```
48
+ read skills/layout-check/scripts/layoutProbe.mjs
49
+ ```
50
+
51
+ Save the content — you'll insert it in each `evaluate_script` call.
52
+
53
+ ---
54
+
55
+ ## Step 2: Basic Check (CSS Selectors)
56
+
57
+ The simplest way — pass CSS selectors. `layoutProbe` finds all matching elements.
58
+
59
+ ### Copy-Paste Template
60
+
61
+ Replace `<LAYOUTPROBE_CODE>` with the contents of `layoutProbe.mjs`, and replace selectors with your own:
62
+
63
+ ```js
64
+ () => {
65
+ <LAYOUTPROBE_CODE>
66
+
67
+ return layoutProbe({
68
+ selectors: {
69
+ 'button': '.my-button',
70
+ 'input': '.my-input'
71
+ }
72
+ });
73
+ }
74
+ ```
75
+
76
+ ### Example
77
+
78
+ ```js
79
+ () => {
80
+ // ... code from layoutProbe.mjs ...
81
+
82
+ return layoutProbe({
83
+ selectors: {
84
+ 'prefix': '.react-js-cron-field .bodyM',
85
+ 'select': '.react-js-cron-field [role=combobox]'
86
+ }
87
+ });
88
+ }
89
+ ```
90
+
91
+ ### What You Get
92
+
93
+ ```markdown
94
+ ### Elements
95
+
96
+ | name | text | top | left | bottom | right | w | h |
97
+ |------|------|-----|------|--------|-------|-----|-----|
98
+ | prefix | Every | 70 | 117.4 | 100 | 180.3 | 63 | 30 |
99
+ | select | Frequency | 40 | 190.3 | 100 | 298.5 | 108.2 | 60 |
100
+
101
+ ### Relations
102
+
103
+ - prefix ↔ select: bottom=100
104
+ - prefix → select: gap=10px
105
+ ```
106
+
107
+ ---
108
+
109
+ ## Step 3: Check via take_snapshot (UID)
110
+
111
+ For specific elements (not all matched by selector), use `take_snapshot` + `evaluate_script` with `args`.
112
+
113
+ ### Copy-Paste Template
114
+
115
+ **First:** call `take_snapshot` and note the UIDs of target elements (e.g., `1_2` and `1_3`).
116
+
117
+ **Then:** copy-paste this into `evaluate_script`:
118
+
119
+ ```json
120
+ {
121
+ "function": "(el0, el1) => {\n<LAYOUTPROBE_CODE>\nreturn layoutProbe({ elements: [el0, el1] });\n}",
122
+ "args": ["1_2", "1_3"]
123
+ }
124
+ ```
125
+
126
+ The first UID becomes `el0`, second becomes `el1`. Add `el2`, `el3` etc. for more elements.
127
+
128
+ ---
129
+
130
+ ## Step 4: Templates — row, column, grid
131
+
132
+ Ready-made templates for common checks. They take **all direct children** of a parent element.
133
+
134
+ ### Flex Row
135
+
136
+ ```js
137
+ () => {
138
+ <LAYOUTPROBE_CODE>
139
+ return layoutProbe.row('.my-form-row');
140
+ }
141
+ ```
142
+
143
+ Finds all children of `.my-form-row`, checks horizontal alignment.
144
+
145
+ ### Flex Column
146
+
147
+ ```js
148
+ () => {
149
+ <LAYOUTPROBE_CODE>
150
+ return layoutProbe.column('.form-stack');
151
+ }
152
+ ```
153
+
154
+ Finds all children of `.form-stack`, checks vertical alignment.
155
+
156
+ ### Grid
157
+
158
+ ```js
159
+ () => {
160
+ <LAYOUTPROBE_CODE>
161
+ return layoutProbe.grid('.card-grid');
162
+ }
163
+ ```
164
+
165
+ Finds all children of `.card-grid`, checks both directions.
166
+
167
+ ---
168
+
169
+ ## Step 5: Before/After Comparison
170
+
171
+ Verify that CSS changes didn't break layout:
172
+
173
+ ```js
174
+ () => {
175
+ <LAYOUTPROBE_CODE>
176
+
177
+ // 1. Measure BEFORE
178
+ const before = layoutProbe.structured({
179
+ selectors: { 'btn': '.button', 'input': 'input' }
180
+ });
181
+
182
+ // ... modify CSS or DOM here ...
183
+
184
+ // 2. Measure AFTER
185
+ const after = layoutProbe.structured({
186
+ selectors: { 'btn': '.button', 'input': 'input' }
187
+ });
188
+
189
+ // 3. Compare
190
+ return layoutProbe.compare(before, after);
191
+ }
192
+ ```
193
+
194
+ Output shows what changed:
195
+
196
+ ```
197
+ ~ btn.top: 10 → 15
198
+ ~ btn.left: 20 → 25
199
+ + relation: btn ↔ input: gap=15px
200
+ - relation: btn ↔ input: gap=10px
201
+ ```
202
+
203
+ - `~` — value changed
204
+ - `+` — new relation appeared
205
+ - `-` — relation disappeared
206
+ - `No changes detected.` — nothing changed
207
+
208
+ ---
209
+
210
+ ## How to Read the Output
211
+
212
+ ### Elements Table
213
+
214
+ Each row is one element:
215
+
216
+ | Column | Meaning |
217
+ |--------|---------|
218
+ | name | Element name (from selector or `el-0`, `el-1`) |
219
+ | text | Element text (first 15 chars) |
220
+ | top, left | Top-left corner coordinates |
221
+ | bottom, right | Bottom-right corner coordinates |
222
+ | w, h | Width and height |
223
+
224
+ ### Relations Section
225
+
226
+ Pairwise spatial relationships:
227
+
228
+ | Format | Meaning |
229
+ |--------|---------|
230
+ | `a ↔ b: top=10` | Aligned by top edge |
231
+ | `a ↔ b: bottom=50` | Aligned by bottom edge |
232
+ | `a ↔ b: left=20` | Aligned by left edge |
233
+ | `a ↔ b: right=100` | Aligned by right edge |
234
+ | `a ↔ b: center-x=60` | Aligned by horizontal center |
235
+ | `a ↔ b: center-y=30` | Aligned by vertical center |
236
+ | `a → b: gap=10px` | Horizontal gap from a to b |
237
+ | `a ↓ b: vgap=10px` | Vertical gap from a to b |
238
+ | `a ↔ b: overlap=10px` | Horizontal overlap |
239
+ | `a ↔ b: voverlap=10px` | Vertical overlap |
240
+ | `misalign-bottom=5px` | Not aligned by bottom (5px off) |
241
+
242
+ ### Issues Section (Auto-Detect)
243
+
244
+ If problems are found, an `### Issues` section appears with suggestions:
245
+
246
+ ```
247
+ ### Issues
248
+
249
+ ⚠ a ↔ b: misalign-bottom=5px
250
+ → try align-items: center or baseline on the parent
251
+ ⚠ a ↔ b: overlap=10px
252
+ → elements overlap horizontally. Check width or flex-shrink.
253
+ ```
254
+
255
+ ---
256
+
257
+ ## layoutProbe Options
258
+
259
+ ```js
260
+ layoutProbe({
261
+ selectors: { ... }, // CSS selectors { name: '.class' }
262
+ elements: [...], // DOM elements (from evaluate_script args)
263
+ threshold: 2, // Alignment tolerance in px (default 2)
264
+ relations: true, // Compute relations (default true)
265
+ issues: true // Auto-detect problems (default true)
266
+ })
267
+ ```
268
+
269
+ ### threshold (tolerance)
270
+
271
+ - Difference < threshold → elements considered aligned
272
+ - Difference < threshold+5 → shows `misalign-*`
273
+ - Difference > threshold+5 → relation not shown
274
+
275
+ Increase threshold for approximate alignment checks (e.g., `threshold: 5`).
276
+
277
+ ---
278
+
279
+ ## Common Scenarios
280
+
281
+ ### Check Toolbar Button Alignment
282
+
283
+ ```js
284
+ () => {
285
+ <LAYOUTPROBE_CODE>
286
+ return layoutProbe.row('.toolbar');
287
+ }
288
+ ```
289
+
290
+ Look for `top=` and `bottom=` in Relations — if present, buttons are aligned.
291
+
292
+ ### Check if Button Shifted After Error Message
293
+
294
+ ```js
295
+ () => {
296
+ <LAYOUTPROBE_CODE>
297
+
298
+ const before = layoutProbe.structured({ selectors: { btn: '.submit-btn' } });
299
+
300
+ // ... trigger validation error ...
301
+
302
+ const after = layoutProbe.structured({ selectors: { btn: '.submit-btn' } });
303
+
304
+ return layoutProbe.compare(before, after);
305
+ }
306
+ ```
307
+
308
+ Look for `~ btn.top: X → Y` — if changed, button shifted.
309
+
310
+ ### Check Uniform Gaps in Card List
311
+
312
+ ```js
313
+ () => {
314
+ <LAYOUTPROBE_CODE>
315
+ return layoutProbe.grid('.card-list');
316
+ }
317
+ ```
318
+
319
+ All `gap=` values between adjacent cards should be equal.
320
+
321
+ ### Find Overlapping Elements
322
+
323
+ ```js
324
+ () => {
325
+ <LAYOUTPROBE_CODE>
326
+ return layoutProbe({ selectors: { 'all': '.widget *' } });
327
+ }
328
+ ```
329
+
330
+ Look at Issues for `overlap=` or `voverlap=`.
331
+
332
+ ---
333
+
334
+ ## Troubleshooting
335
+
336
+ | Problem | Solution |
337
+ |---------|----------|
338
+ | Empty Elements table | Check selectors. Run `document.querySelectorAll('.your-selector')` in browser console |
339
+ | No Relations section | Need at least 2 elements. Check `relations: true` |
340
+ | Wrong coordinates | Elements might be hidden (display:none) — coordinates are 0 |
341
+ | `layoutProbe is not defined` | Forgot to paste code from `layoutProbe.mjs` into function body |
342
+ | Too many misalign | Increase `threshold` (e.g., `threshold: 5`) |
343
+
344
+ ---
345
+
346
+ ## Full API Reference
347
+
348
+ ```js
349
+ // Main — returns markdown or TOON string
350
+ layoutProbe(options)
351
+ layoutProbe({ ..., format: 'toon' }) // ~30% fewer tokens
352
+ layoutProbe({ ..., styleAware: true }) // CSS-aware analysis
353
+
354
+ // Structured data (for compare and automation)
355
+ layoutProbe.structured(options) // → { elements, relations, issues }
356
+
357
+ // Before/after diff
358
+ layoutProbe.compare(before, after) // → diff string
359
+
360
+ // Templates (styleAware enabled by default)
361
+ layoutProbe.row('.parent-selector') // Flex row + CSS analysis
362
+ layoutProbe.column('.parent-selector') // Flex column + CSS analysis
363
+ layoutProbe.grid('.parent-selector') // Grid + CSS analysis
364
+ ```
365
+
366
+ ### CSS-Aware Analysis (styleAware)
367
+
368
+ When `styleAware: true` and a `container` is specified, `layoutProbe` reads `getComputedStyle` of the container and compares declared CSS with actual measurements:
369
+
370
+ - **gap mismatch** — CSS says `gap: 8px` but actual gaps are 15px
371
+ - **align-items mismatch** — `align-items: center` but children are not centered
372
+ - **justify-content mismatch** — `space-between` but edges don't touch container edges
373
+ - **gap inconsistency** — uneven spacing between children
374
+ - **grid info** — prints `grid-template-columns` for grid containers
375
+
376
+ ```js
377
+ // Templates enable styleAware automatically
378
+ layoutProbe.row('.form-row')
379
+
380
+ // Or manually
381
+ layoutProbe({ selectors: { ... }, container: '.wrapper', styleAware: true })
382
+
383
+ // Disable for templates
384
+ layoutProbe.row('.form-row', { styleAware: false })
385
+ ```
386
+
387
+ ### TOON Format
388
+
389
+ For token-sensitive contexts, use `format: 'toon'` — outputs in TOON notation (~30% more compact than markdown):
390
+
391
+ ```js
392
+ layoutProbe({ selectors: { btn: '.btn' }, format: 'toon' })
393
+ ```
394
+
395
+ Output:
396
+ ```
397
+ [2]{name,text,top,left,bottom,right,w,h}:
398
+ btn,Click,10,20,50,100,80,40
399
+ input,Search,10,120,50,200,80,40
400
+
401
+ # Relations [3]
402
+ btn ↔ input: bottom=50
403
+ btn ↔ input: top=10
404
+ btn → input: gap=20px
405
+
406
+ # Issues [1]
407
+ ⚠ btn ↔ input: voverlap=40px | → try adding margin or padding
408
+ ```
409
+
410
+ Parsable by `toonq` CLI and `serde_toon` (Rust) / `toons` (Python).
411
+
412
+ ---
413
+
414
+ ## Related Files
415
+
416
+ - `scripts/layoutProbe.mjs` — the script (read before use)