← Commit history
README.mdadded+73@@ -0,0 +1,73 @@+# wiki-light-mode++Screenshot any Adom Wiki page in **light mode** and show it to the human via+[adom-shotlog](https://wiki.adom.inc/adom/adom-shotlog).++The wiki is dark-only by design — `color-scheme: dark`, no theme toggle, no+light palette anywhere. Sometimes you still want a light rendering: for a doc,+a slide, print, or just preference. This skill synthesizes one that reads like+a real light theme.++```bash+adom-wiki pkg install adom/wiki-light-mode+wiki-light-shot adom/core+```++The same page, as the wiki serves it and as this tool captures it:++++++## What one command does++1. **Logs in as you.** Mints a single-use `adom-wiki auth login` magic link+ (60s expiry, one per attempt) and opens it in a headless Chrome inside the+ container — so **private pages work**. No stored browser profile, no+ long-lived cookie.+2. **Renders the page** at 1920x1200 (configurable), waits for the app to+ settle.+3. **Applies the light overlay**: `invert(1) hue-rotate(180deg)` on the page,+ re-inverted on raster media so heroes and screenshots keep their true+ colors.+4. **Proves it worked**: decodes the PNG and computes mean luminance. A light+ capture scores ~195/255; if the page still reads dark (markup drift), you+ get a loud WARN instead of a silently-wrong image.+5. **Saves two shots** — top of page and full page (height-capped, default+ 8000px) — and **injects them into adom-shotlog**, where the broker surfaces+ the channel to the human and reports whether a viewer is actually on-screen.++## Hardening++- **Session containment**: refuses any target host except `wiki.adom.inc`, and+ blocks non-wiki subresource requests at the network layer. The logged-in+ session cannot be carried to another site.+- **Self-healing deps**: `puppeteer-core` auto-installs into the skill package+ on first run (`--no-save` — the wiki `package.json` dependencies field, which+ holds wiki refs, is never touched).+- **Chrome discovery**: puppeteer cache (newest version first), then system+ binaries, then a `WIKI_LIGHT_CHROME` override.+- **Retries**: fresh login link per attempt; one navigation retry; hard+ timeouts on every subprocess and navigation; browser cleanup on any exit.+- **Honest failures**: every error is an `ERROR:` plus a `Hint:` naming the+ next command to run. `--json` gives a `{ status, data, hints[] }` envelope.++## Flags++| Flag | Meaning |+|---|---|+| `--out DIR` | output directory (default `./wiki-light-shots`) |+| `--channel NAME` | shotlog channel (default: page slug) |+| `--no-inject` | save PNGs only |+| `--no-auth` | anonymous (public pages only) |+| `--keep-dark` | capture as-is, no overlay |+| `--viewport WxH` | default `1920x1200` |+| `--full-max PX` | full-page height cap (default 8000) |+| `--json` | machine-readable envelope |++## Requirements++Node 18+, a Chrome/Chromium on the machine (any puppeteer-cache or system+install; the tool finds it), and the `adom-wiki` CLI for auth. `adom-shotlog`+is optional but strongly recommended — without it the shots only land on disk,+where a human in a text thread will never see them.
page.jsonadded+62@@ -0,0 +1,62 @@+{+ "slug": "wiki-light-mode",+ "title": "Wiki Light Mode",+ "type": "skill",+ "version": "1.0.0",+ "description": "Screenshot any Adom Wiki page in synthesized light mode and show it to the human via adom-shotlog. Logs a headless Chrome in as the user (single-use magic link, private pages included), applies an invert overlay that keeps images true-color, pixel-verifies the shot is really light, and injects top + full-page captures into shotlog.",+ "license": "MIT",+ "tags": [+ "skill",+ "wiki",+ "screenshot",+ "light-mode",+ "shotlog",+ "headless-chrome"+ ],+ "dependencies": {},+ "discovery_triggers": [+ "wiki light mode",+ "show me the wiki page in light mode",+ "light version of a wiki page",+ "screenshot a wiki page",+ "grab a wiki page and show it to me",+ "wiki page in shotlog"+ ],+ "discovery_pitch": "Capture any wiki.adom.inc page (private included) as a verified light-mode screenshot and surface it to the human through adom-shotlog.",+ "sample_prompts": [+ {+ "label": "Light mode",+ "prompt": "grab wiki.adom.inc/adom/puma-bridge and show it to me in shotlog as light mode"+ },+ {+ "label": "Compare",+ "prompt": "capture the adom/core wiki page in both light and dark and put them in shotlog"+ },+ {+ "label": "Just the file",+ "prompt": "save a light-mode screenshot of the adom-shotlog wiki page to disk"+ }+ ],+ "files": [+ "SKILL.md",+ "README.md",+ "package.json",+ "install.sh",+ "uninstall.sh",+ "bin/**",+ "docs/**"+ ],+ "scripts": {+ "install": "./install.sh",+ "uninstall": "./uninstall.sh"+ },+ "hero": {+ "type": "image",+ "path": "docs/hero.png"+ },+ "org": "adom",+ "author": {+ "name": "Drew Owens",+ "email": "[email protected]"+ }+}