Files
mad-skills/hypertext-links/SKILL.md
T
dckc cf83169064 hypertext-links: link it into context
A page nothing links to is a bug. Link first, page second, as on a
wiki or the NeXT WorldWideWeb browser (citations TODO). Per TimBL's
"Linking to context" in the W3C hypertext style guide.

Generated-by: Claude Opus 5.5
2026-11-21 22:39:14 -06:00

73 lines
3.0 KiB
Markdown

---
name: hypertext-links
description: Writing style for links in markdown docs and chat (Discord supports `[text](<url>)`) — use when writing or reviewing any doc or Discord message with URLs to external pages, repo files, or intra-repo documents; when adding, moving, or deleting a doc (link it into context: from its parent, and back up); enforces descriptive link text over bare/generic links.
---
# Hypertext Links
Markdown link style, from the
[Prism research doc style guide](https://github.com/dckc/prism/blob/master/docs/research/STYLE.md).
## No bare URLs
Every URL is wrapped: `[descriptive text](url)`. A raw URL pasted inline
fails review, even in comments and commit messages.
## Link text carries information scent
Anchor text must be **descriptive**, **frontloaded** (first two words do
the scanning work — users read those first), and **context-free**
(intelligible without the surrounding sentence). Generic labels fail:
"here", "read more", "click here", or a raw filename where a concept was
meant.
- Yes: `[the Passable datatype design](01-passable-datatype.md)`
- No: `[01-passable-datatype.md](01-passable-datatype.md)`
- No: `[read more](...)`
## Citations: metadata outside the link
Date/author/version goes outside the link text; reference lists sort
newest first; the title (in quotes) is the primary link for papers.
```markdown
- [Introducing Prism](https://example.com/prism) — example.com, 2025
- 2019 — Clebsch et al. ["Protocols for Concurrent Reference Counting"](https://doi.org/10.4230/LIPIcs.ECOOP.2019.25). _OOPSLA 2019._
```
## Metadata headers are bullet lists
Not `**Label**: [link](...)` — just bullets:
```markdown
- [Akka Core documentation](https://doc.akka.io/libraries/akka-core/current/)
```
## Link it into context
A page nothing links to is a bug: readers and agents won't find it, and it
rots unnoticed. When you add a document, in the same change:
- **Link to it** from its parent, the page whose subject it belongs to
(a goal tree, an index, a README).
- **Link from it** to that context, near the top: one line saying what it's
part of. Readers arrive by search or a pasted link, not from the start.
- **Make it stand alone**: no "as discussed above" or "next we consider";
link the first use of a project name or acronym to its home page.
The natural order is link first, page second. On a wiki, you add a page by
typing its WikiName where it belongs; that makes a link to a page that
doesn't exist yet, which you then follow and fill out (TODO: citation).
Tim Berners-Lee's original WorldWideWeb browser on NeXT worked the same
way: select some text, then make it a link to a new document (TODO:
citation).
Before deleting or moving a page, find what links to it (`git grep` the
file name), and fix those links in the same change. No links in? That was
the bug.
Source: Tim Berners-Lee, [Linking to context](https://www.w3.org/Provider/Style/IntoContext.html),
in W3C's _Style Guide for online hypertext_: "Watch that your text and
vocabulary stands by itself"; imagine "you yourself may wish to reuse the
document."