Policy Configuration Hierarchy

Policy Configuration Hierarchy is a skill for Claude Code, Codex from TheArchitectit/agent-guardrails-template. It costs 17 tokens per session (696 once invoked), scanned A, original, BSD-3-Clause.

A rule system with three configuration levels: organization, team, and project. Rules from higher levels provide defaults, while lower levels override them through a deep merge, meaning nested objects combine and arrays are replaced.

In plain words
What is it for?
Use it to configure tool permissions, strike limits, compliance rules, and other guardrails at company, team, or project level.
Why use it?
It lets shared guardrails apply broadly while still allowing a team or individual project to change the settings that need different treatment.

Skill for Claude CodeCodex

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

Good fit Use it to configure tool permissions, strike limits, compliance rules, and other guardrails at company, team, or project level.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thearchitectit/agent-guardrails-template/policy-config
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 TheArchitectit/agent-guardrails-template --skill policy-config
Clone the repo
git clone --depth 1 https://github.com/TheArchitectit/agent-guardrails-template

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 Policy Configuration Hierarchy

README.md
[![agentmods](https://agentmods.dev/badge/skills/thearchitectit/agent-guardrails-template/policy-config/github.svg)](https://agentmods.dev/skills/thearchitectit/agent-guardrails-template/policy-config)
Your own site
<a href="https://agentmods.dev/skills/thearchitectit/agent-guardrails-template/policy-config"><img src="https://agentmods.dev/badge/skills/thearchitectit/agent-guardrails-template/policy-config/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 Policy Configuration Hierarchy

Your own site · 80×15
<a href="https://agentmods.dev/skills/thearchitectit/agent-guardrails-template/policy-config"><img src="https://agentmods.dev/badge/skills/thearchitectit/agent-guardrails-template/policy-config.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 696 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.00017 $0.00696
Opus 5 $0.00009 $0.00348
Sonnet 5 $0.00003 $0.00139
Haiku 4.5 $0.00002 $0.00070

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

Security

Grade A, and why

Policy Configuration Hierarchy 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.

pi-extension/skills/policy-config/SKILL.md · 78 lines

How it starts

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

Policy Configuration Hierarchy

Guardrail policies are loaded from three layers, with later layers overriding earlier ones via deep merge. This allows organizations to set baseline rules, teams to tighten them, and projects to customize further.

Three Policy Layers

Layer Location Priority Typical Use
Organization ~/.pi/guardrails-org.json or PI_GUARDRAILS_ORG_CONFIG Lowest (base) Company-wide defaults, compliance requirements
Team ~/.pi/teams/{name}/guardrails.json or PI_GUARDRAILS_TEAM={name} Middle Team-specific rules, project-type constraints
Project {cwd}/.pi-guardrails.json or {cwd}/.pi/guardrails.json Highest Per-project customization, local overrides

Deep Merge Behavior

Later layers deep-merge into earlier layers:

  • Primitive values: Later layer wins ("maxStrikes": 5 overrides "maxStrikes": 3)
  • Objects: Merged recursively (team can add keys without losing org defaults)
  • Arrays: Later layer replaces earlier array entirely (not concatenated)

Example:

// Organization: ~/.pi/guardrails-org.json
{
  "maxStrikes": 3,
  "toolPermissions": { "tools": { "bash": "ask" } },
  "outputValidation": { "autoRedact": true }
}

// Team: ~/.pi/teams/backend/guardrails.json
{
  "maxStrikes": 5,
  "toolPermissions": { "tools": { "bash": "auto" } }
}

// Merged result for backend team:
{
  "maxStrikes": 5,                    // team overrides org
  "toolPermissions": {
    "tools": { "bash": "auto" }       // team overrides org
  },
  "outputValidation": { "autoRedact": true }  // inherited from org
}

Environment Variables

Variable Purpose
PI_GUARDRAILS_ORG_CONFIG Override org config file path
PI_GUARDRAILS_TEAM Team name to load team policy

What This Means For You

  1. Check guardrail_status at session start to see the effective configuration
  2. Do not assume defaults — your organization may have stricter rules
  3. Respect the hierarchy — if a tool is blocked at org level, a project override does not unblock it (unless the project policy explicitly does so)
  4. When uncertain, default to the stricter interpretation

Read the full file on GitHub · 78 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 · 78 lines · 17 tokens per session scan A 872a64cbceed

Subscribe to this mod's changes

Policy Configuration Hierarchy is a skill published in the GitHub repository TheArchitectit/agent-guardrails-template (79 stars, last pushed yesterday), licensed BSD-3-Clause. It adds 17 tokens to every session and 696 once invoked, about $0.0001 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

construction-expert

Expert-level construction management, project planning, BIM, safety compliance, and construction technology. Use when the user mentions BIM, project management, safety, or building, or when the task involves Construction Management, Technologies, Standards and Regulations, or Cost Control.

personamanagmentlayer/pcl · 54 tokens

pydantic-ai

Build production-ready AI agents with PydanticAI — type-safe tool use, structured outputs, dependency injection, and multi-model support.

davila7/claude-code-templates · 32 tokens

edgeone skill scanner

A local static scanner that checks agent-skill files for security risks before they are installed or used. Static analysis examines files without running them.

Tencent/AI-Infra-Guard · 148 tokens

connect-agent

Connect the codebase's AI agent to LangWatch agent simulations, so test suites run against the real agent process. Adds a small connect function beside the service startup that calls the agent already in the codebase, which opens an outbound connection and registers the agent with its environment and its run…

langwatch/langwatch · 102 tokens

dashboard-widgets

Author a dashboard widget — a small React component backed by named LangWatchQL queries — from a plain question. Discovers the analytics schema, writes the queries, writes the widget file, saves it, then proves it renders. Use when asked to build, prototype, or iterate on a custom chart widget, or to add a widget…

langwatch/langwatch · 79 tokens

agent-improve

Turns production evidence into tested improvements for your AI agent. Forms hypotheses from real traces and analytics, explains the reasoning behind each one, then executes with the user: scenario tests that reproduce production failures, prompt and code changes as reviewable PRs, new evaluators and monitors that…

langwatch/langwatch · 0 tokens