Custom Source Scripts
Kitpicks lets you add a custom source by providing an ingestion binary — a small executable that generates Markdown. The binary is registered with the reservoir and run periodically so its output appears in your feed alongside regular RSS sources.
Two modes
Each custom source runs in one of two modes, chosen when you add it.
- Sandboxed (default): a JavaScript module runs in an isolated worker. It can only reach the websites and folders you approve, and it never sees your secrets. Kitpicks shows what the script asks for before you approve it, and lists anything it was refused so you can add a rule.
- Unsafe: any executable, with full access to your machine. You must confirm it, the source shows a red Unsafe badge, and Kitpicks never chooses it for you.
Security warning for unsafe mode
An unsafe binary is run periodically and autonomously with access to your machine. Only choose unsafe mode for binaries you trust. Do not install binaries from untrusted sources.
How it works
In the Add Source screen, switch to the
Custom script tab, drop your script, and choose a
mode. Kitpicks registers it with the reservoir, creates a source
for it, and the reservoir runs it on its fetch schedule. Every
Markdown file the script produces becomes a content item: a
sandboxed script writes them with writeItem, an unsafe
binary writes them to its outs/ directory.
The source name and favicon URL can be set in the Add Source form. They can also be changed later from Edit Source.
If the script's name collides with an existing custom source, the Add Source screen flags the conflict and links you to edit the existing source instead of creating a duplicate.
Generate with AI
In the Custom script tab, choose Generate with AI. Configure OpenCode with a Pay-as-you-go or Go plan, an OpenCode Console API key, and a model. Then describe the source in broad terms — for example, “fetch the Hacker News front page.” Kitpicks handles the Markdown files, frontmatter, and output folder.
Kitpicks generates a Node.js script, runs it once in a temporary folder, and shows a sample of the Markdown content it fetched. Edit the prompt and regenerate until the sample looks right, then review the code, acknowledge that it will run periodically and autonomously, and install it directly as a custom source.
The assistant also tries to suggest a source title and favicon. Kitpicks fills them into the draft; review or override them before saving.
The preview is not sandboxed yet and runs with your machine permissions. Static code auditing is not included in this version. Only generate scripts from sources and prompts you trust.
Updating a script
To update an existing custom source's binary, open its Edit Source screen and re-drop the new executable. The updated binary replaces the script in place, so the source keeps its name and continues to be fetched on the same schedule.
The executable contract (unsafe mode)
- The binary must be executable (the executable bit is set).
-
It is launched from a fresh temporary directory containing an
outs/folder. -
The
RES_CHANNEL_IDenvironment variable is set to the channel id. -
Extra fetch parameters are passed as
key=valueCLI arguments. -
Write one
.mdfile per item intoouts/. Optional supplementary files go in a same-named subdirectory.
Frontmatter requirements
Each Markdown file's frontmatter should include a
pubDate so the item becomes a Kitpicks entry. A
url is optional — when omitted, the entry links to
the item's own Markdown file (as a file:// link).
The title frontmatter property (or the first
# Heading in the body) is used as the entry title.
Sandboxed script permissions
A sandboxed script may export a permissions object
listing the network rules, readable paths and secret headers it needs.
It grants nothing by itself: you review it when you add the source,
and you can edit it later from the source's Edit Source
screen. When you update a script, only the new access it asks for is
shown for approval. Scripts are limited to 120 seconds per run. See
skills.md for the full script API.
Example (unsafe mode)
A minimal Node script that writes one Markdown file to
outs/:
#!/usr/bin/env node
import { writeFileSync, mkdirSync } from "node:fs";
import { join } from "node:path";
mkdirSync("outs", { recursive: true });
const item = `---
url: https://example.com/weather/2026-09-02
pubDate: 2026-09-02T12:00:00Z
title: Today's Weather
---
Sunny with a high of 72°F.
`;
writeFileSync(join("outs", "weather.md"), item);
See the working example at
res/examples/weather-fetcher.mjs
in the repository.
Agents authoring ingestion binaries can also fetch the guide at skills.md.