Bean
Search the user's connected knowledge base — git commit history, Slack, Google Drive, GitHub, Confluence, Jira, Zendesk, Salesforce, HubSpot, Microsoft 365, Discord, and local files (including PDFs) — with local hybrid (semantic + keyword) retrieval. Use when the user asks a question that their work docs/messages/commits would answer, wants to connect or sync a source, or types /bean. Also for "what's in my docs about X", "what did we decide in #channel", "when/why did we change Y", or reconstructing context across their tools.From its SKILL.md
npx -y skills add henneberger/bean --skill beanAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
13.5 KB, as published. Nobody here has run it
bean — local knowledge retrieval
You are driving bean, a local hybrid search index over the current repo's git commit history
and the user's Slack, Google Drive, GitHub, Confluence, Jira and other connected sources (11
connectors) plus local files. It runs entirely on this machine (their credentials, DuckDB + Lance
under ~/.bean/<repo>-<hash>/); a repo may also carry a committed .bean/ folder with the team's
shared sources — and, under the git storage backend, the index itself. You run every bean command yourself via Bash — as:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/bean.py <subcommand> …
(the wrapper builds the plugin's virtualenv on first use — slower once, instant after.)
Setup is assistant-guided; the user never has to run anything. By default, ask the user only
for the token string and set the source up yourself. Two exceptions: interactive sign-ins (Google
via gcloud, Microsoft device-code) open a browser/prompt the user completes; and a privacy-minded
user may prefer their token never reach you — in that case hand them the exact bean auth …
command (or the credential-file path) to run themselves, and continue once they say it's done.
Route on what the user typed after /bean (or, if the skill auto-triggered on a question,
treat their message as the question). Empty or a plain question → the retrieval flow below.
A question — retrieve intelligently, then answer
bean gives you a toolbox of retrieval commands. Don't just run one search — decide what
context the question needs, then compose calls. Every command prints human-readable text — read its
output. All accept --source <connector> to scope by connector — one of git, slack, gdocs,
github, confluence, jira, zendesk, salesforce, hubspot, microsoft, discord,
localfiles. git is the repo's commit history (no auth, indexed by default) — search --source git, recent --source git --author ada, and --since answer "when/why did we change X".
Previews are truncated by default (5 lines × ~110 chars per hit) so a list stays scannable —
don't conclude from a preview alone. search/recent/related take --full [N] to print
whole bodies: bare --full caps at 4000 chars/hit, --full 8000 sets your own cap, --full 0 is
uncapped. thread/doc/neighbors already print full bodies (they're whole-document commands);
pass --full N there to cap them. Reach for --full the moment a preview looks cut off — it's
faster than the sql/substr workaround.
search "<q>"— hybrid semantic + keyword (the default), fused with weighted RRF. Keyword fusion means exact tokens (identifiers, error strings, ticket numbers,#channels) are found even when not semantically close. Flags:--variant "<q2>"(repeatable) — fuse extra query variants with the main one. This is your lever: pass a paraphrase and the raw identifiers you spotted (e.g. main"how billing works"plus--variant "ZQ-9001"); each variant adds a ranking, weighted-RRF merges them. You are the query-expansion step — bean doesn't call an LLM for it, you do.--author <substr>--since YYYY-MM-DD--before YYYY-MM-DD— narrow by who/when.--doc <substr>(id/title contains),--expand N(neighbouring chunks per hit),--k N.
recent [--source S] [--doc <substr>] [--author <substr>] [--since …] [--before …]— most recently changed docs/messages. For "lately", "this week", "what did Ada change".--docmatches the substring against title and id, sorecent --author eric --doc "<doc title>"answers "show me eric's most recent comment on my doc" (Google Drive indexes each comment as its own author-attributed, timestamped entry).related <ref>— documents one hop away in the graph: same repo/project/channel or same author, and directly linked docs. Each hit says why (reason). Use to widen from one doc to its neighbourhood ("what else touches this ticket's project?").thread <ref>/doc <ref>— a whole Slack thread / document as one block (full body by default), matched by id or title substring. Use when a snippet isn't enough.neighbors <chunk-id>— the chunks surrounding a specific hit (each hit has anid).sql "<SELECT …>"— drop to read-only SQL (SELECT/WITH only) over the workspace's DuckDB: tablesdocuments,edges,state, and the Lance_chunksdataset. Use it for structured questions retrieval can't phrase — counts by author, comments by a person, dates.bean.py sqlwith no query prints the schema.--globaltargets the shared cross-repo store. E.g. eric's recent comments →bean.py sql "SELECT title, modified_at FROM documents WHERE doc_id LIKE '%#comment:%' AND author ILIKE '%eric%' ORDER BY modified_at DESC LIMIT 5".
Ranking is config-driven (config set search.*): recency_decay (time-bias toward newer docs),
merge_sections (coalesce adjacent chunks; on by default), auto_weight (identifier queries lean
keyword, questions lean vector), and an optional local rerank.enabled cross-encoder. Index-shape
knobs chunking.title_prefix / chunking.large_chunks and enabling the reranker take effect after
a bean sync --rebuild.
Worked example — "I had a convo in the product channel, what's the impact on my docs?"
- Pull the conversation:
bean.py recent --source slack --doc product - Read it; extract the concrete topics/decisions/identifiers.
- Find affected docs:
bean.py search "<topics>" --source gdocs --expand 1 - If a hit looks central, pull the whole thing (
doc <title>), then answer, citing each source by title and URL. If nothing relevant comes back, say so rather than inventing; if the index is empty, point the user at/bean init.
init
Setup is a conversation; the CLI never prompts. Run bean.py init for a detailed human listing —
one entry per source with its connection status, scope, credential file path + fields, config file
path + the config list names that hold tracked refs (e.g. slack.[channels], github.[repos]),
whether it indexes-everything-when-connected, and (for Slack/Discord/Google Drive) the first-sync
lookback. bean ships 11 core connectors — Git history (the current repo, no auth, on by
default), Slack, Google Drive, GitHub, Confluence, Jira, Zendesk, Salesforce, HubSpot,
Microsoft 365, Discord — plus local files, always on. Read bean.py init's output and act on it;
don't memorize the list.
Each connector has a guided /connect-<name> setup skill (connect-slack, connect-github,
…) that walks scope (global/local) and every auth option for that source. When setting a source up,
invoke the matching one rather than improvising the steps.
Need a source that isn't core? Author a connector — copy
${CLAUDE_PLUGIN_ROOT}/docs/connector-template.py (or a bundled connector in bean/connectors/)
into an offline-tested plugin under ~/.bean/plugins/. bean.py plugins list shows what's loaded.
Scope — ask this for every connector you set up. A connector is either global (indexed once,
searchable from every repo — e.g. Slack, your personal Google Drive, Gmail) or local (scoped to
the repo you're in — e.g. a GitHub project, this repo's files). Global connectors live in a shared
~/.bean/_global index; local ones in the per-repo workspace; search unions both. When connecting a
source, ask the user "global (all repos) or local (just this repo)?" and set it with
bean.py scope <source> global|local. Each source's scope + config path is in bean.py init's
output. Changing scope purges the old index — tell the user to sync afterward.
Walk the user through what's missing, one source at a time. For each, get the token (ask where to
create it — the error message from a failed auth names the exact page), then set it up one of
three ways, matching the user's comfort:
- You run it —
bean.py auth <provider> <fields>(the failedautherror names the fields). Simplest; the token passes through you. - The user runs it (privacy) — hand them the same
bean.py auth …line to run themselves so the token never reaches you; continue once they confirm. - Write files directly — write the credential JSON to the credential file path shown by
bean.py init(keys mirror the listed fields, e.g.{"token": "…"}, or{"method":"cloud","url":…,"email":…,"token":…}for Atlassian Cloud) and append tracked refs into that source's config file under the config list namesbean.py initprints (e.g.slack.[channels]). Writing refs into those config lists is the only way to track refs.
Notes: interactive sources (Google, Microsoft) open a browser/device prompt instead of taking a
token. Whole-collection sources (Slack, Zendesk, Salesforce…) index everything once connected;
tracked lists only narrow scope — bean.py init flags which sources index-everything-when-
connected. Then finish with bean.py sync and a test search.
Lookback — ask when a source has one. Sources with a first-sync lookback line in bean.py init
(Slack, Discord, Google Drive) reach back a bounded window on the first sync, then track a cursor
and only re-scan changes after that. When setting one up, ask the user how many days of history to
index on the first sync (0 = all) and, if they give a non-default number, set it with
bean.py config set <source>.lookback_days <days> (e.g. config set slack.lookback_days 30) before
the first sync. It only bounds the initial backfill; later syncs are incremental regardless.
sync
bean.py sync [source] [--rebuild] [--since N] — fetches changes and re-embeds only what
changed. --rebuild ignores cursors and re-fetches back --since, re-embedding every doc — run
it to apply a chunking or embedding-model change to already-indexed docs. Sync is resumable: the
embed phase checkpoints per document, so an interrupted run picks up where it left off.
Never run sync on your own. It is the one command you do not run unprompted — it hits the
user's live services and can take minutes. Run it only when the user explicitly asks. When a
read command prints ⚠ bean: last synced N days ago … (or status reports "stale": true),
tell the user their index looks stale and suggest they run /bean sync — then wait for them to
ask. Still answer their question from the current index; just flag that it may be behind.
status / config
bean.py status— connections, tracked sources, index counts, embedding model (warns if the index was built with a different model than configured).bean.py config list— resolved settings.config get <path>/config set <path> <value>forembedding.plugin,chunking.lines,search.hybrid,ocr.backend, etc. Chunking is per-source: a globalchunkingblock plus optional<source>.chunkingoverrides merged on top (Slack ships smaller defaults for short chat) — set one with e.g.bean.py config set slack.chunking.lines 15. Changing the embedding model or chunking prints a reminder to runbean sync --rebuild.
Tracking refs
There is no routing command. Write the ref directly into the source's config file, under the config
list names bean.py init prints (e.g. slack.[channels], github.[repos]), then suggest
/bean sync. Refs meant for the whole team go into the repo's committed .bean/config.json
instead (same shape; bean.py init prints its path) — everyone who clones inherits them, and each
person authenticates with their own credentials. Personal config overrides the committed file.
Team sharing: .bean/ + storage backends
- A committed
.bean/config.jsondeclares team sources +settings. A clone that hasn't authed a declared source is skipped with a nudge at sync — not an error. Credentials never enter the repo. - Storage backends for the index: local (default,
~/.bean), git (bean.py cloud init --backend git— catalog committed at.bean/catalog, data files on git-lfs; teammates get the index bygit clone, zero steps), or s3 (cloud init --bucket …/cloud connect). - Shared backends have one writer (clones default to read-only consumer;
bean.py cloud role writertakes over). After a git-backend sync, remind the user to commit.bean/— sync prints the nudge; committing is the user's move, like sync itself.
plugins — connectors beyond the core set
bean.py plugins list— the core set plus any drop-in plugin files loaded from~/.bean/plugins/.- A source with no bundled connector? Author one: copy
${CLAUDE_PLUGIN_ROOT}/docs/connector-template.py— it carries the contract and helper imports inline; the connector tests intests/test_bean.pyshow the offline fake-fetch test pattern. Fill in the TODOs to get a self-contained module you drop into~/.bean/plugins/— bean loads anything there exposing aSOURCE. No core edits.