Dg random note
A menagerie of Agent Skills for AI coding agents
npx -y skills add palol/skills-zoo --skill dg-random-noteAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 27 days oldThe repository was created 27 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Add a '/random' route to an Obsidian Digital Garden (oleeskild digital-garden plugin + Eleventy) site that redirects visitors to a randomly chosen published note. Use when a user wants a 'surprise me' / random-note / shuffle link for their digital garden, or a destination for a random button. Installs one self-contained page (src/site/~random.njk) - no build scripts, no core edits, upstream-safe. Trigger on: add a random link, random note route, /random page, surprise me link, shuffle to a random note, random page redirect for my digital garden.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
4.8 KB, as published. Nobody here has run it
Digital Garden - Random Note Route
Adds a /random route to an Obsidian Digital Garden
(Eleventy) site. Visiting /random/ redirects the visitor to a randomly chosen published note.
The whole feature is one file - src/site/~random.njk. It builds an inline list of published
note URLs at build time, then a tiny script picks one and redirects. No build scripts, no
dependencies, no plugin-core edits.
When to Use This Skill
Use when a Digital Garden user wants a "surprise me" / shuffle / random-note link - e.g. "add a random button destination", "give me a /random page", "let visitors jump to a random note".
This skill installs the destination route only. If the user also wants a floating shuffle
button, that lives in the dg-floating-tray skill (its "random" action links to /random).
This route is what that button points at.
Do not use to install other DG features, or on non-DG stacks (Quartz, Astro, plain Eleventy) -
the collections.note collection and dg-publish flag are DG-specific.
DG invariants respected
- User-owned path.
src/site/~random.njkis a new file the plugin never ships, so upstreamgit pullnever clobbers it. The~prefix avoids clashing with a potentialrandom.mdnote. It's a root page (not acomponents/user/slot) because a route needs its own permalink - seereferences/architecture.mdfor why that's still upstream-safe. - No autoloading needed. A page route is not a slot component, so there's no
dynamics.jsglob or filename-prefix ordering to worry about. - Theme via tokens. The redirect page reuses the site's own
pageheader.njkand theme body classes, so it inherits light/dark automatically. No hardcoded color. - Accessibility / graceful degradation.
<noscript>path plus a visible "Go home" link, andmeta robots noindexso the transient redirect page isn't indexed. - One config knob.
FALLBACK_URL(inline, top of the<script>) - where to send visitors if no published notes exist. Nothing else to tune.
Prerequisites (verify first)
- An Obsidian Digital Garden (oleeskild plugin + Eleventy) repo with a working
collections.notecollection and the standardcomponents/pageheader.njkinclude. - Notes use the
dg-publishfrontmatter flag (the DG default). The random pool = published notes.
Instructions
- Confirm prerequisites (above). Abort with a plain explanation if the target isn't a DG repo.
- Copy the route file into the site root:
assets/~random.njk → src/site/~random.njk - (Optional) Set the fallback. Edit
FALLBACK_URLat the top of the<script>if/isn't the desired empty-pool destination. - (Optional) Pool tuning. By default the pool excludes notes flagged
dg-hide. If the user wants every published note eligible, removeand not note.data['dg-hide']from the{% if %}. If they want to exclude more (e.g. a/logs/prefix), extend that condition. - Build and verify with
references/verify.md. - Wire an entry point (only if asked): a nav link or
<a href="/random">Surprise me</a>. Ifdg-floating-trayis installed, its shuffle button already targets/random- no change needed.
Reference Files
references/architecture.md- how the build-time loop + runtime pick work, and why a root page is upstream-safe.references/verify.md- post-build QA checklist (route, pool correctness, back-button, fallback).
Assets
assets/~random.njk- the single self-contained route (build-time list + runtime redirect).
Risk Level
L1 (low). Adds a single new page file (src/site/~random.njk). No build scripts, no secrets,
no network calls, no core/layout edits. Fully reversible: delete the one file.
Validate & Package
npx skills-ref validate skills/dg-random-note/
zip -rq dg-random-note.zip dg-random-note