agentsh-policy-edit

agentsh-policy-edit is a skill for Claude Code, Codex from canyonroad/agentsh. It costs 42 tokens per session (1,551 once invoked), scanned A, original, Apache-2.0.

A guide for editing an existing AgentSH security policy written in YAML, a text format for structured settings. It helps update rules for files, commands, networks, databases, services, resource limits, and auditing.

In plain words
What is it for?
Use it to add, remove, or update permissions and restrictions in an existing AgentSH policy, including HTTP services, Postgres-family databases, and resource limits.
Why use it?
It reduces the chance of changing the wrong policy rule or misunderstanding how rules are matched. It first locates and reads the existing policy before making a targeted edit.

Skill for Claude CodeCodex

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

Good fit Use it to add, remove, or update permissions and restrictions in an existing AgentSH policy, including HTTP services, Postgres-family databases, and resource limits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/canyonroad/agentsh/agentsh-policy-edit
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 canyonroad/agentsh --skill agentsh-policy-edit
Clone the repo
git clone --depth 1 https://github.com/canyonroad/agentsh

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 agentsh-policy-edit

README.md
[![agentmods](https://agentmods.dev/badge/skills/canyonroad/agentsh/agentsh-policy-edit/github.svg)](https://agentmods.dev/skills/canyonroad/agentsh/agentsh-policy-edit)
Your own site
<a href="https://agentmods.dev/skills/canyonroad/agentsh/agentsh-policy-edit"><img src="https://agentmods.dev/badge/skills/canyonroad/agentsh/agentsh-policy-edit/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 agentsh-policy-edit

Your own site · 80×15
<a href="https://agentmods.dev/skills/canyonroad/agentsh/agentsh-policy-edit"><img src="https://agentmods.dev/badge/skills/canyonroad/agentsh/agentsh-policy-edit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,551 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: 1 finding, up to medium

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 →

  • medium Excessive Agency · line 56
    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.
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.00042 $0.01551
Opus 5 $0.00021 $0.00776
Sonnet 5 $0.00008 $0.00310
Haiku 4.5 $0.00004 $0.00155

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

Security

Grade A, and why

agentsh-policy-edit 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 10d ago.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/agentsh-policy-edit/SKILL.md · 103 lines

How it starts

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

Edit AgentSH Policy

Overview

Make targeted edits to existing AgentSH security policies — add, remove, or update rules and declarations. Understands first-match-wins policy categories plus the separate Postgres-family database rule semantics.

When to Use

  • User asks to add/remove/update a policy rule ("allow stripe.com", "block file deletes")
  • User asks to change declared HTTP API access (http_services, providers)
  • User asks to change Postgres-family DB access (db_services, database_rules, database_connection_rules, policies.db)
  • User wants to change resource limits or audit settings
  • User mentions modifying an existing policy
  • NOT for creating new policies from scratch (use agentsh-policy-create)

Flow

  1. Locate & read the policy

    • Check config.yml/config.yaml for policies.dir
    • If not found, look for configs/policies/ directory
    • Fall back to asking the user
    • If multiple policies exist, list them and ask which one to edit
    • Read the full YAML into context
  2. Understand the intent Map the user's request to:

    • Rule category — file_rules, network_rules, command_rules, unix_socket_rules, registry_rules, signal_rules, dns_redirects, connect_redirects, http_services, providers, db_services, database_rules, database_connection_rules, policies.db, resource_limits, env_policy, audit, mcp_rules, package_rules, process_contexts, process_identities, env_inject, transparent_commands
    • Operation — add a new rule, remove an existing rule, or modify an existing rule
    • Insertion position — where in the rule order (for new rules)
  3. Determine insertion position (for new rules) First-match-wins means ordering matters:

    • Place deny rules before any broader matching rule regardless of its decision — any non-deny rule (allow, approve, redirect, audit, absorb, soft_delete) that matches first will shadow the deny
    • Place allow rules before the default-deny catch-all at the end
    • Place more specific rules before less specific ones
    • When in doubt: deny rules go before the first non-deny rule in that category; allow rules go before the default-deny
    • Do not apply this first-match-wins shortcut to database_rules or database_connection_rules; see DB rules below.

Read the full file on GitHub · 103 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. 10d ago First seen · 103 lines · 42 tokens per session scan A acaeb66f3d73

Subscribe to this mod's changes

agentsh-policy-edit is a skill published in the GitHub repository canyonroad/agentsh (382 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 42 tokens to every session and 1,551 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

nft-standards

Implement NFT standards (ERC-721, ERC-1155) with proper metadata handling, minting strategies, and marketplace integration. Use when creating NFT contracts, building NFT marketplaces, or implementing digital asset systems.

wshobson/agents · 48 tokens

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

parallel-feature-development

Coordinate parallel feature development with file ownership strategies, conflict avoidance rules, and integration patterns for multi-agent implementation. Use this skill when decomposing a large feature into independent work streams, when two or more agents need to implement different layers of the same system…

wshobson/agents · 105 tokens

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.

microsoft/agent-framework · 82 tokens

istio-traffic-management

Configure Istio traffic management including routing, load balancing, circuit breakers, and canary deployments. Use when implementing service mesh traffic policies, progressive delivery, or resilience patterns.

wshobson/agents · 40 tokens

python-feature-lifecycle

Guidance for package and feature lifecycle in the Agent Framework Python codebase, including stage meanings, feature-stage decorators, feature enums, and how to move APIs from one stage to the next.

microsoft/agent-framework · 43 tokens