Skill: ivangdavila/alexa (version 1.0.0)

--- name: Alexa description: Control devices, run automations, and help users get more from Alexa with smart home, routines, and skill development guidance. --- ## Device Control **Naming for reliable control:** Location + device type. "Kitchen light", "Bedroom fan". Avoid model numbers. **Room-based commands:** - "Turn off the bedroom" (all devices in room) - "Turn on downstairs lights" (group) - "Set living room to 72" (thermostat) **Protocol hierarchy:** Matter > Zigbee > Wi-Fi. Built-in Zigbee hubs: Echo Plus, Echo 4th gen, Echo Show 10. **Device not responding?** Check Alexa app → Devices → find device → verify online status. Re-discover if needed. ## Routines **Create via:** Alexa app → More → Routines **Triggers:** - Voice phrase (unique, not similar to built-in commands) - Schedule (time, sunrise/sunset) - Device state (door unlocks, motion detected) - Location (geofence enter/exit) - Alarm dismissed **Actions:** Device control, scenes, announcements, music, wait (sequencing), custom speech. **Routine fails?** Check trigger phrase uniqueness, verify all devices online, review routine history in app. ## Shortcuts Integration **Quick voice shortcuts:** Alexa app → More → Voice → Custom → create phrase that triggers existing command. **Skills as automations:** Enable third-party skills that expose actions to routines (IFTTT, smart home brands). **Announcements:** "Alexa, announce dinner is ready" → broadcasts to all Echo devices. Useful in routines. ## Smart Home Setup **Adding devices:** 1. Enable brand's skill in Alexa app 2. Link account if required 3. "Alexa, discover devices" or Devices → + → Add Device 4. Assign to room (critical for room-based commands) **Groups vs Scenes:** - Groups: multiple devices, same action ("turn off downstairs") - Scenes: multiple devices, preset states ("movie time" → dim lights, close blinds) **Multi-room audio:** Create speaker groups, then "Play music on [group name]" or "Play everywhere". ## Skill Development **When building custom skills:** - Required intents: AMAZON.HelpIntent, AMAZON.StopIntent, AMAZON.CancelIntent, AMAZON.FallbackIntent - Test in simulator AND on physical device (simulator misses edge cases) - 10-20 sample utterances per intent minimum - Voice-first: users don't see a screen **Certification blockers:** Example phrases that don't work exactly as written, generic help intent, missing privacy policy. ## Troubleshooting | Problem | Fix | |---------|-----| | "Device not responding" | Check Wi-Fi, verify in Alexa app, re-discover | | Routine doesn't trigger | Rename trigger phrase, check routine history | | Wrong device activates | Rename devices to be more distinct | | Skill timeout | Check Lambda CloudWatch logs, increase timeout | | "I don't know that" | Add more sample utterances to intent | ## Privacy Controls **Voice history:** Alexa app → Privacy → Review Voice History. Enable auto-delete (3 or 18 months). **Quick delete:** "Alexa, delete what I just said" or "delete everything I said today". **Guard mode:** "Alexa, I'm leaving" → monitors for sounds (glass break, smoke alarm). --- ## When to Load More | Situation | Reference | |-----------|-----------| | Full command list by category | `commands.md` | | Smart home protocols, setup, troubleshooting | `smart-home.md` | | Building custom skills, Lambda, certification | `development.md` |

path: commands.md
content: # Alexa Voice Commands

## Essential Commands

### Timers & Alarms
| Command | Action |
|---------|--------|
| "Set a timer for 10 minutes" | Timer |
| "Set a pizza timer for 15 minutes" | Named timer |
| "How much time is left on my timer?" | Check timer |
| "Cancel all timers" | Clear timers |
| "Set an alarm for 7 AM" | Alarm |
| "Set a repeating alarm for weekdays at 6:30 AM" | Recurring alarm |
| "Snooze" | Snooze 9 minutes |
| "Snooze for 15 minutes" | Custom snooze |

### Reminders
| Command | Action |
|---------|--------|
| "Remind me to call mom at 5 PM" | Time-based reminder |
| "Remind me to buy milk when I get home" | Location reminder |
| "Remind me every Monday to check calendar" | Recurring reminder |
| "What are my reminders?" | List all |
| "Delete my reminder to call mom" | Remove specific |

### Lists
| Command | Action |
|---------|--------|
| "Add milk to my shopping list" | Add item |
| "What's on my shopping list?" | Read list |
| "Create a list called vacation packing" | New list |
| "Add sunscreen to vacation packing list" | Add to custom list |

---

## Smart Home

### Lights
| Command | Action |
|---------|--------|
| "Turn on the kitchen lights" | On |
| "Turn off all the lights" | Off all |
| "Dim the bedroom to 30%" | Dim level |
| "Set the living room lights to warm white" | Color temperature |
| "Turn the lights blue" | Color (if supported) |
| "Turn on movie mode" | Scene |

### Thermostat
| Command | Action |
|---------|--------|
| "Set the temperature to 72" | Set target |
| "Make it warmer / cooler" | Adjust relative |
| "What's the temperature inside?" | Read current |
| "Set the thermostat to cool / heat / auto" | Mode change |
| "Turn off the AC" | Disable |

### Locks & Security
| Command | Action |
|---------|--------|
| "Lock the front door" | Lock |
| "Is the front door locked?" | Status |
| "Arm Guard in away mode" | Enable Alexa Guard |
| "Show me the front door camera" | Display (Echo Show) |

### Other Devices
| Command | Action |
|---------|--------|
| "Turn on the TV" | Power (if connected) |
| "Turn on the coffee maker" | Smart plug |
| "Start the robot vacuum" | Vacuum |
| "Open the garage door" | Garage controller |

---

## Music & Media

### Playback
| Command | Action |
|---------|--------|
| "Play some jazz" | Genre |
| "Play the Beatles" | Artist |
| "Play my Discover Weekly on Spotify" | Playlist + service |
| "Play the song that goes 'never gonna give you up'" | Lyrics search |
| "Play some relaxing music" | Mood |
| "Next / Previous / Pause / Resume" | Controls |
| "Shuffle / Loop" | Playback modes |
| "Set volume to 5" / "Volume up" | Volume (1-10 scale) |

### Multi-room
| Command | Action |
|---------|--------|
| "Play music everywhere" | All speakers |
| "Play music on the downstairs group" | Speaker group |
| "Move music to the kitchen" | Transfer playback |
| "Turn it up in the living room" | Volume specific room |

### Podcasts & Audio
| Command | Action |
|---------|--------|
| "Play the Daily podcast" | Specific podcast |
| "Play the latest episode of [podcast]" | New episode |
| "Skip ahead 30 seconds" | Skip |
| "Resume my audiobook" | Audible |

---

## Information & Utilities

### Quick Info
| Command | Action |
|---------|--------|
| "What time is it?" | Time |
| "What's the weather?" | Current + forecast |
| "What's the weather in Tokyo?" | Location weather |
| "Will it rain tomorrow?" | Forecast |
| "What's on my calendar?" | Today's events |
| "When's my next meeting?" | Next event |
| "Add dentist appointment Friday at 2 PM" | Create event |

### Knowledge
| Command | Action |
|---------|--------|
| "What's the capital of Norway?" | Facts |
| "How do you say 'thank you' in Japanese?" | Translation |
| "What's 15% of 80?" | Math |
| "Convert 5 miles to kilometers" | Conversion |
| "Define 'ephemeral'" | Definition |
| "How do you spell 'accommodate'?" | Spelling |
| "Who won the World Cup in 2022?" | Sports/history |

### News & Briefing
| Command | Action |
|---------|--------|
| "What's the news?" | Flash briefing |
| "Play my flash briefing" | Full briefing |
| "What's happening in tech?" | Category news |
| "Tell me about [topic]" | Topic update |

---

## Communication

### Calling
| Command | Action |
|---------|--------|
| "Call Mom" | Contact call |
| "Call [phone number]" | Direct dial |
| "Answer" | Pick up call |
| "Hang up" | End call |
| "Video call John" | Echo Show video |

### Messaging
| Command | Action |
|---------|--------|
| "Send a message to [contact]" | Dictate message |
| "Play my messages" | Listen to messages |
| "Announce 'Dinner is ready'" | All Echo devices in home |
| "Drop in on the kitchen" | Start Drop In |

---

## Accessibility

### Voice Accessibility
| Command | Action |
|---------|--------|
| "Speak slower / faster" | Speech rate |
| "Turn on whisper mode" | Alexa whispers when you whisper |
| "Turn on adaptive listening" | More time to respond |
| "Tap to Alexa" | Touch instead of voice (Echo Show) |

### For Vision
| Command | Action |
|---------|--------|
| "Turn on screen magnifier" | Echo Show zoom |
| "Show my calendar in large print" | Larger display |
| "Turn on VoiceView" | Screen reader for Echo Show |

### Routines for Care
| Example Routine | Use |
|-----------------|-----|
| Medication reminders | Daily reminder at specific times |
| "Help" command | Send notification to caregiver |
| Motion-triggered | Check-in if no motion detected |

---

## Fun & Entertainment

| Command | Action |
|---------|--------|
| "Tell me a joke" | Random joke |
| "Play 20 questions" | Game |
| "Roll a dice" / "Flip a coin" | Random |
| "Sing happy birthday" | Song |
| "Tell me something interesting" | Random fact |
| "What's your favorite color?" | Easter eggs |
| "Meow" | Various responses |
| "Open [skill name]" | Launch third-party skill |


path: development.md
content: # Alexa Skill Development

## Skill Architecture

```
User speaks → Alexa cloud (NLU) → Your skill (intent + slots) → Lambda/Endpoint → Response → Alexa speaks
```

**Skill types:**
- **Custom skills:** Full control, build intents from scratch
- **Smart home skills:** Device control with pre-built intents
- **Flash briefing:** News/content feeds
- **Video/Music skills:** Media playback (complex certification)

---

## Interaction Model

### Intent Design

```json
{
  "intents": [
    {
      "name": "OrderPizzaIntent",
      "slots": [
        { "name": "size", "type": "AMAZON.SizeType" },
        { "name": "topping", "type": "PizzaToppingType" }
      ],
      "samples": [
        "order a {size} pizza with {topping}",
        "I want {topping} pizza",
        "get me a pizza"
      ]
    }
  ]
}
```

**Slot types:**
- Built-in: AMAZON.NUMBER, AMAZON.DATE, AMAZON.City, AMAZON.SearchQuery
- Custom: Define your own values + synonyms

**Sample utterances:**
- Minimum 10-20 per intent for good recognition
- Include variations: formal/casual, with/without slots
- Test with real users — they say things you don't expect

### Required Intents (Certification)

| Intent | Purpose | Example Response |
|--------|---------|------------------|
| AMAZON.HelpIntent | Explain skill | "You can ask me to order pizza, check your order status, or..." |
| AMAZON.StopIntent | Exit cleanly | "Goodbye!" |
| AMAZON.CancelIntent | Exit cleanly | Same as Stop |
| AMAZON.FallbackIntent | Unrecognized input | "I didn't catch that. Try saying 'order a pizza'." |
| LaunchRequest | Skill opened without command | Welcome message + what they can do |

---

## Lambda Function (Node.js)

```javascript
const Alexa = require('ask-sdk-core');

const LaunchHandler = {
  canHandle(handlerInput) {
    return Alexa.getRequestType(handlerInput.requestEnvelope) === 'LaunchRequest';
  },
  handle(handlerInput) {
    return handlerInput.responseBuilder
      .speak('Welcome to Pizza Order. What would you like?')
      .reprompt('You can say "order a large pepperoni pizza".')
      .getResponse();
  }
};

const OrderPizzaHandler = {
  canHandle(handlerInput) {
    return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'
      && Alexa.getIntentName(handlerInput.requestEnvelope) === 'OrderPizzaIntent';
  },
  handle(handlerInput) {
    const slots = handlerInput.requestEnvelope.request.intent.slots;
    const size = slots.size?.value || 'medium';
    const topping = slots.topping?.value || 'cheese';
    
    return handlerInput.responseBuilder
      .speak(`Ordering a ${size} ${topping} pizza. Is that correct?`)
      .reprompt('Say yes to confirm or no to cancel.')
      .getResponse();
  }
};

exports.handler = Alexa.SkillBuilders.custom()
  .addRequestHandlers(LaunchHandler, OrderPizzaHandler)
  .lambda();
```

**Handler chain:** First handler where `canHandle` returns true wins.

---

## Session & State Management

**Session attributes (within session):**
```javascript
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
sessionAttributes.orderSize = 'large';
handlerInput.attributesManager.setSessionAttributes(sessionAttributes);
```

**Persistent attributes (DynamoDB):**
```javascript
const persistentAttributes = await handlerInput.attributesManager.getPersistentAttributes();
persistentAttributes.orderHistory = [...];
handlerInput.attributesManager.setPersistentAttributes(persistentAttributes);
await handlerInput.attributesManager.savePersistentAttributes();
```

---

## Testing

**Alexa Developer Console:**
1. Go to Test tab
2. Enable "Development" testing
3. Type or speak utterances
4. Check JSON Input/Output for debugging

**Physical device testing (critical):**
- Enable skill on your account
- Test with actual voice (mumbling, accents, background noise)
- Test on different Echo devices (Show vs Dot)

**Common test cases:**
- [ ] Launch without command (LaunchRequest)
- [ ] Direct command ("Alexa, ask [skill] to [action]")
- [ ] All slots filled vs partial vs empty
- [ ] Help, Stop, Cancel work
- [ ] Session timeout (8 seconds silence)
- [ ] Error handling (Lambda timeout, API failure)

---

## Certification Checklist

Before submitting:

- [ ] All required intents implemented
- [ ] Help intent describes all features
- [ ] No placeholder or test content
- [ ] Privacy policy URL (if collecting data)
- [ ] Testing instructions for reviewer
- [ ] Skill icon 108x108 and 512x512 PNG
- [ ] Example phrases (3) that actually work
- [ ] No trademark issues in skill name

**Common rejection reasons:**
- Example phrases don't work exactly as written
- Help intent is generic ("I can help you")
- Skill name conflicts with existing skill or trademark
- Missing privacy policy for data collection
- Broken functionality in edge cases

---

## Account Linking (OAuth)

For skills that need user accounts:

1. Configure OAuth provider in skill settings
2. User links account in Alexa app
3. Access token available in `handlerInput.requestEnvelope.context.System.user.accessToken`

**Flow:**
1. User enables skill → redirected to your OAuth login
2. User logs in → you redirect back to Amazon with auth code
3. Amazon exchanges code for tokens → stores for user
4. Your Lambda receives access token with each request

---

## Publishing

**Distribution options:**
- Public: Available to all Alexa users
- Beta: Up to 500 testers via email
- Private (Organizations): Enterprise deployment

**Post-launch:**
- Monitor CloudWatch for errors
- Check skill analytics in developer console
- Respond to voice feedback (users can leave reviews)
- Update regularly — stale skills get deprioritized


path: smart-home.md
content: # Alexa Smart Home

## Device Setup

### Connection Methods

| Protocol | Requires Hub | Latency | Best For |
|----------|--------------|---------|----------|
| Wi-Fi | No | Low-Medium | Cameras, smart displays, standalone devices |
| Zigbee | Echo with hub or Zigbee hub | Low | Sensors, bulbs, switches (battery-friendly) |
| Z-Wave | Z-Wave hub | Low | Locks, thermostats, professional install |
| Matter | Thread border router or Wi-Fi | Very Low | Future-proof, local control |
| Bluetooth | No | Variable | Simple devices, audio |

### Adding Devices

1. **Enable skill for brand** (Alexa app → Skills → Search → Enable)
2. **Link account** (if required by manufacturer)
3. **Discover devices:** "Alexa, discover devices" or Devices → + → Add Device
4. **Assign to room** (critical for "turn off bedroom lights" to work)

**If device doesn't appear:**
- Check device is on same Wi-Fi network
- Factory reset device, re-add to manufacturer app first
- Disable/re-enable skill
- Check for device firmware updates

---

## Naming Best Practices

**Good names:**
- "Kitchen Light"
- "Living Room Fan"
- "Front Door Lock"
- "Bedroom TV"

**Bad names:**
- "Light 1" (ambiguous)
- "The Big One" (unclear device type)
- "Kitchen" alone (conflicts with room name)
- "LIFX A19 Color 1000 Bulb" (too long, hard to say)

**Rule:** Location + Device Type. Short, speakable, unique.

---

## Rooms & Groups

### Rooms
Assign devices to rooms for natural commands:
- "Turn off the bedroom" (all devices in bedroom)
- "What's the temperature in the kitchen?" (thermostat in kitchen)

### Device Groups
Group similar devices across rooms:
- "Downstairs Lights" → all lights on first floor
- "All Speakers" → multi-room audio

### Scenes
Preset states for multiple devices:
- "Movie Time" → dim lights, turn on TV, close blinds
- "Good Night" → lock doors, lights off, thermostat to 68°

---

## Routines

### Trigger Types

| Trigger | Example |
|---------|---------|
| Voice | "Alexa, good morning" |
| Schedule | Every weekday at 7:00 AM |
| Device state | Front door lock unlocks |
| Location (geofence) | Arrive home / Leave home |
| Alarm dismissed | Morning alarm turned off |
| Echo Button | Physical button press |
| Guard | Sound detected (glass break, smoke alarm) |

### Actions

- Smart home: control devices, scenes
- Announcements: speak on specific or all Echo devices
- Messaging: send notifications, make calls
- Music/News: play specific content
- Skills: trigger skill actions
- Wait: pause between actions
- Custom responses: Alexa says specific phrase

### Routine Tips

**Make it reliable:**
- Use unique trigger phrases (not similar to built-in commands)
- Test each step individually before combining
- Add waits between actions if devices are slow
- Check routine history for failures

**Power user patterns:**
- "Leaving home" routine: lock doors, arm Guard, turn off all lights, adjust thermostat
- "Cooking" routine: set timer, play music, turn on kitchen lights to 100%
- "Guest mode" routine: disable sensitive routines, change Wi-Fi password

---

## Multi-Room Audio

**Setup:**
1. Create speaker group in Alexa app
2. Add Echo devices or compatible speakers
3. Name the group ("Everywhere", "Downstairs")

**Commands:**
- "Play jazz on the downstairs group"
- "Move music to kitchen" (transfer playback)
- "Play [music] everywhere"

**Limitations:**
- All speakers must be on same account
- Some non-Echo speakers have lag
- Different music services have different multi-room support

---

## Troubleshooting

### Device Issues

| Symptom | Check |
|---------|-------|
| "Device not responding" | Wi-Fi connection, device power, manufacturer app |
| Slow response | Wi-Fi congestion, move closer to router |
| Commands misheard | Check utterance history in Alexa app |
| Device works in app but not voice | Room assignment, device name pronunciation |
| Zigbee device drops | Move closer to hub, check for interference |

### Routine Issues

| Symptom | Check |
|---------|-------|
| Routine doesn't trigger | Trigger phrase conflict, check routine history |
| Partial execution | Device offline during routine |
| Location trigger fails | Phone location permissions, Alexa app battery optimization |
| Scheduled routine missed | Device offline, time zone settings |

### Reset Procedures

**Echo device:**
1. Press and hold Action button (dot) for 25 seconds
2. Wait for orange ring → device in setup mode

**Re-register all devices:**
1. Disable and remove all smart home skills
2. Delete all devices from Alexa app
3. Factory reset devices if needed
4. Re-add manufacturer apps, re-enable skills
5. Discover devices fresh

---

## Privacy & Security

**Voice recording controls:**
- Review voice history: Alexa app → Privacy → Review Voice History
- Auto-delete: Set to delete after 3 or 18 months
- "Alexa, delete what I just said"
- "Alexa, delete everything I said today"

**Cameras and Ring:**
- Privacy mode to disable camera
- Motion zones to limit recording areas
- Shared users vs guests (different permission levels)

**Guest Connect:**
- Visitors use their own Amazon account on your Echo
- Their requests billed to their account
- Your smart home still controlled

**Drop In:**
- Enable only for trusted contacts
- Set to household only or specific contacts
- Check privacy settings per device


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)