/slack-channel:policy list | lint | add <id> <effect> <json-match> [--reason "..."] [--ttl-ms N] [--approvers N] [--priority N] | remove <id>from slack-channel
Authors, lints, and removes MCP tool-call policy rules in access.json without hand-editing. Supports auto_approve, deny, and require_approval effects with validation via Bun script.
Ships in slack-channel. 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.
Read when SKILL.md points to them.
Author, lint, and remove policy rules under access.json's top-level policy field.
The evaluator (evaluate() in policy.ts) is the veto layer for every MCP tool
call — this skill is the ergonomic front door to authoring rules without opening
access.json in a text editor.
See ACCESS.md §Policy schema
for the full rule shape and semantics. This skill does not replace the hand-edit
path; it complements it.
/slack-channel:install) — the state file
~/.claude/channels/slack/access.json must exist.bun scripts/policy-validate.ts from the plugin repo.ACCESS.md §Policy schema (linked above)
helps when composing json-match objects./slack-channel:policy list
/slack-channel:policy lint
/slack-channel:policy add <id> <effect> <json-match> [--reason "..."] [--ttl-ms N] [--approvers N] [--priority N]
/slack-channel:policy remove <id>
Effect is one of auto_approve, deny, require_approval.
json-match is a JSON object literal for the match field — e.g.
'{"tool":"read_file","pathPrefix":"/workspace/docs"}'. At least one field
must be populated; the validator rejects empty matches.
| Effect | Required | Optional |
|---|---|---|
auto_approve | — | --priority |
deny | --reason "…" (1-200) | --priority |
require_approval | — | --ttl-ms, --approvers, --priority |
Defaults: priority=100, ttl-ms=300000 (5 min), approvers=1.
~/.claude/channels/slack/access.json — the policy field is a JSON array.
A missing or empty array means "no authored rules" and is valid.
Parse $ARGUMENTS and execute the matching subcommand. Before every write, run
the validator script. Exit cleanly without writing if validation fails.
list~/.claude/channels/slack/access.jsonpolicy field is missing or empty, print No policy rules authored. Evaluator applies defaults — see ACCESS.md §Default-branch behavior. and return.id | effect | match summary | extras.
tool=read_file pathPrefix=/workspace (omit undefined fields).deny show reason=…; for require_approval show ttlMs=… approvers=….lintbun scripts/policy-validate.ts ~/.claude/channels/slack/access.jsonok: false, show the error message verbatim.ok: true:
count rules loaded.SHADOW: rule '<later>' is shadowed by '<earlier>'.FOOTGUN: <message>.Clean: no shadow or footgun warnings.add <id> <effect> <json-match> [opts]<effect> is one of auto_approve, deny, require_approval; otherwise stop with a usage error.<json-match> as JSON. If invalid, stop with Invalid json-match: <parser error>.deny without --reason ⇒ stop with deny rule requires --reason.access.json. Initialize policy: [] if the field is missing.id, stop with Rule '<id>' already exists — use 'remove <id>' first, or pick a new id.{ "id": "<id>", "effect": "<effect>", "match": <json-match>, "priority": <priority>, ... }
policy[].~/.claude/channels/slack/access.json.tmp, then rename to access.json (atomic) and chmod 0o600.bun scripts/policy-validate.ts ~/.claude/channels/slack/access.json. If validation fails, roll back by removing the appended rule and re-writing atomically. Report the error to the operator.Added rule '<id>' (<effect>). Restart the server for the change to take effect:
- Stop the running server (Ctrl-C in the terminal where it runs, or kill the PID)
- Start it again: `bun server.ts`
Hot reload is intentionally not supported — see ACCESS.md §"Where policies live".WARNING: lines but do not roll back. Warnings are informational, not failures.remove <id>access.json.id, stop with No rule with id '<id>' found.policy array.bun scripts/policy-validate.ts ~/.claude/channels/slack/access.json to confirm the remaining set is still valid (belt-and-suspenders — editing the file by hand could have introduced pre-existing issues).Removed rule '<id>'. Restart the server for the change to take effect.list — a table of authored rules (id | effect | match summary | extras),
or a "no rules authored" notice pointing at the evaluator defaults.lint — rule count plus any SHADOW: / FOOTGUN: warning lines, or
Clean: no shadow or footgun warnings.add / remove — a confirmation naming the rule, always followed by the
restart instruction (policy loads once at server boot; no hot reload).access.json re-validated, atomically
replaced, and chmod'd 0o600.<effect> — stop with a usage error before touching any file.<json-match> — stop with Invalid json-match: <parser error>.deny without --reason — stop with deny rule requires --reason.remove <id> first or pick a new id.WARNING: lines but do not
roll back; warnings are informational, not failures./slack-channel:policy,
but authoring policy rules is an operator action, not a user action.access.json.tmp, then rename. Never truncate-and-write
in place — a crash mid-write would leave the operator with a half-written policy.add or
remove is only effective after restart. Print this in every success message.parsePolicyRules() +
detectShadowing() + detectBroadAutoApprove() from policy.ts — the same
functions the server uses at boot. A rule that parses clean here will load clean.Common rule-authoring flows, from permissive to strict:
# Allow claude-process reads under the workspace docs root
/slack-channel:policy add safe-reads auto_approve '{"tool":"read_file","pathPrefix":"/workspace/docs"}'
# Deny shell execution in this channel
/slack-channel:policy add no-shell deny '{"tool":"run_shell"}' --reason "Shell execution is not permitted from this channel."
# Two-person quorum for file uploads
/slack-channel:policy add upload-quorum require_approval '{"tool":"upload_file"}' --approvers 2 --ttl-ms 600000
# Lint — check shadows + footguns before you forget
/slack-channel:policy lint
# Remove
/slack-channel:policy remove safe-reads
references/rule-safety.md — pre-write decision and rollback checklistACCESS.md §Policy schema — full rule shape, defaults, and evaluator semanticsREADME.md § Policy Engine — the policy engine's place in the five-layer defenseskills/access/SKILL.md — pairing, allowlist, and channel opt-in (the rest of access.json)skills/install/SKILL.md — install lifecycle, doctor, and repairWhat SKILL.md sets; muted values are Claude Code's defaults
inherithighThree short reads, in order
Generated from the plugin's indexed repository (jeremylongshore/claude-code-slack-channel) — no native marketplace selected
npx claudepluginhub p/jeremylongshore-slack-channel4 skills in this plugin
/accessManage Slack channel access control — pairing, allowlist, channel opt-in. Use when approving a pairing code, changing the DM policy, editing the user allowlist, or opting a channel in or out. Trigger with "/slack-channel:access", "pair my slack account", "add user to slack allowlist", or "opt in a slack channel"./configureConfigure Slack channel tokens (bot token + app-level token). Use when writing or rotating the Slack bot and app-level tokens for the slack-channel plugin. Trigger with "/slack-channel:configure", "configure slack tokens", or "set up my slack bot token"./installDetect installation failures and install, verify, repair, reset, or uninstall the CCSC Slack channel. Use when setting up the Slack channel, checking an existing installation, exporting its Slack app manifest, or safely tearing it down. Trigger with "/slack-channel:install", "install the slack channel", "slack channel doctor", or "uninstall the slack channel".2 plugins ship this exact skill · first indexed Sep 9, 2026
Other plugins' skills for the same job