/qfs:qfs-slackfrom qfs
Use for Slack through QFS — discover connected accounts and public/private channels from live describe output, read messages and threads, and post to the requested channel or thread. Check installed views and write maps before concluding a channel or capability is unavailable.
Ships in qfs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A Slack channel is an append log with a filesystem shape: its messages become a queryable path you read the tail of, and post to — the same pipe-SQL language you already use on a mailbox, a database, or a git repo.
For an existing connection, start here rather than repeating account setup. Replace /slack-work
with the mount returned by connect --list; acme is an example workspace segment. The bound
account chooses authentication, not the spelling of the workspace segment.
qfs connect --list
qfs describe /slack-work --json
qfs describe /slack-work/acme --json
Inspect the workspace's children before choosing a collection. A channel is not listed by one
view. Slack's conversations.list
defaults to types=public_channel, so channels carries the public ones and private-channels
— its sibling, declared against types=private_channel — carries the private ones the token can
see. Query both before reporting that a name does not exist:
qfs describe /slack-work/acme/private-channels --json
qfs run '/slack-work/acme/channels |> select id, name, is_private'
qfs run '/slack-work/acme/private-channels |> select id, name, is_private'
The two are separate views because they are separate grants: private discovery needs groups:read,
and a token without it fails the whole call with missing_scope. Splitting them means a
channel-scoped token keeps its working public listing and loses only the private one. That also
makes the refusal legible: missing_scope on private-channels says this token cannot see private
channels, which is different from the channel is not there.
An older install may predate the sibling view. If describe does not show it, read what is actually
installed before changing configuration or asking the user for a channel ID:
qfs describe /sys/drivers --json
qfs run "/sys/drivers |> where kind == 'view' AND name LIKE '/slack/%' |> select name, body"
qfs declare slack --commit re-installs the shipped declaration from the binary and adds the
missing view. Until it is installed, a miss on channels alone is not evidence that a private
channel is absent or inaccessible.
Check pagination and API errors too. view_body_eval names the internal phase (lower, plan,
evaluate) and a stable cause such as unknown_column or not_expandable; it is not evidence of
missing_scope or a bad channel path. The error names the connection path you addressed without
printing the response's message text, schema keys or credentials.
Search the accessible collections for the supplied name, allowing for spaces versus underscores or hyphens, and use the returned channel ID for reads and posts. Keep the account that found the channel attached to that ID. Multiple account labels may reach the same workspace with different sender identities or permissions; do not switch them silently on an error. A URL already supplies the channel ID and may be used directly without requiring it to appear in the public list.
For a permalink /archives/C0123456789/p1780000000123456, the channel is C0123456789 and the
message timestamp is the string 1780000000.123456. Preserve its six fractional digits. Read the
message/thread through the discovered messages/<ts>/replies path; when a linked reply supplies a
thread_ts, use that root timestamp for the thread.
The shipped declaration supports both messages INSERT with a thread_ts column and
messages/<parent-ts>/replies INSERT, where the parent comes from the path. Use named input
columns: the read schema also contains server-generated fields such as ts and user.
The examples below use a discovered channel ID and keep the same account throughout.
Read the requested thread first:
qfs run '/slack-work/acme/C0123456789/messages/1780000000.123456/replies |> select ts, thread_ts, text'
After authorization to send, preview, then commit the reply:
qfs run "insert into /slack-work/acme/C0123456789/messages/1780000000.123456/replies values (text) ('Confirmed the deployment')"
qfs run "insert into /slack-work/acme/C0123456789/messages/1780000000.123456/replies values (text) ('Confirmed the deployment')" --commit
Alternatively, the messages surface accepts the parent explicitly:
insert into /slack-work/acme/C0123456789/messages
values (text, thread_ts) ('Confirmed the deployment', '1780000000.123456')
Omitting thread_ts, or supplying null, posts to the channel root. Slack treats JSON null as
an argument's default (Web API JSON rules). A supplied
column that the installed map does not consume is rejected with unused_map_columns before
any write is sent; select only the fields the map accepts. reply_broadcast is not mapped.
Read back after commit and confirm the new message's thread_ts matches the parent exactly:
qfs run "/slack-work/acme/C0123456789/messages/1780000000.123456/replies |> where thread_ts == '1780000000.123456' |> select ts, thread_ts, text"
For an older install, inspect its map bodies and refresh the declaration from the updated binary:
qfs run "/sys/drivers |> where kind == 'map' AND name LIKE '/slack/%' |> select name, body"
qfs declare slack --commit
Refreshing preserves connection/account bindings and reinstalls the shipped maps. Do not silently substitute a channel-root post when the thread map is missing. Sending a message requires user authorization; reading a greeting alone is not authorization to answer it.
Catch up on a channel — the latest messages in #general, newest first:
/slack/acme/general/messages
|> select ts, user, text
|> order by ts DESC
|> limit 20
ts user text
2026-06-30 16:42 jordan shipping the Q3 build now 🚀
2026-06-30 15:10 priya review's done, LGTM
2026-06-30 11:58 taylor standup moved to 10:30 tomorrow
… 20 rows
That read runs the instant you connect a workspace. Posting back is just as direct — one statement appends a message, and previews before it sends anything:
insert into /slack/acme/general/messages
values (text) ('Deploy finished ✅')
PREVIEW: 1 effect(s)
#0 INSERT -> slack:/slack/acme/general/messages [affected 1]
total affected: 1
::: tip Reads run now; writes preview
Every read returns rows immediately. Every write (insert) previews by default and posts
nothing — add --commit to actually send it. Paste any recipe below and safely watch what it
would do first.
:::
Slack isn't reachable until an app in the workspace hands qfs a token and that token is bound to a path — What to create on the Slack side, then Setup. After that every recipe on this page works verbatim.
The $SLACK_TOKEN that Setup pipes into the vault is a bot token (xoxb-…), issued by
a Slack app you install into the workspace you want to reach. There is no way to obtain one without
creating that app, so this is step zero for every workspace — including a second one added alongside
a workspace you already read.
chat:write to post, and channels:history to read a public channel's tail —
or groups:history if the channel you actually want to read is private, which is a separate
scope in Slack's model, not a stronger version of the same one. Add nothing else yet: every
further capability on this page has its own scope, listed in
Scopes at a glance, and a scope you never granted is one that cannot be
used against you.xoxb-./invite @<your app name> in
that channel.::: warning A channel the app has not joined refuses the read
Step 5 is the one that gets skipped, and nothing in the Slack app config mentions it. A scope grants
the ability to read history; it never grants membership of a particular channel, and a tail read is
conversations.history against that one channel. The read fails until the app is a member — and on a
private channel it fails as channel_not_found, because a channel the app cannot see is reported
as one that does not exist rather than one it has not joined.
Observed on a private channel, in this order:
| state | what comes back |
|---|---|
| app not invited | channel_not_found |
app invited, only chat:write + channels:history granted | missing_scope, naming groups:history |
groups:history granted and the app reinstalled | the messages |
Two different causes with two different fixes, and the error names which one you are looking at.
Read it before changing scopes: channel_not_found on an id you copied out of Slack itself means
the invite, not the grant.
:::
A second workspace is a second app, a second account label, and a second mount — nothing is shared between them. Repeat the steps above in the other workspace, then give its token its own label and its own path, leaving the first mount untouched:
printf %s "$SLACK_TOKEN" | qfs account add slack acme # a second account, labelled `acme`
qfs connect /slack-acme --driver slack --account acme # its own mount, bound to that account
The label and the mount path are yours to choose; the default label and the /slack path in
Setup are one instance of these same two commands, not fixed names.
For your own user accounts in two workspaces, store each user token under a separate label and bind each label to a separate path:
printf '%s' "$SLACK_USER_TOKEN_A" | qfs account add slack work-a
printf '%s' "$SLACK_USER_TOKEN_B" | qfs account add slack work-b
qfs connect /slack-a --driver slack --account work-a
qfs connect /slack-b --driver slack --account work-b
An agent then chooses only the connection path. Both reads and posts through /slack-a/… use
work-a; /slack-b/… uses work-b. No active-profile switch or extra --secret is needed.
The token determines the actual workspace and sender; changing the {ws} segment beneath a
connection does not change authentication. Use each workspace's actual channel ID:
qfs run -e "insert into /slack-a/acme/C0123456789/messages values (text) ('Hello from work-a')"
qfs run -e "insert into /slack-b/beta/C9876543210/messages values (text) ('Hello from work-b')"
These commands preview. Add --commit to send. If the selected account is missing or locally
revoked, qfs refuses the request without falling back to default or another account. For legacy
bearer connections with an explicit --secret, that reference retains precedence over --account;
reconnect using the commands above to select authentication solely by account.
User-token setup and required user scopes are covered in Post as yourself.
Undoing it is those two layers in reverse. On the Slack side, uninstall the app — or revoke its
token — from the workspace's app-management page. On the qfs side, qfs disconnect /slack-acme
removes the mount and qfs account remove slack acme deletes the token together with its consent
record.
To post as a person instead of as the app, the token is a different one and its scopes live under User Token Scopes — see Post as yourself (a user token).
::: tip Prerequisites — an operator, an account, a mount
Reaching a cloud service takes three one-time steps: a signed-in operator (qfs init —
The operator identity), an authorized account (qfs account add …), and a
mount binding that account to a path (qfs connect …). The happy path below is exactly those
three.
:::
A Slack read needs a workspace token bound to a mount:
qfs init [email protected] # 1. the operator + the vault (once per machine)
printf '%s' "$SLACK_TOKEN" | qfs account add slack # 2. the workspace token (label: `default`)
qfs connect /slack --driver slack --account default # 3. mount it at /slack
The token comes in on stdin, never argv, and is sealed in qfs's encrypted credential store.
Until the mount is bound, a read fails with an actionable hint naming the
qfs account add slack … / qfs connect … to run. The mount is required even for a write
preview; preview resolves no token and sends nothing, while --commit applies the post.
QFS checks Slack's application result as well as the HTTP status. A response such as
{"ok":false,"error":"missing_scope"} is a failure even when Slack returns HTTP 200:
qfs run --commit exits nonzero without reporting committed: true. Recognized service error
codes (including no_text) are preserved. Failed writes include a bounded operation label and
corrective guidance: check explicit input bindings, channel access, or the selected account's
permissions as appropriate. An unknown string code reports service_rejected and says the
unrecognized code was withheld; a missing/non-string error code reports service_error_malformed.
Neither diagnostic copies arbitrary response values, message content, tokens, or URL parameters.
A malformed or missing success envelope reports http_response_contract.
A failed read reports the service error instead of an empty result. Failed posts are not
automatically retried. These checks apply to existing Slack API connections too.
Before sending a JSON chat.postMessage, QFS rejects a body with missing, null, or empty content locally.
For text-only message and installed reply maps that use row.text, bind the column explicitly:
VALUES (text) ('hello'). Positional values can bind another column and leave row.text null.
The local error identifies the operation and the explicit-binding correction; it sends no request
and does not resolve credentials. Nonempty blocks, attachments, or markdown_text remain valid
alternatives, following Slack's message contract.
Preview still performs no I/O; this content check runs when the map is applied at commit time.
Once connected, a workspace's channels hang off /slack in a filesystem shape:
| Slack thing | qfs path | it is a… |
|---|---|---|
| a workspace | /slack/acme | directory of channels |
| a channel's log | /slack/acme/general/messages | the append log you read and post to |
Message columns: ts, user, text. Run qfs describe /slack/acme/general/messages for the exact
schema and verbs of the node.
Read the latest messages — the tail of the log:
/slack/acme/general/messages
|> select text
|> limit 20
Search a channel for anything that looks like an incident — WHERE narrows the log before it
comes back:
/slack/acme/incidents/messages
|> where text ~ '(?i)(outage|sev[0-9]|rollback|paging)'
OR text LIKE '%down%'
|> select ts, user, text
|> order by ts DESC
|> limit 100
A channel's or DM's shared files are their own listing — /slack/acme/general/files (a channel, by
#name) and /slack/acme/dms/U07ALICE/files (a DM, by the peer's Slack user id). The listing is
scoped by Slack's own file-share record for that conversation (not by who uploaded a file, nor by
upload time alone), so "the latest file in this DM" is provably that DM's newest share. File
columns: id, name, mimetype, size, created, user. Reading is all these listings do — the one write on the file surface is the
detach below.
A DM is addressed by the peer's user id (U…, the same form /slack/<ws>/dms/<user>/messages
uses), not a display name — qfs opens the IM channel (conversations.open) from that id. Look the id
up in the workspace directory: /slack/acme/users |> where name == 'alice' |> select id.
The latest file dropped in a DM:
/slack/acme/dms/U07ALICE/files
|> order by created DESC
|> limit 1
Files shared in a channel, newest first:
/slack/acme/incidents/files
|> select name, size, created, user
|> order by created DESC
Use the mount you discovered and the channel ID returned by its channel listing. List PDFs first, then use the returned file ID on that same mount:
/slack-work/acme/C0123/files
|> where mimetype == 'application/pdf'
|> select id, name, size
/slack-work/acme/files/F0123/content
The content view returns one content: bytes column. Copy it intact to a local file with the
ordinary blob write (preview, then commit):
/slack-work/acme/files/F0123/content
|> upsert into /local/tmp/report.pdf
The file ID above stands for one returned by the listing. Inspect its schema with
qfs describe /slack-work/acme/files/F0123/content before reading. Reinstall the current
slack_driver.qfs declarations if an older installation does not advertise the content node.
QFS asks Slack files.info with the selected mount account and uses that same account for the
private download. The account needs files:read and access to the file; another account or a
stored default credential is never a fallback. Missing files, missing scope, unavailable download
URLs and denied access are reported as errors. The scoped transport accepts only HTTPS URLs under
files.slack.com/files-pri/ returned by Slack and refuses all redirects, including same-host
redirects. External/remote files and other download hosts are unsupported. Generic FOLLOW
continues to send no credential.
Slack documents the authorization header and files:read requirement in its
file object reference.
Remove a file by its id. A delete is irreversible, so it needs the explicit gate:
remove /slack/acme/files/F0123
qfs run -e "remove /slack/acme/files/F0123" --commit-irreversible
Like every irreversible effect it previews by default and asks for the gate before anything leaves the machine; the id is the one from the listings above.
A file is addressed by name under the destination channel, so an upload is the ordinary blob
write and the round trip reads symmetrically — read a content: bytes row, write it back:
/slack-work/acme/files/F0123/content
|> upsert into /slack-work/acme/C0123456789/files/report.pdf
qfs run -e "/slack-work/acme/files/F0123/content |> upsert into /slack-work/acme/C0123456789/files/report.pdf" --commit
Any one-row content: bytes source works the same way — a local file, a Drive download, a
Chatwork attachment:
/local/tmp/report.pdf
|> upsert into /slack-work/acme/C0123456789/files/report.pdf
Address the destination by its channel ID. Slack's complete-upload call takes an id, and no
lookup can supply one for a private channel: every listing a declaration can search is the public
one. A name therefore comes back as slack_upload_channel_unresolved, which says exactly that
rather than implying the app was never invited. Find the id in channels or private-channels.
The account needs files:write and membership of the destination channel. The upload previews like
every other write and sends nothing until --commit.
Slack retired the single-call files.upload, and its replacement is three calls: reserve an upload
URL, send the bytes to it, then complete the share. QFS performs all three with the selected mount
account and reports one row, id and name, for the shared file. Only the
https://files.slack.com/ URL Slack itself delivered is admitted, every redirect is refused on
both legs, and no caller-supplied URL or credential is ever accepted.
One cost, stated plainly. The declared write path carries bytes as a JSON array, so a file costs roughly four times its size in memory while it is in flight. For ordinary attachments — images, documents, logs — that is invisible. For a very large file (a screen recording of tens of megabytes) prefer the Slack UI until the raw-bytes wire encoding lands.
Post to a channel — an INSERT appends to the log. It previews the append and applies nothing
until --commit:
insert into /slack/acme/general/messages
values (text) ('Deploy finished ✅')
PREVIEW: 1 effect(s)
#0 INSERT -> slack:/slack/acme/general/messages [affected 1]
total affected: 1
::: tip Want a deploy to post to Slack by itself? Wire it up once with a trigger — see Automation. :::
::: tip Bind the message column explicitly
Use values (text) ('…'): the column list comes after values.
Positional input follows the described schema order and can populate ts instead of text.
Explicit columns keep the intended message binding when that schema changes.
:::
Use the procedure qualifier advertised by qfs describe /slack-a --json.
The qualifier is the mount name without its leading slash; hyphens stay in the name:
/slack-a/acme/general/messages
|> call slack-a.react(channel => 'general', ts => '1780000000.123456', emoji => 'eyes')
The source and qualifier select the same mount. The channel lookup and write both use that
mount's bound account. slack.react still addresses the default /slack mount; it does not
mean the account selected by a /slack-a source. The advertised pin, unpin, update,
and delete procedures use the same qualifier. Typed arguments and irreversible confirmation
requirements remain those reported by DESCRIBE.
By default a workspace mount posts as the bot the app installed. To post as a human user —
no bot badge, the message attributed to that person — bind a user token (xoxp-…) on its own
mount. The driver hands whatever credential the mount holds to Slack verbatim; Slack's own semantics
decide the author, so nothing inside qfs changes.
chat:write to post (add channels:history too if this mount should also read the tail) — then
Reinstall to Workspace and authorize as the target user. Copy the User OAuth Token
(xoxp-…).printf %s "$XOXP_TOKEN" | qfs account add slack me # a second account, labelled `me`
qfs connect /slack-me --driver slack --account me # its own mount, bound to that account
insert into /slack-me/acme/general/messages
values (text) ('Sent from my own account 👋')
::: warning The app page shows only the installer's token
api.slack.com/apps only ever reveals the installer's user token. For anyone else to obtain
their own xoxp-, they must complete a real OAuth consent flow (authorize URL → code →
oauth.v2.access) — the same shape as a Gmail code-flow helper: open a URL, click approve.
:::
One workspace app with user_scope=chat:write; each member authorizes once and receives their own
xoxp- token. Where those tokens live is the design decision — two shapes, two trust
boundaries:
| topology | where tokens live | who can speak as you |
|---|---|---|
| Per-member vault (recommended) | each member's own machine (qfs account add slack … run locally) | only that member's own agent |
| Central box | one operator's vault holds every member's token | whoever controls that one host |
The central box concentrates impersonation power in a single host — anyone who controls it can
post as any member. If you must run it, treat it like a production secret store: minimal scopes
(chat:write only), explicit consent recorded from every member, and rotate all tokens if the
host is ever compromised. The per-member vault keeps each person's impersonation power on their own
machine and is the default recommendation.
Operational notes: agree a disclosure norm up front (whether AI-authored messages are marked as such), and remember revocation is per-user from Slack's app-management page — a member can cut their own token without disturbing anyone else's.
Grant only the rows you use. Each names the scope Slack requires for the Web API method that path actually calls, so a scope you omit shows up as that one path failing while everything else keeps working.
| you want to… | token | scope |
|---|---|---|
post a message (insert into …/messages) | bot (xoxb-…) | chat:write |
| post as yourself | user (xoxp-…) | chat:write (a user scope) |
| read a public channel's tail, its thread replies, and its reactions | either | channels:history |
| read a private channel's tail, its thread replies, and its reactions | either | groups:history |
list the workspace's public channels, and name one by #name in a CALL | either | channels:read |
| list the workspace's private channels the app is in | either | groups:read |
read the user directory — including looking up a DM peer's U… id | either | users:read |
open a DM (/slack/<ws>/dms/<user>) | either | im:write |
| read a DM's messages | either | im:history |
| list shared files or read their content | either | files:read |
upload a file (upsert into …/files/<name>) | either | files:write |
detach a file (remove /slack/<ws>/files/<id>) | either | files:write |
add a reaction (slack.react) | either | reactions:write |
pin or unpin a message (slack.pin / slack.unpin) | either | pins:write |
edit or delete a message (slack.update / slack.delete) | either | chat:write |
The channels: and groups: pairs are separate grants, not a weak and a strong form of one grant:
an app holding channels:history reads nothing from a private channel, and the refusal names
groups:history as what it needed. Adding a scope after installing does not take effect until you
Reinstall to Workspace.
Every scope above is an ability, never access to a particular conversation — the app still has to be in the channel. See What to create on the Slack side for the two failures that distinguishes and how to tell them apart.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub qmu/qfs --plugin qfs14 skills in this plugin
/qfsUse when the user asks to use QFS or its connected services. Discover the live connections and available paths before reading or writing through the qfs CLI; covers pipe-SQL, preview, and commit. For Slack channel discovery and threads, also read qfs-slack./qfs-automationUse when a task needs the qfs SERVER side — scheduled jobs, triggers, HTTP endpoints, and cached views created with CREATE bindings over queries you already write./qfs-chatworkUse when a task needs Chatwork through qfs — installing and querying the DECLARED /chatwork driver (rooms, a room's latest messages, a room's unread messages, room file listings, file download, and file upload) written in the query language itself, and posting a message to a room. Covers installing the chatwork.qfs declaration, connecting it to a stored Chatwork API token, reading the latest messages versus the unread-only ones, posting a message via ENCODE form, downloading a file's bytes via the FOLLOW stage, and uploading via ENCODE multipart.Other plugins' skills for the same job