Integracao completa com Amazon Alexa para criar skills de voz inteligentes, transformar Alexa em assistente com Claude como cerebro (projeto Auri) e integrar com AWS ecosystem (Lambda, DynamoDB, Polly, Transcribe, Lex, Smart Home).
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Der Befehl bleibt in einer Zeile. Scrollen Sie horizontal, um ihn vor dem Kopieren vollständig zu prüfen.
Sie bevorzugen eine lokale Kopie? Laden Sie die Dateien herunter, die SkillsMP derzeit vorliegen.
SKILL.md wird angezeigt
SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
amazon-alexa
description
Integracao completa com Amazon Alexa para criar skills de voz inteligentes, transformar Alexa em assistente com Claude como cerebro (projeto Auri) e integrar com AWS ecosystem (Lambda, DynamoDB, Polly, Transcribe, Lex, Smart Home).
Integracao completa com Amazon Alexa para criar skills de voz inteligentes, transformar Alexa em assistente com Claude como cerebro (projeto Auri) e integrar com AWS ecosystem (Lambda, DynamoDB, Polly, Transcribe, Lex, Smart Home).
When to Use This Skill
When you need specialized assistance with this domain
Do Not Use This Skill When
The task is unrelated to amazon alexa
A simpler, more specific tool can handle the request
The user needs general-purpose assistance without domain expertise
How It Works
Voce e o especialista em Alexa e AWS Voice. Missao: transformar
qualquer dispositivo Alexa em assistente ultra-inteligente usando
Claude como LLM backend, com voz neural, memoria persistente e
controle de Smart Home. Projeto-chave: AURI.
ask new
--template hello-world
--skill-name auri
--language pt-BR
└── .Ask/Ask-Resources.Json
## 2.3 Configurar Invocation Name
No arquivo `models/pt-BR.json`:
```json
{
"interactionModel": {
"languageModel": {
"invocationName": "auri"
}
}
}
3.1 Intents Essenciais Para Auri
{"interactionModel":{"languageModel":{"invocationName":"auri","intents":[{"name":"AMAZON.HelpIntent"},{"name":"AMAZON.StopIntent"},{"name":"AMAZON.CancelIntent"},{"name":"AMAZON.FallbackIntent"},{"name":"ChatIntent","slots":[{"name":"query","type":"AMAZON.SearchQuery"}],"samples":["{query}","me ajuda com {query}","quero saber sobre {query}","o que voce sabe sobre {query}","explique {query}","pesquise {query}"]},{"name":"SmartHomeIntent","slots":[{"name":"device","type":"AMAZON.Room"},{"name":"action","type":"ActionType"}],"samples":["{action} a {device}","controla {device}","acende {device}","apaga {device}"]},{"name":"RoutineIntent","slots":[{"name":"routine","type":"RoutineType"}],"samples":["ativa rotina {routine}","executa {routine}","modo {routine}"]}],"types":[{"name":"ActionType","values":[{"name":{"value":"liga","synonyms":["acende","ativa","liga"]}},{"name":{"value":"desliga","synonyms":["apaga","desativa","desliga"]}}]},{"name":"RoutineType","values":[{"name":{"value":"bom dia","synonyms":["acordar","manhã"]}},{"name":{"value":"boa noite","synonyms":["dormir","descansar"]}},{"name":{"value":"trabalho","synonyms":["trabalhar","foco"]}},{"name":{"value":"sair","synonyms":["saindo","goodbye"]}}]}]}}}
4.1 Handler Principal Python
import os
import time
import anthropic
import boto3
from ask_sdk_core.skill_builder import SkillBuilder
from ask_sdk_core.handler_input import HandlerInput
from ask_sdk_core.utils import is_intent_name, is_request_type
from ask_sdk_model import Response
from ask_sdk_dynamodb_persistence_adapter import DynamoDbPersistenceAdapter
## ============================================================@sb.request_handler(can_handle_func=is_request_type("LaunchRequest"))deflaunch_handler(handler_input: HandlerInput) -> Response:
attrs = handler_input.attributes_manager.persistent_attributes
name = attrs.get("name", "")
greeting = f"Oi{', ' + name if name else''}! Eu sou a Auri. Como posso ajudar?"return (handler_input.response_builder
.speak(greeting).ask("Em que posso ajudar?").response)
@sb.request_handler(can_handle_func=is_intent_name("ChatIntent"))defchat_handler(handler_input: HandlerInput) -> Response:
try:
# Obter query
slots = handler_input.request_envelope.request.intent.slots
query = slots["query"].value if slots.get("query") elseNoneifnot query:
return (handler_input.response_builder
.speak("Pode repetir? Nao entendi bem.").ask("Pode repetir?").response)
# Carregar historico
attrs = handler_input.attributes_manager.persistent_attributes
history = attrs.get("history", [])
# Montar mensagens para Claude
messages = history[-MAX_HISTORY:]
messages.append({"role": "user", "content": query})
# Chamar Claude
client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
response = client.messages.create(
model=CLAUDE_MODEL,
max_tokens=512,
system=AURI_SYSTEM_PROMPT,
messages=messages
)
reply = response.content[0].text
# Truncar para nao exceder timeoutiflen(reply) > MAX_RESPONSE_CHARS:
reply = reply[:MAX_RESPONSE_CHARS] + "... Quer que eu continue?"# Salvar historico
history.append({"role": "user", "content": query})
history.append({"role": "assistant", "content": reply})
attrs["history"] = history[-50:] # Manter ultimas 50
handler_input.attributes_manager.persistent_attributes = attrs
handler_input.attributes_manager.save_persist
## 4.2 Variaveis De Ambiente Lambda
ANTHROPIC_API_KEY=sk-... (armazenar em Secrets Manager)
DYNAMODB_TABLE=auri-users
AWS_REGION=us-east-1
import time
## Adicionar Ttl De 180 Dias Ao Salvar
attrs["ttl"] = int(time.time()) + (180 * 24 * 3600)
6.1 Vozes Disponiveis (Portugues)
Voice
Idioma
Tipo
Recomendado
Vitoria
pt-BR
Neural
✅ Auri PT-BR
Camila
pt-BR
Neural
Alternativa
Ricardo
pt-BR
Standard
Masculino
Ines
pt-PT
Neural
Portugal
6.2 Integrar Polly Na Resposta
import boto3
import base64
defsynthesize_polly(text: str, voice_id: str = "Vitoria") -> str:
"""Retorna URL de audio Polly para usar em Alexa."""
client = boto3.client("polly", region_name="us-east-1")
response = client.synthesize_speech(
Text=text,
OutputFormat="mp3",
VoiceId=voice_id,
Engine="neural"
)
# Salvar em S3 e retornar URL# (necessario para usar audio customizado no Alexa)return upload_to_s3(response["AudioStream"].read())
defspeak_with_polly(handler_input, text, voice_id="Vitoria"):
"""Retornar resposta usando voz Polly customizada via SSML."""
audio_url = synthesize_polly(text, voice_id)
ssml = f'<speak><audio src="{audio_url}"/></speak>'return handler_input.response_builder.speak(ssml)
6.3 Ssml Para Controle De Voz
<speak><prosodyrate="90%"pitch="+5%">
Oi! Eu sou a Auri.
</prosody><breaktime="0.5s"/><emphasislevel="moderate">Como posso ajudar?</emphasis></speak>
7.1 Template De Chat
{"type":"APL","version":"2023.3","theme":"dark","mainTemplate":{"parameters":["payload"],"items":[{"type":"Container","width":"100%","height":"100%","backgroundColor":"#1a1a2e","items":[{"type":"Text","text":"AURI","fontSize":"32px","color":"#e94560","textAlign":"center","paddingTop":"20px"},{"type":"Text","text":"${payload.lastResponse}","fontSize":"24px","color":"#ffffff","padding":"20px","maxLines":8,"grow":1},{"type":"Text","text":"Diga algo para continuar...","fontSize":"18px","color":"#888888","textAlign":"center","paddingBottom":"20px"}]}]}}
[ ] Conta Amazon Developer criada
[ ] Conta AWS configurada (free tier)
[ ] ASK CLI instalado e configurado
[ ] IAM Role criada com permissoes: Lambda, DynamoDB, Polly, Logs
[ ] Anthropic API key armazenada em Secrets Manager
## Fase 2 — Skill Base (Dia 2-3)
[ ] ask new --template hello-world --skill-name auri
[ ] Interaction model definido (pt-BR.json)
[ ] LaunchRequest handler funcionando
[ ] ChatIntent handler com Claude integrado
[ ] ask deploy funcionando
[ ] Teste basico no ASK simulator