claude-warden 2.8.1 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@
8
8
  {
9
9
  "name": "warden",
10
10
  "description": "Auto-approves safe commands, blocks dangerous ones, prompts for the rest",
11
- "version": "2.8.1",
11
+ "version": "2.9.0",
12
12
  "author": {
13
13
  "name": "banyudu"
14
14
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warden",
3
- "version": "2.8.1",
3
+ "version": "2.9.0",
4
4
  "description": "Smart command safety filter for Claude Code — parses shell pipelines and evaluates per-command safety rules to auto-approve safe commands and block dangerous ones",
5
5
  "author": {
6
6
  "name": "banyudu"
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![GitHub stars](https://img.shields.io/github/stars/banyudu/claude-warden)](https://github.com/banyudu/claude-warden/stargazers)
7
7
  [![CI](https://img.shields.io/github/actions/workflow/status/banyudu/claude-warden/ci.yml?label=CI)](https://github.com/banyudu/claude-warden/actions)
8
8
 
9
- Smart command safety filter for [Claude Code](https://claude.ai/code), [GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/customize-copilot-cli/use-hooks), and other AI coding agents. Parses shell commands, evaluates each against configurable safety rules, and returns allow/deny/ask decisions — eliminating unnecessary permission prompts while blocking dangerous commands.
9
+ Smart command safety filter for [Claude Code](https://claude.ai/code), [OpenAI Codex CLI](https://developers.openai.com/codex/hooks), [GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/customize-copilot-cli/use-hooks), and other AI coding agents. Parses shell commands, evaluates each against configurable safety rules, and returns allow/deny/ask decisions — eliminating unnecessary permission prompts while blocking dangerous commands.
10
10
 
11
11
  ## The problem
12
12
 
@@ -283,8 +283,69 @@ rules:
283
283
  anyArgMatches: ['^(ps|images|logs)$']
284
284
  decision: allow
285
285
  description: Read-only docker commands
286
+
287
+ # Skill (slash command) filtering — gate Claude Code skill invocations.
288
+ # Skill names use the short form ("commit", not "/commit"). Glob patterns
289
+ # are supported so you can whitelist an entire plugin namespace.
290
+ skills:
291
+ defaultDecision: ask
292
+ alwaysAllow:
293
+ - commit
294
+ - review
295
+ - simplify
296
+ - "plugin-dev:*" # allow every skill in the "plugin-dev" plugin
297
+ alwaysDeny:
298
+ - deploy
299
+ rules:
300
+ - skill: release
301
+ default: ask
302
+ argPatterns:
303
+ - match:
304
+ argsMatch: ["--dry-run"]
305
+ decision: allow
306
+ description: Dry-run release is safe
286
307
  ```
287
308
 
309
+ ## Skill (slash command) filtering
310
+
311
+ Warden also intercepts Claude Code's `Skill` tool (the mechanism behind `/slash-command` invocations) using the same layered rule engine as shell commands. This lets you whitelist safe skills (read-only helpers, code review, summarization) while still prompting for anything that could modify state.
312
+
313
+ Skill names are the identifier Claude Code uses internally — **without the leading `/`**. Built-in skills use a bare name (`commit`, `review`), plugin skills use `<plugin>:<skill>` (e.g. `plugin-dev:agent-development`, `code-review:code-review`). Glob patterns `*`, `?`, `[...]`, `{a,b,c}` are supported, so `"plugin-dev:*"` matches every skill in that plugin.
314
+
315
+ ### Configure
316
+
317
+ ```yaml
318
+ skills:
319
+ # Default for skills with no matching rule: allow | deny | ask
320
+ defaultDecision: ask
321
+
322
+ # Auto-allow these skills (scoped to this config layer)
323
+ alwaysAllow:
324
+ - commit
325
+ - review
326
+ - "plugin-dev:*"
327
+
328
+ # Auto-deny these skills
329
+ alwaysDeny:
330
+ - deploy
331
+
332
+ # Per-skill rules with argument-aware matching
333
+ rules:
334
+ - skill: release
335
+ default: ask
336
+ argPatterns:
337
+ - match:
338
+ argsMatch: ["--dry-run"]
339
+ decision: allow
340
+ description: Dry-run release is safe
341
+ ```
342
+
343
+ Layering follows the same **project > user > default** priority as shell rules (see [Config priority](#config-priority-scoped-layers)).
344
+
345
+ ### Built-in skill defaults
346
+
347
+ Warden ships with a curated allow-list of skills that are read-only or informational — review tools (`review`, `security-review`, `code-review:code-review`), search/summarization helpers (`promptfolio-*`, `slack:find-discussions`, `slack:summarize-channel`), plugin-development guidance (`plugin-dev:*-development`), and `*-usage` docs skills. Everything else falls through to `defaultDecision: ask`.
348
+
288
349
  ## YOLO mode
289
350
 
290
351
  Need to temporarily bypass all permission prompts? YOLO mode auto-allows all commands for a limited time or the full session — while still blocking always-deny commands (like `sudo`, `shutdown`) for safety.
package/dist/cli.cjs CHANGED
@@ -18740,6 +18740,7 @@ var SAFE_DEV_TOOLS = [
18740
18740
  "jest",
18741
18741
  "vitest",
18742
18742
  "tsc",
18743
+ "tsgo",
18743
18744
  "eslint",
18744
18745
  "prettier",
18745
18746
  "mkdirp",
@@ -19407,6 +19408,7 @@ var DEFAULT_CONFIG = {
19407
19408
  },
19408
19409
  { command: "rustup", default: "allow" },
19409
19410
  { command: "tsc", default: "allow" },
19411
+ { command: "tsgo", default: "allow" },
19410
19412
  { command: "turbo", default: "allow" },
19411
19413
  { command: "nx", default: "allow" },
19412
19414
  { command: "lerna", default: "allow" },
@@ -18744,6 +18744,7 @@ var SAFE_DEV_TOOLS = [
18744
18744
  "jest",
18745
18745
  "vitest",
18746
18746
  "tsc",
18747
+ "tsgo",
18747
18748
  "eslint",
18748
18749
  "prettier",
18749
18750
  "mkdirp",
@@ -19411,6 +19412,7 @@ var DEFAULT_CONFIG = {
19411
19412
  },
19412
19413
  { command: "rustup", default: "allow" },
19413
19414
  { command: "tsc", default: "allow" },
19415
+ { command: "tsgo", default: "allow" },
19414
19416
  { command: "turbo", default: "allow" },
19415
19417
  { command: "nx", default: "allow" },
19416
19418
  { command: "lerna", default: "allow" },
package/dist/copilot.cjs CHANGED
@@ -18740,6 +18740,7 @@ var SAFE_DEV_TOOLS = [
18740
18740
  "jest",
18741
18741
  "vitest",
18742
18742
  "tsc",
18743
+ "tsgo",
18743
18744
  "eslint",
18744
18745
  "prettier",
18745
18746
  "mkdirp",
@@ -19407,6 +19408,7 @@ var DEFAULT_CONFIG = {
19407
19408
  },
19408
19409
  { command: "rustup", default: "allow" },
19409
19410
  { command: "tsc", default: "allow" },
19411
+ { command: "tsgo", default: "allow" },
19410
19412
  { command: "turbo", default: "allow" },
19411
19413
  { command: "nx", default: "allow" },
19412
19414
  { command: "lerna", default: "allow" },
package/dist/index.cjs CHANGED
@@ -18740,6 +18740,7 @@ var SAFE_DEV_TOOLS = [
18740
18740
  "jest",
18741
18741
  "vitest",
18742
18742
  "tsc",
18743
+ "tsgo",
18743
18744
  "eslint",
18744
18745
  "prettier",
18745
18746
  "mkdirp",
@@ -19407,6 +19408,7 @@ var DEFAULT_CONFIG = {
19407
19408
  },
19408
19409
  { command: "rustup", default: "allow" },
19409
19410
  { command: "tsc", default: "allow" },
19411
+ { command: "tsgo", default: "allow" },
19410
19412
  { command: "turbo", default: "allow" },
19411
19413
  { command: "nx", default: "allow" },
19412
19414
  { command: "lerna", default: "allow" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-warden",
3
- "version": "2.8.1",
3
+ "version": "2.9.0",
4
4
  "description": "Smart command safety filter for Claude Code — auto-approves safe commands, blocks dangerous ones",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",