AM

amazon-alexa

Architecture and development guide for building intelligent Alexa skills using Claude as a backend.

Install

mkdir -p .claude/skills/amazon-alexa && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13938" && unzip -o skill.zip -d .claude/skills/amazon-alexa && rm skill.zip

Installs to .claude/skills/amazon-alexa

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

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).
231 charsno explicit “when” trigger
Advanced

Key capabilities

  • Create intelligent voice skills for Amazon Alexa
  • Integrate Alexa with Claude as an LLM backend
  • Connect Alexa with AWS Lambda for logic
  • Utilize Amazon DynamoDB for persistent memory
  • Control smart home devices via Alexa

How it works

The skill integrates Amazon Alexa with the AWS ecosystem and Claude API, using AWS Lambda for logic, DynamoDB for persistence, and Polly for neural voice, to create intelligent voice assistants.

Inputs & outputs

You give it
voice commands to an Alexa device
You get back
intelligent voice responses and smart home control

When to use amazon-alexa

  • Creating voice skills
  • Integrating alexa with aws lambda
  • Building intelligent assistants
  • Smart home integration

About this skill

AMAZON ALEXA — Voz Inteligente com Claude

Overview

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.


1. Visao Geral Do Ecossistema

[Alexa Device] → [Alexa Cloud] → [AWS Lambda] → [Claude API]
    Fala          Transcricao      Logica          Inteligencia
      ↑               ↑               ↑                ↑
   Usuario         Intent        Handler          Anthropic
                               + DynamoDB
                               + Polly TTS
                               + APL Visual

Componentes Da Arquitetura Auri

ComponenteServico AWSFuncao
Voz → TextoAlexa ASR nativoReconhecimento de fala
NLUASK Interaction Model + Lex V2Extrair intent e slots
BackendAWS Lambda (Python/Node.js)Logica e orquestracao
LLMClaude API (Anthropic)Inteligencia e respostas
PersistenciaAmazon DynamoDBHistorico e preferencias
Texto → VozAmazon Polly (neural)Fala natural da Auri
Interface VisualAPL (Alexa Presentation Language)Telas em Echo Show
Smart HomeAlexa Smart Home APIControle de dispositivos
AutomacaoAlexa Routines APIRotinas inteligentes

2.1 Pre-Requisitos


## Ask Cli

npm install -g ask-cli
ask configure

## Aws Cli

pip install awscli
aws configure

Criar Skill Com Template

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"))
def launch_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"))
def chat_handler(handler_input: HandlerInput) -> Response:
    try:
        # Obter query
        slots = handler_input.request_envelope.request.intent.slots
        query = slots["query"].value if slots.get("query") else None
        if not 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 timeout
        if len(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


### 4.3 Requirements.Txt

ask-sdk-core>=1.19.0 ask-sdk-dynamodb-persistence-adapter>=1.19.0 anthropic>=0.40.0 boto3>=1.34.0


---

### 5.1 Criar Tabela

```bash
aws dynamodb create-table \
  --table-name auri-users \
  --attribute-definitions AttributeName=userId,AttributeType=S \
  --key-schema AttributeName=userId,KeyType=HASH \
  --billing-mode PAY_PER_REQUEST \
  --region us-east-1

5.2 Schema Do Usuario

{
  "userId": "amzn1.ask.account.XXXXX",
  "name": "Joao",
  "history": [
    {"role": "user", "content": "..."},
    {"role": "assistant", "content": "..."}
  ],
  "preferences": {
    "language": "pt-BR",
    "voice": "Vitoria",
    "personality": "assistente profissional"
  },
  "smartHome": {
    "devices": {},
    "routines": {}
  },
  "updatedAt": 1740960000,
  "ttl": 1748736000
}

5.3 Ttl Automatico (Expirar Dados Antigos)

import time

## Adicionar Ttl De 180 Dias Ao Salvar

attrs["ttl"] = int(time.time()) + (180 * 24 * 3600)

6.1 Vozes Disponiveis (Portugues)

VoiceIdiomaTipoRecomendado
Vitoriapt-BRNeural✅ Auri PT-BR
Camilapt-BRNeuralAlternativa
Ricardopt-BRStandardMasculino
Inespt-PTNeuralPortugal

6.2 Integrar Polly Na Resposta

import boto3
import base64

def synthesize_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())

def speak_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>
  <prosody rate="90%" pitch="+5%">
    Oi! Eu sou a Auri.
  </prosody>
  <break time="0.5s"/>
  <emphasis level="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",
      

---

*Content truncated.*

When not to use it

  • The user needs general-purpose assistance without domain expertise

Prerequisites

ask-cliawscli

How it compares

This skill transforms Alexa into an ultra-intelligent assistant with Claude as the LLM backend, offering persistent memory and smart home control beyond standard Alexa capabilities.

Compared to similar skills

amazon-alexa side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
amazon-alexa (this skill)02moReviewAdvanced
modal57moReviewIntermediate
file-uploads46moNo flagsAdvanced
integration-connectivity-generate01moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

modal

davila7

Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.

587

file-uploads

davila7

Expert at handling file uploads and cloud storage. Covers S3, Cloudflare R2, presigned URLs, multipart uploads, and image optimization. Knows how to handle large files without blocking. Use when: file upload, S3, R2, presigned URL, multipart.

438

integration-connectivity-generate

forcedotcom

Salesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services,

00

aws-appsync

chrishuffman5

AppSync via AWS CLI v2 (`aws appsync`). GraphQL and Events APIs, data sources, resolvers, functions, types, API keys, caching, domain names, merged APIs.

00

telegram-bot-builder

davila7

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.

106130

superpowers-python-automation

anthonylee991

Implements reliable automations in Python for REST APIs: httpx/requests patterns, retries, timeouts, pagination, typing, config, logging, and tests. Use when writing Python scripts/services that call external APIs.

36

Search skills

Search the agent skills registry