explainer-skill
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Gecti
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
An agent skill that answers with a page: the finding as its headline, a figure you can move, a question you answer on it. One HTML file that opens offline.
Explainer
An agent skill that answers with a page: the finding up front, a figure you can move, and a question you answer on it. One HTML file that opens offline.
npx skills add barisgit/explainer-skill --global --agent claude-code --agent codex -y
Then ask your agent to show you: “explain this pull request as a page”. More ways to install.
Twelve questions, each answered with a page. The gallery shows them with their first figures; sources are in examples/, each with the prompt it answers in prompt.md.
How it works: how a B-tree index finds a row |
Data report: negative electricity prices in Germany, from Energy-Charts data |
Drill-down over records: what one npm install puts on disk
|
System tour: how Litestream works, part by part |
Team decision: the database for a multi-tenant SaaS |
Purchase decision: home battery payback by size |
Engineering page: I²C pull-ups, with the schematic |
Study page: the Gibbs overshoot |
Code review: the change that ships ECharts compressed |
Data set by place: world electricity, 223 places from Our World in Data |
Algorithm: Dijkstra with a negative edge |
Simulation: reflections on a transmission line |
What the reader gets
A control where it answers a question. A slider, switch or toggles over a figure, which moves from the state it is in.
Marks that are the control. A choice can be the plot's own columns: pick one and the key reads its values.
Text, drawing and code that point at each other. A numbered part lights up in the prose, the diagram and the diff together.
A simulation that runs. Your own step and draw functions on a canvas in the page's colours, with Play, speeds and parameters.
Also on a page: drill-down views with breadcrumbs, one collection of records as a tree, sortable table or board, step-through figures, questions checked on the spot or sent back as one Markdown reply with the reader's notes, and answers that survive a reload. Light and dark, desktop and phone, and print.
How it works
The agent reads SKILL.md and drives a small CLI, run as bun <skill directory>/cli.ts:
- Write
page.mdx: Markdown prose, the kit's components and the.tsor.jsondata it imports.kitlists what is available andkit <name>documents one;guide.mdrecords what made earlier pages better or worse for their readers. - Pack:
pack page.mdx -o out.htmlrenders the page to static HTML, draws charts, diagrams, circuits, formulas and code colours into it, and inlines the fonts, local images and only the kit scripts the page uses, so the result is one offline file. - Check:
check out.htmlopens it in headless Chrome in light and dark at 1440 and 390 px wide, scrolls it and tries its kit controls from fresh states, reports errors, network use, dead links, clipping and overflow. Add--shotsfor screenshots, or--do shot:<css>for one element.--doruns the clicks, drags, hovers, keys and field values you name instead, and--do replyprints the reply the page would send.
A diagram whose parts light up from the text, for illustration:
```mermaid
flowchart TD
req["Request"] --> cache["Cache"] --> db["Database"]
```
1. <span data-ref="req">A request</span> arrives.
2. <span data-ref="cache">The cache</span> misses.
3. <span data-ref="db">The database</span> answers.
What a page can use
| Write | Get |
|---|---|
Plot |
Line, stem and bar plots as SVG with no chart library: names and values on the marks, one accent with hollow and hatch states, labelled reference markers, filled and annotated areas |
Chart |
ECharts in the page theme: treemap, sankey, heatmap, zoom, click-to-drill; about 0.4 MB compressed, only on pages that use it |
Explore, Controls |
A slider, choice or toggle over a plot, chart, readout or the page's own parts; axis: true makes a choice the plot's columns; one set of controls can drive figures in several sections |
Stepper |
Back, Next, a count and arrow keys over HTML, hand-built SVG or Mermaid parts; scrubber from five steps by default; opt-in Play |
View |
Drill-down views inside the one file, with Back, breadcrumbs, previous and next, and a contents rail |
Records |
One collection as a grouped tree, sortable table or board, with search, facets, subtotals and an answer per row |
Question |
Choices, the rows of a comparison table, a self-check or a written answer, with a recommendation and a note; answers join the reply |
Table |
A fixed comparison computed from data; a Markdown table gets the same look |
```mermaid |
Flowchart, state, sequence, class, ER and xychart drawn at pack time, with number tags the text can point at |
```schematic |
A circuit from a netlist: the wiring stated is the wiring drawn |
```ts, ```diff-ts … |
Code coloured at pack time, with marks that link to the prose |
$…$ |
TeX drawn as MathML, no script |
data-ref |
Prose, table rows, diagram parts and marked code that share a name light up together; .beside keeps a figure in view while its text scrolls |
| Frontmatter | contents: true for a contents rail, display: condensed for poster headings, reply: true for notes, lang and labels for a page in another language |
Pages follow the system's light or dark setting. A .tsx component whose first line is "use client" covers behaviour no component does. The skill ships two examples: a decision page, skills/explainer/example/, and a system tour, skills/explainer/example/tour/.
Install
Both installers copy skills/explainer/ as it is.
npx skills (vercel-labs/skills)
npx skills add barisgit/explainer-skill --global --agent claude-code --agent codex -y
Several agents share one copy in ~/.agents/skills/explainer and the others get symlinks; add --copy to give each agent its own copy. Without --global the skill goes into the current project. A local checkout works too: pass its path instead of barisgit/explainer-skill.
caplet add github:barisgit/explainer-skill --pin v0.21.0 --scope user
Caplet needs a ref for GitHub sources. main follows the latest commit on each caplet update; pin a tag such as v0.15.0 instead to hold a version.
Caplet copies the skill into ~/.agents/skills/explainer, gives it to Claude Code as a plugin, and records the source in ~/.agents/capabilities.yml. For one project, run caplet init in it, then caplet add <source> --scope project. A local checkout works too: caplet add <path> --scope user.
Use one installer per machine: both write ~/.agents/skills/explainer, and Caplet does not warn when another source already emits a skill of the same name. bun ~/.agents/skills/explainer/cli.ts kit checks an installed copy.
Requirements: Bun (verified with 1.4.3), and Google Chrome or Chromium for check (CHROME=/path/to/chrome if it is not found; a build downloaded by agent-browser or Playwright also works). Nothing else is installed: the skill runs as copied.
npx skills update explainer --global # GitHub source
npx skills add <path> --global --agent claude-code --agent codex -y # local checkout: add again
caplet update explainer --scope user # re-reads the source and applies
npx skills remove explainer --global -y
caplet remove explainer --scope user && caplet apply --scope user
npx skills update cannot check a local path, and plain caplet apply reuses the snapshot of a local source, so use the commands above after changing a checkout.
Development
bun install # dev tools and the git hook
bun run ci # typecheck, lint (Biome), tests; what GitHub Actions runs
bun run media # regenerates the README media from examples/ (Chrome, ffmpeg with libwebp_anim)
bun run verify:install # before a release: installs with both installers into a temp HOME (network, Chrome)
bun run media needs all twelve packed examples/<name>/index.html pages, Chrome or Chromium (CHROME=/path overrides discovery), and ffmpeg on PATH with both libwebp and libwebp_anim encoders (ffmpeg -encoders | grep webp). Keep the machine awake while recording. --keep retains the captured frames for inspection; example names limit the run, such as bun run media --keep hero.
Layout, decisions and limits are in AGENTS.md. The examples are published from examples/ by .github/workflows/pages.yml.
Credits
- visual-explainer by Nico Bailon (MIT): the look and the reply flow.
- Apache ECharts (Apache-2.0), bundled in the kit.
- pele by kepano (MIT): the Mermaid renderer
packuses, not shipped in pages. - Preact and preact-render-to-string (MIT): the components and their hydration; MDX (MIT) with its unified, remark and micromark packages (MIT, one ISC), used by
pack, not shipped in pages. - Temml by Ron Kok (MIT) with remark-math, micromark-extension-math and mdast-util-math (MIT): TeX to MathML in
pack;temml.woff2is from the KaTeX fonts (MIT, Khan Academy). - TanStack Table by Tanner Linsley (MIT), with TanStack Store (MIT): the sorting, filtering, grouping and facets of
Records. - refractor by Titus Wormer with Prism's grammars by Lea Verou and others (MIT), and the hast packages it uses (MIT): code fence colours in
pack, not shipped in pages. - Geist and Geist Mono by Vercel and Barlow Condensed by The Barlow Project Authors (SIL OFL 1.1).
Licence texts are in skills/explainer/kit/licenses/. The examples cite their own sources; the electricity data is from Our World in Data and Energy-Charts (Fraunhofer ISE, CC BY 4.0).
Licence
MIT, see LICENSE. A copy sits in skills/explainer/ so installed copies carry it.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi