Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aws-samples avatar

Bedrock

  • 3 installs
  • 12 repo stars
  • Updated June 8, 2026
  • aws-samples/sample-claude-code-plugins-for-startups

bedrock is a Claude Code skill that guides model selection, agent design, knowledge bases, guardrails, and cost modeling on Amazon Bedrock.

About

This skill gives Claude Code specialist guidance for building on Amazon Bedrock. It covers picking a foundation model, designing Bedrock agents and knowledge bases, configuring guardrails, prompt engineering and estimating costs. A developer uses it when building RAG, agents or generative-AI features on AWS and wants a defensible model and architecture choice.

  • Bedrock model-selection matrix (Nova, Claude, Titan) by task, latency and cost
  • Agent design, knowledge-base chunking and guardrail patterns
  • Cost-modeling template and prompt-caching guidance

Bedrock by the numbers

  • 3 all-time installs (skills.sh)
  • Ranked #892 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

bedrock capabilities & compatibility

Free skill; running the resulting Bedrock workloads incurs AWS model and vector-store costs.

Capabilities
bedrock · cost check · customer ideation
Works with
aws · anthropic · postgres
Use cases
research · api development
Pricing
Free
From the docs

What bedrock says it does

Specialist guidance for Amazon Bedrock. Covers model selection, agent design, knowledge bases, guardrails, prompt engineering, batch inference, and cost optimization.
SKILL.md
The model choice is the single biggest cost and quality decision. Get this right first.
SKILL.md
One agent, one job. If the agent description contains "and", consider splitting.
SKILL.md
npx skills add https://github.com/aws-samples/sample-claude-code-plugins-for-startups --skill bedrock

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3
repo stars12
Last updatedJune 8, 2026
Repositoryaws-samples/sample-claude-code-plugins-for-startups

What it does

Design a Bedrock model, agent, or RAG knowledge base on AWS with cost and guardrail decisions made explicit.

Who is it for?

Choosing a Bedrock foundation model and designing agents, RAG knowledge bases and guardrails on AWS.

Skip if: Non-AWS LLM stacks or generic prompt engineering unrelated to Bedrock.

When should I use this skill?

The user asks to build with Bedrock, select a Bedrock model, design a Bedrock agent, set up a knowledge base, or estimate Bedrock costs.

What you get

A justified model choice plus an agent, RAG or knowledge-base architecture with cost controls.

  • Model selection recommendation
  • Agent or RAG architecture
  • Guardrail configuration

By the numbers

  • 7-step process
  • 3-5 tools is the agent sweet spot
  • cached input tokens up to 90% cheaper

Files

SKILL.mdMarkdownGitHub ↗

Specialist guidance for Amazon Bedrock. Covers model selection, agent design, knowledge bases, guardrails, prompt engineering, batch inference, and cost optimization.

Process

1. Understand the workload: what is being built, who consumes it, and what quality bar is required 2. Use the awsknowledge MCP tools (mcp__plugin_aws-dev-toolkit_awsknowledge__aws___search_documentation, mcp__plugin_aws-dev-toolkit_awsknowledge__aws___read_documentation, mcp__plugin_aws-dev-toolkit_awsknowledge__aws___recommend) to verify current Bedrock model availability, pricing, and features (these change frequently) 3. Select the right model(s) based on task complexity, latency, and cost 4. Design the architecture: direct invocation, RAG, agent, or multi-agent 5. Configure guardrails for user-facing surfaces 6. Estimate costs using the references/cost-modeling.md template 7. Recommend monitoring and cost controls

Model Selection

The model choice is the single biggest cost and quality decision. Get this right first.

NeedRecommended ModelWhy
Classification, routing, extractionNova Micro or Claude HaikuFast, cheap, accurate for structured tasks
General Q&A, summarizationNova Lite or Nova ProStrong quality-to-cost ratio
Multimodal (image + text)Nova LiteCost-effective vision without Sonnet pricing
Complex reasoning, nuanced generationClaude SonnetBest balance of capability and cost
Hardest problems, highest quality barClaude OpusReserve for tasks where Sonnet falls short
EmbeddingsTitan Embed v2Cheaper than Cohere, solid quality for most use cases
Code generationClaude SonnetStrong code quality without Opus pricing

Note: Model availability and pricing change frequently. Verify current options via awsknowledge MCP tools (mcp__plugin_aws-dev-toolkit_awsknowledge__aws___search_documentation, mcp__plugin_aws-dev-toolkit_awsknowledge__aws___read_documentation, mcp__plugin_aws-dev-toolkit_awsknowledge__aws___recommend) before making final recommendations.

Model Selection Principles

  • Start with the smallest model that could work. Upgrade only when evidence shows it falls short.
  • Benchmark on real data, not generic benchmarks. A smaller well-prompted model often beats a larger general one.
  • Use Bedrock's intelligent prompt routing to auto-route requests to the right model tier.
  • Evaluate the Nova family before defaulting to third-party models — Nova Pro offers comparable quality to Claude Sonnet for many tasks at significantly lower cost per token, and Nova Lite/Micro provide sub-100ms latency for classification and routing tasks where you don't need full reasoning capability. Nova models also have no cross-provider data transfer fees and deeper native Bedrock integration (Guardrails, Knowledge Bases, Flows).

Bedrock Agents

Design Principles

  • One agent, one job. If the agent description contains "and", consider splitting.
  • Fewer tools = fewer reasoning steps = faster + cheaper. 3-5 tools is the sweet spot.
  • Use direct InvokeModel for simple tasks. Not everything needs an agent.

Architecture Patterns

Router + Specialists: A lightweight classifier (Nova Micro) routes to specialized agents. Each specialist has a focused tool set and optimized prompt. This beats one mega-agent with 20 tools.

Knowledge Base + Guardrails: For customer-facing Q&A — KB for retrieval, guardrails for safety, single model call for generation. No agent orchestration needed; use RetrieveAndGenerate API directly.

Agent with Session Memory: For multi-turn conversations — use AgentCore sessions with memory. Let the agent maintain context across turns instead of stuffing history into the prompt each time.

Action Groups

  • Use Lambda-backed action groups for complex logic
  • Use Return Control for client-side tool execution (keeps agent stateless, avoids Lambda cost)
  • Define OpenAPI schemas tightly — vague schemas cause the model to guess (and guess wrong)

Knowledge Bases

Chunking Strategy

  • Fixed-size chunking (default): Good starting point. 300-500 tokens with 10-20% overlap.
  • Semantic chunking: Better quality, higher embedding cost. Use for high-value, heterogeneous documents.
  • Hierarchical chunking: Best for long documents with clear structure (manuals, legal docs).
  • Curate the data source — garbage in, garbage out applies doubly to RAG.

Vector Store Selection

  • OpenSearch Serverless: Default choice. Managed, scales, integrates natively. See references/cost-modeling.md for minimum costs.
  • Aurora PostgreSQL (pgvector): Good if already running Aurora — consolidates infrastructure.
  • Pinecone / Redis: If existing investments in these stores.
  • For PoCs, share a single OpenSearch Serverless collection across multiple KBs to minimize cost.

Retrieval Tuning

  • Start with hybrid search (semantic + keyword) — outperforms pure semantic for most workloads
  • Tune retrieved chunk count (default 5). More chunks = more context = more input tokens. Find the minimum that gives good answers.
  • Use metadata filtering to scope retrieval — avoid searching everything when the document category is known.

Prompt Engineering on Bedrock

Prompt Caching

  • Bedrock caches repeated system prompts automatically for supported models
  • Structure prompts: long, stable system prompt + short, variable user prompt
  • Cached input tokens are up to 90% cheaper — structure prompts to maximize cache hits

Prompt Management

  • Use Bedrock's Prompt Management to version and manage prompts
  • Treat prompts like code — version them, test them, review changes
  • Use prompt variables for dynamic content instead of string concatenation

Structured Output

  • Request JSON with explicit schemas to reduce output token waste
  • Use the Converse API with tool use for structured extraction — more reliable than asking for JSON in the prompt

Batch Inference

  • 50% cheaper than on-demand for supported models
  • Use for: document processing, bulk classification, dataset enrichment, eval runs
  • Not for: real-time user-facing requests (latency is minutes to hours)
  • Submit jobs via S3 input/output — fits naturally into data pipelines

Guardrails

  • Apply to user-facing inputs and outputs. Skip for internal agent reasoning steps.
  • Content filters are cheaper than denied topic policies — use filters for broad categories, denied topics for specific restrictions.
  • Contextual grounding checks catch hallucination at inference time — useful for RAG apps.
  • PII detection/redaction is built in — use it instead of building custom regex.

Diagnostic CLI Commands

Resource creation belongs in IaC. Use the iac-scaffold skill for templates.

# List available models in the region
aws bedrock list-foundation-models \
  --query 'modelSummaries[].{id:modelId,name:modelName,provider:providerName}' --output table

# Quick model test (Converse API — preferred over invoke-model)
aws bedrock-runtime converse \
  --model-id amazon.nova-micro-v1:0 \
  --messages '[{"role":"user","content":[{"text":"Hello"}]}]'

# List agents
aws bedrock-agent list-agents --output table

# List knowledge bases
aws bedrock-agent list-knowledge-bases --output table

# List guardrails
aws bedrock list-guardrails --output table

# Check model invocation logging status
aws bedrock get-model-invocation-logging-configuration

Anti-Patterns

  • Defaulting to the biggest model "just to be safe" — start small, upgrade with evidence
  • Building an agent when a single InvokeModel call would do — agents compound cost per turn
  • Stuffing entire documents into prompts instead of using Knowledge Bases — RAG is cheaper and more maintainable
  • Ignoring prompt caching — it is automatic for supported models, just structure prompts correctly
  • Using on-demand for bulk processing that could be batch — 50% savings left on the table
  • One massive Knowledge Base instead of scoped, curated collections — hurts retrieval quality and costs more
  • Skipping guardrails on user-facing apps — "we'll add them later" becomes a security incident
  • Not monitoring token usage — costs sneak up fast during iteration, especially with agents

Additional Resources

Reference Files

For detailed cost modeling and estimation, consult:

  • `references/cost-modeling.md` — Pricing model breakdown, cost modeling template, optimization strategies, monitoring setup, and cost estimation output format

Related Skills

  • `cost-check` — Broader AWS cost analysis beyond Bedrock
  • `iac-scaffold` — IaC templates for Bedrock resource creation
  • `security-review` — Security audit for Bedrock configurations and guardrail policies

Output Format

When advising on a Bedrock solution:

ComponentChoiceRationale
Primary modelClaude SonnetComplex reasoning required, cost-effective for the quality bar
Routing modelNova MicroCheap classifier for request triage
ArchitectureRouter + Specialist agents3 focused agents vs 1 mega-agent
Knowledge BaseOpenSearch Serverless, hybrid searchBest retrieval quality, managed infrastructure
GuardrailsContent filters + PII redactionCustomer-facing surface
Estimated monthly cost$X,XXXSee references/cost-modeling.md for breakdown

Include cost profile and watch-out-for items specific to the use case.

Related skills

FAQ

Which Bedrock model should I start with?

Start with the smallest model that could work (Nova Micro or Claude Haiku for classification), and upgrade only when evidence shows it falls short.

Do I always need a Bedrock agent?

No. Use direct InvokeModel for simple tasks; for customer-facing Q&A use RetrieveAndGenerate with a knowledge base and guardrails, no agent orchestration needed.

Cloud & Infrastructurellmagentsresearch

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.