generate-policy

generate-policy is a skill for Claude Code from NOMARJ/sigil. It costs 17 tokens per session (549 once invoked), scanned A, original, Apache-2.0.

A generator that turns Sigil scan findings into a YAML security policy for running an agent in a sandbox. The policy can restrict files, network connections, processes, and access to credentials.

In plain words
What is it for?
Use it after scanning a project to create sandbox rules for its filesystem, network, processes, and environment credentials.
Why use it?
It saves you from translating scan warnings into execution restrictions by hand. The resulting rules limit what potentially risky code can read, contact, or run.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the sigil-security plugin — 6 skills, 2 agents, 2 hooks shipped together

Good fit Use it after scanning a project to create sandbox rules for its filesystem, network, processes, and environment credentials.

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

Made for: Claude Code.

Or install sigil-security, the plugin that ships this one along with the rest of its 6 skills, 2 agents, 2 hooks.

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 generate-policy

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/nomarj/sigil/generate-policy"><img src="https://agentmods.dev/badge/skills/nomarj/sigil/generate-policy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 549 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.
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.00017 $0.00549
Opus 5.5 $0.00007 $0.00220
Sonnet 5.5 $0.00003 $0.00110
Haiku 4.5 $0.00002 $0.00055

Measured 1mo ago against content hash e27884e83e40, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

generate-policy 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 1mo 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.

plugins/claude-code/skills/generate-policy/SKILL.md · 77 lines

How it starts

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

Generate Sandbox Policy

Generate a Sigil security policy YAML file based on scan results. The policy controls filesystem, network, process, and credential access for sandboxed agent execution.

Process

  1. Scan the target — Run sigil scan <path> to get findings
  2. Analyze findings — Map each finding to a policy restriction:
    • Phase 1 (Install Hooks) → Filesystem restrictions (read-only paths)
    • Phase 3 (Network) → Network allowlist (only permit known-good endpoints)
    • Phase 4 (Credentials) → Credential policy (restrict env var access)
    • Phase 5 (Obfuscation) → Process restrictions (sandboxed user)
  3. Generate policy YAML with the following structure:
version: "1.0"
name: "<project-name>-policy"
description: "Auto-generated from Sigil scan on <date>"

filesystem:
  read_only:
    - /usr
    - /lib
    - /etc
  read_write:
    - /tmp
  include_workdir: true

network:
  default_action: deny
  rules:
    - name: "<endpoint-name>"
      host: "<hostname>"
      port: 443
      access: read-only
      enforcement: enforce

process:
  run_as_user: sandbox
  run_as_group: sandbox
  deny_syscall_categories:
    - privilege_escalation

credentials:
  allowed_env:
    - TERM
    - PATH
    - HOME
  denied_env: []
  providers: []
  1. Write the policy to sigil-policy.yaml in the project root
  2. Explain the policy — For each section, explain what it restricts and why

Policy Severity Mapping

Scan Verdict Network Policy Credential Policy Process Policy
CLEAN permissive allow common standard
LOW RISK standard endpoints allow declared standard
MEDIUM RISK strict allowlist minimal sandboxed user
HIGH RISK deny all deny all full restrictions
CRITICAL deny all + log deny all full restrictions

Rules

  • Always explain WHY each restriction exists (reference the specific finding)
  • For CLEAN scans, still generate a minimal security policy
  • Include comments in the YAML explaining each rule
  • Suggest the user review and customize before applying

Read the full file on GitHub · 77 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. 1mo ago First seen · 77 lines · 17 tokens per session scan A e27884e83e40

Subscribe to this mod's changes

generate-policy is a skill published in the GitHub repository NOMARJ/sigil (6 stars, last pushed 12d ago), licensed Apache-2.0. It adds 17 tokens to every session and 549 once invoked, about $0.0001 per session on Opus 5.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-09-04.

Related

Other skills, from other repositories

modal-sandboxes

Connect Modal and create reusable cloud machines with the bundled standard image, on-demand daemon installation, and snapshot lifecycle.

get-bb/bb · 27 tokens

share-server-links

Expose a local HTTP server through BB Connect and give the user its remotely accessible URL.

get-bb/bb · 21 tokens

huawei-cloud-devbridge-tunnel

Create and manage DevBridge development tunnels on Huawei Cloud to securely expose local development services to remote devices. Based on DevBridge CLI v0.2.x and API Key authentication. Use this skill when the user wants to: (1) install and configure the DevBridge CLI, (2) create/list/update/delete tunnels, (3)…

huaweicloud/huaweicloud-skills · 183 tokens

huawei-cloud-modelarts-notebook-management

Manage Huawei Cloud ModelArts Notebook instances through full lifecycle operations via hcloud CLI. Covers 31 API interfaces across 7 functional domains: instance management (create/list/show/update/delete/start/stop), lease management (show/renew), tag management (show/create/delete), image management…

huaweicloud/huaweicloud-skills · 194 tokens

sandy

Run TypeScript scripts in sandboxed microVMs or Docker containers with AWS SDK access via IMDS. Use when investigating AWS resources, running read-only queries, or executing TypeScript automation that needs AWS credentials.

jamestelfer/sandy · 45 tokens

sandy-cli

Run TypeScript scripts in sandboxed microVMs or Docker containers with AWS SDK access via IMDS, through the sandy CLI. Use when investigating AWS resources, running read-only queries, or executing TypeScript automation that needs AWS credentials via shell commands.

jamestelfer/sandy · 54 tokens