Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

writing-agentcore-policy

БесплатноЗапускает вложенные скриптыНе проверен

Authors, validates and submits Amazon Bedrock AgentCore Policy statements (Cedar and Dogwood) for an AgentCore Gateway. Discovers the Gateway's targets and…

awsот aws★ 3 696 звёзд на GitHub

Об этом скилле

Writing AgentCore Policy

Overview

Turns a developer's access requirements, or a whole natural-language policy document, into AgentCore Policy statements that the policy engine accepts. Policies are grounded in the Gateway's real tools and generated Cedar schema, checked locally before submission, and written only after the developer approves the exact request.

The AWS MCP server is recommended for sandboxed execution and audit logging but is not required: every step runs with the bundled Python CLI and the AWS CLI.

Workflow:

  1. Prepare the policy context (Gateway discovery or local schema files).
  2. Look up the schemas of the actions the policy names.
  3. Draft, store and validate the statement (or every rule of a policy document); revise until local findings are resolved.
  4. Preview the write, get explicit approval, submit, and report the final status and findings.

Guardrail — where this skill's own files live (MCP vs local install)

This skill can be loaded two ways, and they resolve the skill's own bundled files from different places. Determine how the skill was loaded before reading a reference or running a script:

  • Loaded through the AWS MCP retrieve_skill tool: The skill is not installed on the local filesystem. You MUST fetch each reference or script via retrieve_skill with the file parameter (e.g. file="references/dogwood-language.md" or file="scripts/agentcore_policy.py"), and run the script from the returned content. Do NOT file_read these paths locally — they do not exist on disk.
  • Installed locally (e.g. .kiro/skills/writing-agentcore-policy/ or ~/.claude/skills/writing-agentcore-policy/): Read and run files from the local skill directory using relative paths.

This distinction applies only to the skill's own packaged files. User data and session artifacts are always read from and written to the user's working directory. Never fetch or write customer data through retrieve_skill.

Runtime requirements

The scripts run wherever a Python interpreter is available: preferably the AWS MCP run_script sandbox, or the agent's local shell. On hosts without a Python interpreter, this skill is guidance only. Run doctor before anything else and act on each check below.

Check Needed for If it fails
Python 3.10+ (python.ok) everything stop scripted steps; continue as guidance only
boto3, cedarpy==4.12.2, cedar-policy-mcp-schema-generator==0.6.1 (packages.<name>.ok) discovery, schema generation, Cedar validation, submission Check Python packages
AWS credentials (verify-aws) Gateway route, pre-existing policies, submission Check AWS credentials
PyYAML==6.0.3, optional (packages.PyYAML.ok) reading YAML schema files only Check Python packages
Dogwood CLI, optional (dogwood.ok) local checks of Dogwood statements only Check the Dogwood CLI
Browser and local port 8765 OAuth sign-in for CUSTOM_JWT Gateways only Step 1

Rules for every check: tell the developer, once and in plain words, what is missing, what it is needed for, and the exact install or fix command from the doctor output (message, install). You MUST NOT install software or change the developer's configuration yourself; if they ask you to, briefly explain that installing tooling on their machine is their decision and give them the command. After they say it is done, rerun doctor. Never block on an optional check.

Required files: agentcore_policy.py, acp_common.py, acp_context.py, acp_discovery.py, acp_mcp_client.py, acp_oauth.py, acp_oauth_callback.py, acp_schemas.py, acp_cedar_schema.py, acp_validation.py, [acp_api.py](scripts/acp_api.p

Полный SKILL.md на GitHub

Установить writing-agentcore-policy в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/agentcore.cedarschemaassets/agentcore.dwschemaassets/inference-default.jsonassets/providers.jsonreferences/agentcore-service-rules.mdreferences/agentcore-targets-and-effects.mdreferences/document-authoring.mdreferences/dogwood-language.mdreferences/interpreting-findings.mdscripts/acp_api.pyscripts/acp_cedar_schema.pyscripts/acp_common.pyscripts/acp_context.pyscripts/acp_discovery.pyscripts/acp_mcp_client.pyscripts/acp_oauth.pyscripts/acp_oauth_callback.pyscripts/acp_schemas.pyscripts/acp_validation.pyscripts/agentcore_policy.py

FAQ

Что делает скилл writing-agentcore-policy?

Authors, validates and submits Amazon Bedrock AgentCore Policy statements (Cedar and Dogwood) for an AgentCore Gateway. Discovers the Gateway's targets and tools, generates the Gateway's Cedar schema, drafts permit/forbid, guardrail and temporal policies from access requirements or from a whole natural-language policy document (splitting it into rules, marking the rules that cannot be expressed, and repairing failing drafts in batches), checks them locally (syntax, schema, API limits, claim and guardrail pitfalls), and creates or updates them in a policy engine after explicit developer approval, reporting the final status and service findings. Use when a developer wants to write, translate, fix, validate or submit AgentCore Gateway policies, convert a policy document or a list of rules into policies, restrict which users or roles can call Gateway tools, add Bedrock guardrail or session-history (temporal) conditions, or resolve CreatePolicy/UpdatePolicy failures.

Как установить скилл writing-agentcore-policy?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл writing-agentcore-policy запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить writing-agentcore-policy с