avgvstvs96/commonplace/add-source
Claude Code and agent skill by avgvstvs96/commonplace
- community
Checking that the SKILL.md file is still in the repository.
Add a data source to the user's commonplace archive (an app, service, export or local file). Use when the user asks to add, connect, import or sync something like bookmarks, chats, notes, browser history or an export into commonplace.
Install
npx vskill@latest install avgvstvs96/commonplace/add-sourceSKILL.md
Add a source to commonplace
A source is one file, sources/<name>.ts, in the user's commonplace repo (commonplace root), with two halves:
fetchcopies what the service gives into today's snapshot directory.rowsturns one snapshot into things, events and links, reading nothing else. Snapshots are kept forever, so a fixedrowsrebuilds all of history.
Check sources/ first. Mail is built in for any IMAP provider: README.md's Mail section has the app password and config line. X is built in, with no API key. When the user wants it, confirm once, then:
- If
agent-browseris missing:npm i -g agent-browser && agent-browser install. agent-browser --session x --restore --headed open https://x.com/login. The user signs in and closes the window.- Add
x()tosourcesincommonplace.config.tsand runcommonplace sync.
Steps
- Find the data. Ask only what you can't discover. Prefer an official CLI or API the user is signed into, then a file or database the app keeps, then an export they download. No API or export you can automate (Instagram, LinkedIn): see Sites without an API. A one-time export needs no
fetch: copy it intodata/raw/<name>/<YYYY-MM-DD>/. - Write `fetch`. Save the service's output (JSON, JSONL, CSV) into
diras it came; reshaping isrows' job. For a long history, usesince(the last snapshot's date) to take only what's new; overlap is free, as rows with the same ID merge. Throw on failure and the next sync retries; a fetch still running after 30 minutes fails. Keep cursors between runs instate, a private folder that never goes in a snapshot. Snapshots come daily;every: 7takes one a week,every: 0.125every 3 hours. - Write `rows`, reading only its snapshot (no clock, no network), with the readers in
src/source.tsand the builders insrc/schema.ts.
- IDs come from content, so every source names a thing the same way:
urlRef()for any link,gh:repo:owner/name,<service>:<kind>:<native id>. Never a row number or a random ID. A repeatable event with no ID of its own getskey: digest(...its fields). - Verbs say what the user did, not what the app calls it, from
src/schema.ts. Add one only when none fits. - Times are real or null:
iso()the source's own timestamp, never the fetch time or a guess. - An event's thing must come from some source, or the event is dropped. A link may point at a thing no source defines.
- Folder, list and tag names go in the event's
collections. - A local file that changes when there's something new (an app's database) goes in
watch; then reruncommonplace install.
- Register it: add it to
sourcesincommonplace.config.ts, where earlier sources win a field when two disagree. Every agent can read what's archived, so ask first for messages, mail, health and the like, and suggestredactrules for anything they'd keep out. - Run it:
commonplace sync, and read the report; a failed snapshot names its file and row. Spot-check withcommonplace searchandcommonplace show <id>, then runbun run check.
Sites without an API
Read them the way their own web app does, from the user's signed-in agent-browser session on their machine. Copy sources/x.ts:
- Sign in once, after asking:
agent-browser --session <site> --restore --headed open <login page>. When the session expires,fetchthrows with that command. - Call the app's JSON endpoints from inside the page (
agent-browser --session <site> --restore eval), so its cookies go along. Save each response as it came, one per line. - Read operation IDs, flags and tokens from the app's current bundles every run.
- Stop paging at an ID the last run kept in
state. - Wait out rate limits, and drop "Headless" from the user agent.
Example
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/add-source/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/avgvstvs96/commonplace/add-source)