bedrock-converse-client
Bedrock runtime Converse/ConverseStream API patterns: message structure, model ID selection, token limits, system prompts, retry with tenacity, error…
Skill by Cloud-Byte-Consulting
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/cloud-byte-consulting-bedrock-converse-client
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/bedrock-converse-client
What's inside
- Skill name
bedrock-converse-client- Description
- Bedrock runtime Converse/ConverseStream API patterns: message structure, model ID selection, token limits, system prompts, retry with tenacity, error handling, and async client management. Use when making Bedrock API calls from pr-reviewer-consumer or ops-intel-reporter.
- License
- BSD-3-Clause
- Instructions
- 161 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
<!-- Vendored from: platform-catalyst/skills/bedrock-converse-client/SKILL.md (BittahCriminal/platform-catalyst, BSD-3-Clause). Adapted for Catalyst: PLAN.md/CLAUDE.md/DECISIONS.md scrubbed; ADR-008->ADR-001, ADR-009->ADR-002. -->
# Bedrock Converse client
## Role
You guide implementation of Bedrock Converse API calls in Catalyst services, ensuring correct message structure, model selection, and error handling per `AGENTS.md` Bedrock-specific guidance.
## Instructions
### 1. Async client setup
```python
import aioboto3
from types import TracebackType
class BedrockClient:
"""Async Bedrock runtime client with connection reuse."""
def __init__(self, region: str = "us-east-1"):
self._session = aioboto3.Session()
self._region = region
self._client = None
async def __aenter__(self):
self._client = await self._session.client(
"bedrock-runtime", region_name=self._region
).__aenter__()
return self
async def __aexit__(self, *exc):
if self._client:
await self._client.__aexit__(*exc)
```
### 2. Model IDs (runtime configuration)
```python
from dataclasses import dataclass
import os
@dataclass(frozen=True)
class BedrockModels:
reviewer: str
summarizer: str
def load_models() -> BedrockModels:
return BedrockModels(
reviewer=os.environ["CATALYST_BEDROCK_MODEL_REVIEWER"],
summarizer=os.environ["CATALYST_BEDROCK_MODEL_SUMMARIZER"],
)
```
### 3. Converse API call
```python
from tenacity import retry, stop_after_attempt, wait_exponential, retry_if_exception_type
from botocore.exceptions import ClientError
@retry(
stop=stop_after_attempt(2),
wait=wait_exponential(multiplier=1, min=1, max=5),
retry=retry_if_exception_type(ClientError),
)
async def converse(
self,
model_id: str,
system_prompt: str,
user_message: str,
max_tokens: int = 4096,
temperature: float = 0.0,
) -> dict:
"""Call Bedrock Converse API with retry on transient errors."""
response = await self._client.converse(
modelId=model_id,
messages=[
{
"role": "user",
"content": [{"text": user_message}],
}
],
system=[{"text": system_prompt}],
inferenceConfig={
"maxTokens": max_tokens,
"temperature": temperature,
},
)
return response
```
### 4. Response extraction
```python
def extract_text(response: dict) -> str:
"""Extract text content from Converse API response."""
output = response.get("output", {})
message = output.get("message", {})
content = message.get("content", [])
return "".join(block.get("text", "") for block in content)
def extract_usage(response: dict) -> dict:
"""Extract token usage from Converse API response."""
usage = response.get("usage", {})
return {
"input_tokens": usage.get("inputTokens", 0),
"output_tokens": usage.get("outputTokens", 0),
"total_tokens": usage.get("inputTokens", 0) + usage.get("outputTokens", 0),
}
```
### 5. Streaming (ConverseStream)
```python
async def converse_stream(
self,
model_id: str,
system_prompt: str,
user_message: str,
max_tokens: int = 4096,
) -> AsyncIterator[str]:From Cloud-Byte-Consulting/Catalyst, BSD-3-Clause.
More from Cloud-Byte-Consulting/Catalyst
- 0.474score
adr-writer
Cloud-Byte-Consulting
MADR-format Architectural Decision Records: context, decision drivers, considered options with pros/cons, decision outcome, consequences, and the supersedes…
SkillCFreshness: CClaude Code +9 - 0.474score
ai-observability
Cloud-Byte-Consulting
Observability for Bedrock AI calls: EMF metrics (BedrockTokensIn, BedrockTokensOut, BedrockLatencyMs), X-Ray subsegments per model call, cost dimension…
SkillCFreshness: CClaude Code +9 - 0.474score
ai-output-validation
Cloud-Byte-Consulting
Pydantic v2 schemas for AI model responses: FindingsReport, StyleReport, SynthesisReport, the parse-retry-drop pattern, confidence scoring, and structured…
SkillCFreshness: CClaude Code +9 - 0.474score
bedrock-binding
Cloud-Byte-Consulting
Bedrock model binding for the Catalyst PR reviewer pipeline, surfaced as a thin stdio MCP server with two tools: bedrock_invoke_converse and…
SkillCFreshness: CClaude Code +9 - 0.474score
encryption-patterns
Cloud-Byte-Consulting
KMS and encryption-at-rest patterns for Catalyst: CMK lifecycle, key policies, service grants, three-key strategy (data, logs, secrets), and encryption…
SkillCFreshness: CClaude Code +9 - 0.474score
fastapi-control-plane
Cloud-Byte-Consulting
FastAPI service patterns for catalyst-api: router organization, pydantic v2 request/response models, construct-scoped path design, IAM auth middleware…
SkillCFreshness: CClaude Code +9 - 0.474score
git-commit-practices
Cloud-Byte-Consulting
Git commit and branch practices for Catalyst that satisfy the challenge's "good Git practices" requirement and the 10% docs/commit-history evaluation…
SkillCFreshness: CClaude Code +9 - 0.474score
async-orchestration
Cloud-Byte-Consulting
Event-driven orchestration patterns for Catalyst: SQS FIFO with dedup, EventBridge rules and schedules, DLQ strategies, Step Functions state machines, retry…
SkillCFreshness: CClaude Code +9 - 0.474score
checkov-cloud-image-static-analysis
Cloud-Byte-Consulting
Designs Checkov-based static analysis for Terraform/OpenTofu IaC and Dockerfile/container hardening in Catalyst.
SkillCFreshness: CClaude Code +9 - 0.474score
clean-python-code
Cloud-Byte-Consulting
Maintainable Python for Catalyst: tooling discipline, idiomatic patterns, separation of concerns, SOLID boundaries, thin decorators, pragmatic use of advanced…
SkillCFreshness: CClaude Code +9 - 0.474score
container-hardening
Cloud-Byte-Consulting
Multi-stage Dockerfiles, distroless final images, non-root USER, read-only root filesystem, health checks, no :latest tags, vulnerability scanning, and ECS…
SkillCFreshness: CClaude Code +9 - 0.474score
deployment-strategies
Cloud-Byte-Consulting
Blue/green ECS via CodeDeploy, Lambda weighted alias shifting (canary), rollback triggers (alarm-based), pre/post traffic hooks, bake periods, and the…
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 57
- Last commit (this folder)
- May 21, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- BSD-3-Clause
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Cloud-Byte-Consulting
- 0.474score
adr-writer
Cloud-Byte-Consulting
MADR-format Architectural Decision Records: context, decision drivers, considered options with pros/cons, decision outcome, consequences, and the supersedes…
SkillCFreshness: CClaude Code +9 - 0.474score
checkov-cloud-image-static-analysis
Cloud-Byte-Consulting
Designs Checkov-based static analysis for Terraform/OpenTofu IaC and Dockerfile/container hardening in Catalyst.
SkillCFreshness: CClaude Code +9 - 0.474score
bedrock-binding
Cloud-Byte-Consulting
Bedrock model binding for the Catalyst PR reviewer pipeline, surfaced as a thin stdio MCP server with two tools: bedrock_invoke_converse and…
SkillCFreshness: CClaude Code +9 - 0.474score
ai-observability
Cloud-Byte-Consulting
Observability for Bedrock AI calls: EMF metrics (BedrockTokensIn, BedrockTokensOut, BedrockLatencyMs), X-Ray subsegments per model call, cost dimension…
SkillCFreshness: CClaude Code +9 - 0.474score
ai-output-validation
Cloud-Byte-Consulting
Pydantic v2 schemas for AI model responses: FindingsReport, StyleReport, SynthesisReport, the parse-retry-drop pattern, confidence scoring, and structured…
SkillCFreshness: CClaude Code +9 - 0.474score
clean-python-code
Cloud-Byte-Consulting
Maintainable Python for Catalyst: tooling discipline, idiomatic patterns, separation of concerns, SOLID boundaries, thin decorators, pragmatic use of advanced…
SkillCFreshness: CClaude Code +9
Cite this page
bedrock-converse-client skill. Agent Mart. https://agentmart.dev/skills/cloud-byte-consulting-bedrock-converse-client (last updated 2026-10-24)