research-hq
Skill4 starsChanged 56 days agoMITView on GitHub
Index and publish everything you've researched and written — one searchable local index over all your research reports and generated pages, plus optional one-command hosting of the subset you mark shareable, at deterministic URLs. Use when the user says "index my research", "where did that report go", "I can't find the page I made", "build my research index", "publish this report", "host my research", "make an index of my documents", or asks for a browsable directory of past work. ALSO use proactively — without being asked — after writing a research report or an HTML page to HQ, since the index is stale until it is rebuilt, and whenever a report needs a shareable URL (this is the publisher; never deploy HQ content per-directory).
- Installs packages
In this repository5 other files it gives its agents.
- tb-voice/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- tb-voice/CLAUDE.mdCLAUDE.md
- hubSkill
- share-as-pageSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 137
A static host: only if you deploy. Vercel CLI for the default provider.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
research-hq
Your research and pages accumulate across sessions, directories, and tools. This turns them into one searchable index — and publishes the subset you choose to share.
Everything is one deterministic script, no model involvement:
hq-publish # build the index
hq-publish --deploy # + push hosted items
hq-publish --init # write a starter configRe-run it any time; it is idempotent. Run it after any session that writes a report or a page — the index is a build artifact, not a live view.
What it does
- Normalizes the HQ root to
<date-slug>/report.md, leaving symlinks at legacy flat paths so old references keep resolving. - Renders
report.htmlfor any report lacking one (pandoc, editorial house style). It only ever regenerates its own output — a marker at byte 0 identifies it, so a hand-authored or brand-designed page is never overwritten. - Collects declared metadata, falling back to inference only where nothing is declared.
- Emits
catalog.json+index.html— search, group by brand/month/type, deep-link filters via#q=. --deploy: copies items markedvisibility: hostedinto one static site and pushes it. URLs are deterministic —<base>/<date-slug>/— so nothing needs to be written back.
The metadata contract
Producers declare; the index does not guess. Parse order, weakest to strongest:
keyword inference → markdown frontmatter → <meta name="intranet:*"> → meta.json
In a report's frontmatter:
---
question: <the question this answers, verbatim — the retrieval key>
brand: <who it's for/about>
type: research
status: draft | final | superseded
visibility: local | hosted
tags: two, to, four, words
---In a generated page's <head> (same fields, intranet: namespace):
<meta name="intranet:brand" content="Acme">
<meta name="intranet:type" content="research">
<meta name="intranet:question" content="what this page answers">
<meta name="intranet:status" content="final">
<meta name="intranet:visibility" content="local">question and tags are what make the index searchable months later — work hides behind
codenames and clever titles, and those two fields are how it stays findable. status and
supersedes are what make it triageable: drafts and superseded passes render dimmed
instead of competing with current work.
A per-directory meta.json overrides everything, which is the escape hatch for legacy
items nobody will hand-annotate.
Configuration
Machine-specific settings live in a config file; the script itself never changes.
Resolution: --config PATH → $HQ_CONFIG → ~/.claude/hq.json → built-in defaults.
With no config at all it still works, indexing ~/Documents/deep-research into
~/research-hq.
{
"hq_root": "~/Documents/deep-research", // where reports live
"out_dir": "~/research-hq", // where the index is generated
"title": "Research HQ",
"host": {
"provider": "vercel", // vercel | command | none
"base_url": null, // stable alias; learned on first deploy
"deploy_cmd": null, // provider=command: any static-host command
"robots": "disallow" // link-shareable, not search-indexed
},
"scan": { // optional: index pages living outside HQ
"page_roots": ["~/Projects"],
"extra_page_dirs": [], "exclude_dirs": [], "extra_html_globs": [],
"episode_roots": [] // trees whose docs live per-item
},
"brand_rules": [["acme", "Acme"]] // keyword → label, first match wins
}Hosting on something other than Vercel — set provider: "command" and give any
command that publishes the current directory:
"host": { "provider": "command",
"deploy_cmd": "surge . my-research.surge.sh",
"base_url": "https://my-research.surge.sh" }Works with surge, netlify, rsync to a VPS, aws s3 sync, GitHub Pages — anything that
takes a directory. The publish mechanism is identical everywhere; only the target differs.
Rules
- Local by default. Nothing is hosted unless an item declares
visibility: hosted. The hosted index lists hosted items only, so private titles never reach a public surface. - Never deploy HQ content per-directory. One site, one project, deterministic URLs — otherwise you get a sprawl of one-off hosting projects and hit account limits.
- Never hand-edit
index.htmlorcatalog.jsoninout_dir— they are regenerated on every run. Changetemplate.htmlin this skill, or the config. - Hosted means world-readable.
robots.txtdiscourages crawlers and nothing is linked publicly, but a URL holder can read it and caches outlive deletions. Keep anything sensitivelocal.
Dependencies
- pandoc for markdown→HTML rendering (
brew install pandoc). Missing pandoc degrades gracefully: indexing still works, rendering is skipped with a note. - A static host only if you deploy. Vercel CLI for the default provider; anything at
all with
provider: "command". - Python 3.9+, standard library only.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

