agentsh-policy-create

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

A generator for AgentSH security policies, which define what an AI agent, development environment, CI pipeline, web service, or database may access. It starts from built-in templates and produces YAML policy files.

In plain words
What is it for?
Use it when setting up AgentSH or creating a policy for coding agents, continuous-integration jobs, local development, strict sandboxes, HTTP services, or Postgres-family databases.
Why use it?
It helps control file, network, command, web-service, and database access without writing the policy structure from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: names the AskUserQuestion tool.

Good fit Use it when setting up AgentSH or creating a policy for coding agents, continuous-integration jobs, local development, strict sandboxes, HTTP services, or Postgres-family databases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/canyonroad/agentsh/agentsh-policy-create
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-create
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-create

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/canyonroad/agentsh/agentsh-policy-create"><img src="https://agentmods.dev/badge/skills/canyonroad/agentsh/agentsh-policy-create.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,220 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 pass 7 Sept 2026
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.00037 $0.01220
Opus 5 $0.00018 $0.00610
Sonnet 5 $0.00007 $0.00244
Haiku 4.5 $0.00004 $0.00122

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

Security

Grade A, and why

agentsh-policy-create 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 9d 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.

skills/agentsh-policy-create/SKILL.md · 91 lines

How it starts

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

Create AgentSH Policy

Overview

Create new AgentSH security policies from built-in templates, customized to the user's use case. Produces valid YAML policy files with correct structure, evaluation semantics, and defensive defaults for file, network, command, HTTP service, and Postgres-family database controls.

When to Use

  • User asks to create/make/generate a new policy
  • User describes a use case that needs a policy ("policy for my CI pipeline")
  • User wants to set up AgentSH for the first time
  • User wants controlled access to a declared HTTP API or Postgres-family database
  • NOT for editing existing policies (use agentsh-policy-edit)

Flow

  1. Locate policy directory

    • Look for config.yml or config.yaml in the project root to find policies.dir
    • If not found, look for a configs/policies/ directory
    • Fall back to asking the user with AskUserQuestion
  2. Understand the use case Use AskUserQuestion to ask: "What will this policy protect?"

    Use Case Template
    AI agent (code tasks) default or agent-default
    CI/CD pipeline ci-strict
    Local development dev-safe
    Strict agent sandbox agent-sandbox
    Observation/profiling agent-observe
    Declared HTTP API gateway Start from default
    Postgres-family database access Start from default
    Custom / other Start from default
  3. Select template

    • Read the matching template from the policy directory (e.g., configs/policies/default.yaml)
    • On Windows, prefer the -windows variant if available (e.g., default-windows.yaml, ci-strict-windows.yaml)
    • If templates are not available locally, use the schema reference to generate a baseline
  4. Customize Based on the template read in Step 3, ask only about gaps — skip categories the template already handles well:

    • "Which domains does your app need to reach?" → add network rules
    • "Any paths outside the workspace it needs?" → add file rules
    • "Any commands to block or require approval?" → add command rules
    • "Should any HTTP APIs be exposed through AgentSH?" → add http_services plus providers when credential substitution is needed
    • "Should any Postgres-family databases be mediated?" → add db_services, database_connection_rules, database_rules, and policies.db

Read the full file on GitHub · 91 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. 9d ago First seen · 91 lines · 37 tokens per session scan A 40dff8bd3b8e

Subscribe to this mod's changes

agentsh-policy-create is a skill published in the GitHub repository canyonroad/agentsh (382 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 37 tokens to every session and 1,220 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

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

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

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