policy

policy is a skill for Claude Code from jeremylongshore/claude-code-slack-channel. It costs 72 tokens per session (2,529 once invoked), scanned A, original, Apache-2.0.

A command-based way to create and manage rules for deciding whether MCP tool calls are automatically allowed, denied, or sent for approval. MCP is a standard way for AI assistants to use external tools.

In plain words
What is it for?
Listing, checking, adding, and removing Slack channel access rules, including rules with matching conditions, priorities, expiry times, and approver counts.
Why use it?
It avoids editing the policy file by hand and validates rules before they are saved.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; mentions Claude Code.

Part of the slack-channel plugin — 4 skills, 1 command, 1 MCP server shipped together

Good fit Listing, checking, adding, and removing Slack channel access rules, including rules with matching conditions, priorities, expiry times, and approver counts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jeremylongshore/claude-code-slack-channel/policy
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jeremylongshore/claude-code-slack-channel --skill policy
Clone the repo
git clone --depth 1 https://github.com/jeremylongshore/claude-code-slack-channel

Made for: Claude Code.

Or install slack-channel, the plugin that ships this one along with the rest of its 4 skills, 1 command, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for policy

README.md
[![agentmods](https://agentmods.dev/badge/skills/jeremylongshore/claude-code-slack-channel/policy/github.svg)](https://agentmods.dev/skills/jeremylongshore/claude-code-slack-channel/policy)
Your own site
<a href="https://agentmods.dev/skills/jeremylongshore/claude-code-slack-channel/policy"><img src="https://agentmods.dev/badge/skills/jeremylongshore/claude-code-slack-channel/policy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for policy

Your own site · 80×15
<a href="https://agentmods.dev/skills/jeremylongshore/claude-code-slack-channel/policy"><img src="https://agentmods.dev/badge/skills/jeremylongshore/claude-code-slack-channel/policy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,529 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 10 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 176
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium Excessive Agency · line 3
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 45
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 54
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 91
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 165
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Rogue Agent · line 102
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Excessive Agency · line 156
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Agent Snooping · line 184
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 185
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00072 $0.02529
Opus 5 $0.00036 $0.01264
Sonnet 5 $0.00014 $0.00506
Haiku 4.5 $0.00007 $0.00253

Measured today against content hash c97c3e5880a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

policy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/policy/SKILL.md · 189 lines

How it starts

The opening of the file, as written. The whole thing — 189 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/slack-channel:policy

Overview

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.

Prerequisites

  • A completed install (/slack-channel:install) — the state file ~/.claude/channels/slack/access.json must exist.
  • Bun available on PATH — every write is validated by running bun scripts/policy-validate.ts from the plugin repo.
  • Familiarity with the rule shape in ACCESS.md §Policy schema (linked above) helps when composing json-match objects.

Usage

/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.

Options by effect

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.

State file

~/.claude/channels/slack/access.json — the policy field is a JSON array. A missing or empty array means "no authored rules" and is valid.

Read the full file on GitHub · 189 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +3 lines · +2 tokens per session c97c3e5880a8
  2. 10d ago First seen · 186 lines · 70 tokens per session scan A 5a0f330c15a1

Subscribe to this mod's changes

policy is a skill published in the GitHub repository jeremylongshore/claude-code-slack-channel (39 stars, last pushed yesterday), licensed Apache-2.0. It adds 72 tokens to every session and 2,529 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.