Glasp ToFedwiki Skill

Syncs Glasp highlights into federated wiki pages — one page per source document, highlights as quoted markdown items with notes. Installed at `~/.claude/skills/glasp-to-fedwiki/`. The reading-side sibling of the Claude YoutubeArchive Skill, and part of the Media Plan on media.anarchive.earth.

## When It Triggers

"sync my glasp highlights", "glasp to wiki", "pull my highlights into the wiki", "import glasp", "update the highlight pages", "sync my kindle highlights", or any ask for reading highlights as wiki pages.

## Configuration

The access token lives in `~/.config/glasp/access_token` (never printed, never written into pages). Sync state — the `lastSync` cursor and a Glasp-document-id → page-slug map — lives in `~/.config/glasp/sync-state.json`. Default target is the private `glasp.localhost` wiki; public targets need explicit approval since highlights are personal reading data.

## What It Does

Pipeline: token → cursor → export → pages → state → reindex. - Incremental export from `https://api.glasp.co/v1/highlights/export` with `updatedAfter`, following `nextPageCursor` until done; `/v1/kindle-highlights/export` for the Kindle shelf - One wiki page per source document: opening item with category, author, source and Glasp links, tags and summary; then one blockquote item per highlight with its note, colour and date; video highlights get timestamp links - Re-syncs regenerate the recorded slug; slugs never collide with hand-written pages (unknown existing slugs get a `-glasp` suffix) - Finishes by updating the sync state and reindexing the target wiki

## Gotchas

401 means the token was revoked — fix the file, don't retry. 429 backs off 60s (only plausible on huge first runs). Leading episode numbers in titles ("375. Ken Burns…") are stripped from the title for slug safety but kept in the opening paragraph. The API needs the internet; the private target wiki does not.

# Assets

glasp-tofedwiki-skill

## See