
Modify Agent Prompts
- 1 installs
- 84 repo stars
- Updated August 4, 2026
- aws-samples/review-and-assessment-powered-by-intelligent-documentation
Modify Agent Prompts is a Claude Code skill that edits the RAPID review-item-processor agent's prompts, model config, confidence thresholds, output schemas, and tools.
About
Modify Agent Prompts is a guide for changing the RAPID review-item-processor agent's prompts, model configuration, confidence thresholds, JSON output schemas, and tool setup. It documents the agent architecture (agent.py, model_config.py, tools/) and how to edit document and image review prompts, register new models with cost and capability metadata, add environment variables through CDK, and add new tools. A developer uses it when adjusting review prompts, swapping Bedrock model IDs, or changing output format. It ends by pointing to build-and-format and deploy-cdk-stack.
- Modifies the review-item-processor agent's document and image review prompts and JSON output schemas
- Configures model IDs, confidence thresholds, citations, and code-interpreter via CDK env vars
- Covers adding new tools, models, and environment variables with a quick-reference file map
Modify Agent Prompts by the numbers
- 1 all-time installs (skills.sh)
- Ranked #14,102 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
modify-agent-prompts capabilities & compatibility
- Capabilities
- prompt editing · model configuration · agent tooling
- Works with
- aws
- Use cases
- documentation · refactoring
- Pricing
- Free
What modify-agent-prompts says it does
agent.py # Prompt generators + agent execution
Change models via CDK
npx skills add https://github.com/aws-samples/review-and-assessment-powered-by-intelligent-documentation --skill modify-agent-promptsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 84 |
| Last updated | August 4, 2026 |
| Repository | aws-samples/review-and-assessment-powered-by-intelligent-documentation ↗ |
What it does
Change the RAPID review agent's prompts, model configuration, confidence thresholds, output schemas, and tools.
Who is it for?
Developers tuning the RAPID review agent's prompts, Bedrock model IDs, output schemas, or tools.
Skip if: Deploying the change (use deploy-cdk-stack) or building/formatting (use build-and-format).
When should I use this skill?
Changing document or image review prompts, adjusting model IDs, modifying output format, or adding tools to the agent.
What you get
- Updated agent prompts and JSON output schemas
- New or reconfigured models, env vars, and tools
By the numbers
- Five common modification types documented
- shortExplanation capped at max 80 chars in the JSON schema
Files
Modify Agent Prompts and Configuration
Agent Architecture
review-item-processor/
├── agent.py # Prompt generators + agent execution
├── model_config.py # Model registry with capabilities
├── tools/
│ ├── factory.py # Dynamic tool creation
│ ├── knowledge_base.py # Bedrock KB integration
│ ├── code_interpreter.py
│ └── mcp_tool.py # MCP tool support
└── index.py # Lambda handler entry pointCommon Modifications
1. Modifying Document Review Prompts
File: agent.py
Key functions:
get_document_review_prompt()- Main entry point_get_document_review_prompt_with_citations()- With citations_get_document_review_prompt_legacy()- Without citations
JSON Schema:
{
"result": "pass" | "fail",
"confidence": <number 0-1>,
"explanation": "<detailed reasoning>",
"shortExplanation": "<max 80 chars>",
"pageNumber": <integer from 1>,
"citations": ["<quoted text>", ...]
}2. Modifying Image Review Prompts
File: agent.py, function get_image_review_prompt()
JSON Schema (Nova models add boundingBoxes):
{
"result": "pass" | "fail",
"confidence": <number 0-1>,
"explanation": "<detailed reasoning>",
"shortExplanation": "<max 80 chars>",
"usedImageIndexes": [<list of indexes>]
}3. Model Configuration
Environment Variables (set in CDK):
DOCUMENT_PROCESSING_MODEL_ID,IMAGE_REVIEW_MODEL_ID,BEDROCK_REGIONENABLE_CITATIONS,ENABLE_CODE_INTERPRETER
Change models via CDK:
cdk deploy -c rapid.documentProcessingModelId="global.anthropic.claude-opus-4-5-20251101-v1:0"Add new model to model_config.py in _get_model_configs():
"model-id": ModelConfig(
model_id="model-id",
supports_document_block=True,
supports_citation=True,
supports_caching=True,
input_per_1k=0.XXX,
output_per_1k=0.XXX,
)4. Adding New Environment Variables
1. Define in cdk/lib/parameter-schema.ts 2. Pass to Lambda in cdk/lib/constructs/agent.ts 3. Read in agent.py with os.environ.get()
5. Adding New Tools
For detailed tool creation guide, see references/TOOL-CREATION.md.
Quick Reference
| Modification | Location | Search For |
|---|---|---|
| Document prompt schema | agent.py | _get_document_review_prompt |
| Image prompt schema | agent.py | get_image_review_prompt |
| Confidence guidelines | agent.py | confidence_guidelines |
| Tool usage instructions | agent.py | _build_tool_usage_section |
| Model capabilities | model_config.py | _get_model_configs |
| Environment variables | CDK agent.ts | environment: |
Troubleshooting
| Issue | Check |
|---|---|
| Citations not working | ENABLE_CITATIONS env var, model supports citations in model_config.py |
| Model not found | Model ID format, available in BEDROCK_REGION, added to model_config.py |
| Tool not available | Tool configuration in event payload, registered in factory.py |
| Wrong output format | JSON schema in prompt, {language_name} placeholders |
After Modification
1. Run /build-and-format if Python code changed 2. Run /deploy-cdk-stack if CDK changes made 3. Test with sample documents and monitor CloudWatch logs
Agent Tool Creation Guide
Reference for adding new tools to the review-item-processor agent.
Step 1: Create Tool Implementation
Create new file in review-item-processor/tools/:
# tools/my_new_tool.py
from strands.types.tools import AgentTool
def create_my_new_tool(config: dict) -> AgentTool:
"""Create custom tool with configuration"""
def tool_function(param1: str, param2: int) -> str:
"""
Tool description shown to the agent.
Args:
param1: Description of parameter 1
param2: Description of parameter 2
Returns:
Result description
"""
result = perform_action(param1, param2)
return result
return AgentTool.from_function(
tool_function,
name="my_new_tool",
description="What this tool does"
)Step 2: Register Tool in Factory
Edit tools/factory.py:
from tools.my_new_tool import create_my_new_tool
def create_custom_tools(tool_config: Dict[str, Any]) -> List[AgentTool]:
tools = []
if tool_config.get("myNewTool"):
tools.append(create_my_new_tool(tool_config["myNewTool"]))
return toolsStep 3: Update Tool Configuration Schema
If tool needs configuration from database/event, update:
- Database schema (backend Prisma schema)
- API validation (backend routes)
- Frontend types and UI
Step 4: Add Tool Usage Instructions to Prompts
Edit prompt generators in agent.py:
# In _build_tool_usage_section() or directly in prompt
tool_instruction = """
## WHEN TO USE MY_NEW_TOOL
- WHEN you need to do X -> USE my_new_tool
- WHEN you need to verify Y -> USE my_new_tool
"""Tool Configuration Structure
tool_configuration = {
"knowledgeBase": [
{
"knowledgeBaseId": "KB123",
"name": "Building Regulations",
"dataSourceIds": ["DS456"]
}
],
"codeInterpreter": True,
"mcpConfig": {
"servers": {
"web-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-web-search"]
}
}
}
}Available Tools
file_read- Read document contentimage_reader- Read image contentknowledge_base_query- Query Bedrock Knowledge Basescode_interpreter- Execute Python code- MCP tools - Dynamic tools from MCP servers
- Custom tools - Your own tool implementations
Related skills
FAQ
Where are the review prompts defined?
In agent.py, via get_document_review_prompt() and get_image_review_prompt() with citation and legacy variants.
How do I change models?
Via CDK, e.g. cdk deploy -c rapid.documentProcessingModelId=..., and register the model in model_config.py.