agents-harden

Audit and harden AgentCore agents for production security, quotas, and performance.

1|Updated Aug 1, 2024
One-click install
npx skills add https://github.com/obispobruno/dotfiles --skill agents-harden-obispobruno
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agents-harden
Source: https://github.com/obispobruno/dotfiles/tree/main/dot_agents/skills/agents-harden
Command: npx skills add https://github.com/obispobruno/dotfiles --skill agents-harden-obispobruno

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Taking an AWS Bedrock AgentCore agent from development to production requires reviewing IAM scoping, inbound authentication, secrets handling, session lifecycle, cold start performance, and service quotas — a checklist that is easy to get wrong and costly to miss. ## Core Features & Use Cases - Security hardening: Scope down IAM execution roles, configure SigV4 or CUSTOM_JWT inbound auth, audit InvokeAgentRuntimeCommand permissions, and eliminate hardcoded secrets or plaintext env-var credentials. - Performance and lifecycle tuning: Optimize cold starts via session reuse and package size budgets, configure idleRuntimeSessionTimeout and maxLifetime per workload, and keep long-running background tasks alive with the async task API. - Quota diagnosis and increase requests: Map throttling and maxVms errors to the right quota, apply mitigations before requesting increases, and submit Service Quotas requests with a ready-made justification template. - Use Case: Before launching a customer-facing support agent, run this skill to produce a project-specific production readiness checklist covering auth config, secret storage, session lifecycle, and quota headroom. ## Quick Start Ask the agent to run a production readiness review of your AgentCore project and generate a hardening checklist.

Frequently Asked Questions about agents-harden

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prepare an AgentCore agent for production?▼

Run a structured checklist covering IAM scoping, inbound auth (AWS_IAM or CUSTOM_JWT), secrets management, input validation, session lifecycle configuration, cold start optimization, and quota review. The skill reads your agentcore.json and reports findings specific to your project.

How do I fix ServiceQuotaExceededException maxVms limit exceeded?▼

Call StopRuntimeSession after each invocation, reuse session IDs across related requests, and lower idleRuntimeSessionTimeout for short-lived workloads before requesting an increase. Idle environments count against maxVms until reclaimed, so most cases are session lifecycle issues, not true concurrency.

Should I use allowedClients or allowedAudience for JWT auth?▼

Decode a sample token from your identity provider. If it has a client_id claim but no aud claim, configure allowedClients; if it has an aud claim, configure allowedAudience. Picking the wrong one causes 403 errors even with valid tokens.

Can I store API keys in AgentCore runtime environment variables?▼

No. Runtime environment variables are plaintext config values, not vault-backed secrets. Register credentials with agentcore add credential and fetch them in code via the @requires_api_key or @requires_access_token decorators, which pull from Secrets Manager at call time.

How do I reduce AgentCore cold start latency?▼

Reuse session IDs so requests route to warm environments, keep deployment packages under 200 MB, and defer heavy imports and client initialization until first request rather than module import time. Session reuse is the highest-leverage optimization.

When should I not use this hardening skill?▼

Use agents-connect for Cedar tool-restriction policies and outbound credential wiring, agents-optimize for quality measurement, agents-build for A2A agent-to-agent auth, and agents-debug for cold start observation and diagnosis rather than optimization.