跳到正文
cccskills
免费在 GitHub 公开

global-agent-guardrails

Configure a shared guard that blocks destructive shell commands before local AI agents execute them. Adjust blocking rules, connect agent integrations, and test why commands are blocked or allowed.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Configure the shared guard against catastrophic shell commands in local AI agents. Use when changing block patterns, adding an agent or machine, or investigating why a command was or wasn't blocked.

实测评分 未实测

查看安装方法

适用场景

  • Adjust rules for blocking destructive commands
  • Connect the guard to another agent or machine
  • Investigate blocked or unexpectedly allowed commands
  • Verify protection with tests and safe probes

包含的文件(1)

  • SKILL.md3.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Global Agent Guardrails

Block catastrophic shell commands before execution. One patterns file feeds a shared hook script or native adapter for each agent. This guards against accidents, not malicious agents (obfuscation like python -c "shutil.rmtree(...)" can slip past regex).

Cloudroom ships a built-in Command Guard based on this one, on by default.

File map

The setup consists of a shared pattern list, a guard script, a test suite, and agent-specific adapters. Keep those in the appropriate user-level configuration locations for your tools.

Check installation

Confirm the shared guard and patterns are present, then run the test suite; it should report no failures.

If missing, rebuild from the wiring documentation in the project documentation.

Add or tune a pattern

  1. Edit the shared patterns file. Write POSIX ERE (grep -E). Use [[:space:]], never \s — adapters may convert [:space:] to \s for JS/Python and compile in multiline mode.
  2. Add block and allow cases to the test suite, then run it; all must pass.
  3. Verify the new pattern compiles in each adapter's regex engine.
  4. Consumers should re-read patterns for every command. If an agent uses a native blocklist, mirror changes there as appropriate.

Block only catastrophic commands (irreversible data loss, disk wipes, repo deletion). Recoverable local commands stay allowed; avoid over-blocking.

Per-agent wiring (user-global)

Configure each agent using its documented hook or native command-blocking mechanism. Where supported, point the hook to the shared guard; merge settings into existing configuration rather than overwriting it. Use absolute paths in configs where path expansion is inconsistent.

Gotchas

  • Some agents pin hook trust to configuration contents. After changing hook configuration, follow the agent's documented trust or approval process.
  • Some background or worker environments cannot execute local hook scripts. Check the agent's documentation for failure behavior and limitations.
  • Plugin hook manifests, enablement, and failure behavior vary by agent; keep adapters simple and follow each tool's public documentation.
  • Adapters should handle errors deliberately so a broken patterns file does not unexpectedly block every command.
  • Native blocklist semantics vary: some entries request confirmation while others prevent execution. Use the strongest appropriate mechanism for catastrophic commands.
  • Ensure the guard reads the command from the payload format used by each integration.
  • Adapter regexes may require multiline mode so ^ matches each shell line like grep.
  • False-positive class: a harmless command whose argument text contains a dangerous-looking string can get blocked. Workaround: put the text in a file and reference it.
  • Some agents or remote/background execution environments may not support local hooks. Check the relevant agent documentation for current support.

E2E verification

Use a safe probe in a temporary, non-git directory: ask the agent to run a command that would be blocked if executed. A guard block indicates the guard works; a repository-context error indicates the probe did not test the guard.

Run the guard's test suite directly to verify that a catastrophic command is blocked.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

4x4

免费

Work through sixteen open questions in four rounds to clarify major product decisions, risky changes, or large refactors. The agent adapts later questions to earlier answers, then turns your decisions into a step-by-step implementation plan.

中文简介正在准备中。当前显示英语简介。

  • Clarifying decisions before a major product change
  • Planning a large refactor
  • Deciding rollout order for a risky change
davidondrej/skills41662026年10月23日 更新

Document approved decisions as concise ADRs, or architecture decision records. It preserves the user's meaning and conditions, removes conversational filler, follows the project's numbering, and presents the saved record for review.

中文简介正在准备中。当前显示英语简介。

  • Record a decision approved in conversation
  • Preserve the conditions and scope of a decision
  • Add a numbered ADR to existing records
davidondrej/skills41662026年10月23日 更新

Keep a Mac awake for a chosen duration or while a specified process runs. The skill uses built-in macOS tools to manage one session, verify that sleep prevention is active, and control whether the display stays on.

中文简介正在准备中。当前显示英语简介。

  • Keep a Mac awake during a lengthy task
  • Prevent sleep while a specified process runs
  • Allow the display to dim while keeping the Mac awake
davidondrej/skills41662026年10月23日 更新

Turn a feature or refactoring idea into a concise implementation prompt for another agent. It asks focused questions one at a time, records decisions, and includes development steps, validation, and working rules.

中文简介正在准备中。当前显示英语简介。

  • Clarify requirements for a new feature
  • Decide edge cases and failure behavior
  • Define the scope of a refactor
davidondrej/skills41662026年10月23日 更新

bb-cli

免费

Inspect and manage BB threads, environments, projects, and plugins through its command line interface. The skill guides agents to identify the correct targets, apply changes, and verify the resulting state.

中文简介正在准备中。当前显示英语简介。

  • Check BB projects and environment status
  • Manage skills and plugins
  • Create or operate threads
davidondrej/skills41662026年10月23日 更新

Create, install, and debug TypeScript plugins that extend bb with custom pages, sidebar panels, CLI commands, agent tools, themes, and other features. The skill also guides development reloads, log checks, and verification of installed plugins.

中文简介正在准备中。当前显示英语简介。

  • Add a custom page or sidebar panel to bb
  • Create a bb CLI command or agent tool
  • Investigate plugin errors through logs
davidondrej/skills41662026年10月23日 更新

查看 davidondrej 的全部技能

报告此技能的问题