blocked-by-policy

blocked-by-policy is a skill for Claude Code, Codex from kirodotdev/KiroCrew. It costs 99 tokens per session (2,751 once invoked), scanned D, original, Apache-2.0.

Guidance for responding when a Kiro Crew safety policy blocks a tool call. It explains how to distinguish a host policy block from a user's refusal and how to choose an approved alternative instead of repeating the blocked request.

In plain words
What is it for?
Use it after a tool call is blocked to identify the policy reason, explain what happened accurately, and follow the sanctioned path for that type of request.
Why use it?
It prevents the agent from blaming the user or retrying equivalent commands that the same policy will reject. It also describes special handling for credentials, enterprise login, key files, and possible data exfiltration.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it after a tool call is blocked to identify the policy reason, explain what happened accurately, and follow the sanctioned path for that type of request.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kirodotdev/kirocrew/blocked-by-policy
About the project

Kiro Crew is a persistent development workspace where agents continue multi-step software work across sessions, schedules, and connected interfaces. Developers use it locally or remotely through a desktop app, web dashboard, CLI, Slack, or Discord, with unattended tasks and recurring jobs. The catalogue contains skills and instructions for working with this workspace.

kirodotdev/KiroCrew · 3,703 stars · on GitHub · kiro.dev

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 kirodotdev/KiroCrew --skill blocked-by-policy
Clone the repo
git clone --depth 1 https://github.com/kirodotdev/KiroCrew

Made for: Claude Code, Codex.

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 blocked-by-policy

README.md
[![agentmods](https://agentmods.dev/badge/skills/kirodotdev/kirocrew/blocked-by-policy.svg)](https://agentmods.dev/skills/kirodotdev/kirocrew/blocked-by-policy)
Your own site
<a href="https://agentmods.dev/skills/kirodotdev/kirocrew/blocked-by-policy"><img src="https://agentmods.dev/badge/skills/kirodotdev/kirocrew/blocked-by-policy.svg" alt="Measured on agentmods" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,751 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 4 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00099 $0.02751
Opus 5 $0.00049 $0.01375
Sonnet 5 $0.00020 $0.00550
Haiku 4.5 $0.00010 $0.00275

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

Security

Grade D, and why

blocked-by-policy scanned grade D with 4 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 yesterday.

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.

Subtle steeringmediumPrompt injection

Instructions that bias recommendations or shape behaviour without the user noticing.

- **Never tell the user they cancelled, denied, or rejected anything** unless you

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

`--data-urlencode @file`, `-F field=@file`, `--upload-file`, `wget --post-file`,

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

### Other key material (`~/.ssh`, `~/.gnupg`, `~/.netrc`, `~/.npmrc`, cloud and container stores, …)

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

`--data-urlencode @file`, `-F field=@file`, `--upload-file`, `wget --post-file`,
src/kiro_crew/builtin_skills/blocked-by-policy/SKILL.md · 218 lines

How it starts

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

When a safety policy blocks a tool call

First: it was almost certainly not the user

A rejected tool call is reported to you as a generic failure — on kiro-cli literally User denied tool execution. That string is wrong about who refused. Kiro Crew's own gate produces most refusals, and the real reason arrives separately as a [Kiro Crew host notice] message in the same turn.

So:

  • Never tell the user they cancelled, denied, or rejected anything unless you saw them do it. Say the host policy blocked it, and name the rule.
  • Do not stop and ask whether to retry. Decide inside the same turn.
  • Do not apologise for an interruption that did not happen.

Second: do not retry the same shape

The deny rules come in families. If cat <secret> was blocked, then head, tail, less, more, strings, base64, cp and python -c 'open(...)' on the same path are blocked too — by sibling rules with the same category. Cycling through readers wastes turns and produces a series of identical refusals.

The question to ask is never "which reader is allowed" but "what was I actually trying to accomplish, and what is the sanctioned path to it".

The classes, and the sanctioned path for each

AWS credentials (~/.aws, AWS_* env vars, IMDS)

You do not need to read them, and running AWS CLI commands is not blocked. This is the single most common misdiagnosis: the read is refused, and the conclusion "this host has no AWS access" is drawn from it. The SDK resolves credentials itself, including refreshing them through a credential_process entry.

  • List profiles: aws configure list-profiles
  • Confirm the identity in effect: aws sts get-caller-identity
  • Select one of several configured profiles: --profile <name>
  • Then just run the command you wanted.

What is refused is YOU opening the credential file, not the credential being used. The SDK inside the aws process still reads it, so an already-configured profile works without you ever touching the file — which is why the command you actually wanted is the way forward and a different reader never is.

Read the full file on GitHub · 218 lines

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. yesterday Changed · +5 lines aaafcac015d4
  2. 3d ago First seen · 213 lines · 99 tokens per session scan D fc0640e34c45

Subscribe to this mod's changes

blocked-by-policy is a skill published in the GitHub repository kirodotdev/KiroCrew (3,703 stars, last pushed today), licensed Apache-2.0. It adds 99 tokens to every session and 2,751 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it D with 4 findings (subtle steering, sends data to an external url, reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

cost-efficiency-analyzer

Analyzes cost structure, cost efficiency, and expense management from P&L data. Use when the user asks about costs, expenses, COGS, operating expenses, cost ratios, cost control, spending efficiency, margin compression from cost side, or wants to understand where money is going. Also use for "are we spending too…

awslabs/agentcore-samples · 98 tokens

executive-financial-briefing

Generates a concise executive-level financial briefing or summary suitable for a CEO, CFO, or board presentation. Use when the user asks for a summary, briefing, executive summary, board update, financial overview, financial health check, or "how is the business doing". Covers the full P&L picture in one page. Also…

awslabs/agentcore-samples · 95 tokens

multi-quarter-trend-analysis

Analyzes financial trends across multiple quarters by comparing P&L metrics over time. Use when the user wants to see trends, patterns, trajectories, or directional movement across 3 or more quarters. Also use for "how are we trending", "show me the trend", "track performance over time", "quarter over quarter…

awslabs/agentcore-samples · 82 tokens

sector-rotation

Identify which market sectors to overweight or underweight based on current macro conditions and sector performance data.

awslabs/agentcore-samples · 22 tokens

trend-analysis

Analyze price and volume trends for one or more stocks to determine momentum direction and key technical levels.

awslabs/agentcore-samples · 21 tokens

persistent-notes

Save notes locally to /mnt/workspace/notes.json file. Use when user wants to "save a note" or "remember something".

awslabs/agentcore-samples · 32 tokens