Restaurant Roulette
Google AI EdgeOfficialPublished by Google AI Edge
- Skill
- Tool integration
- Business and productivity
- Apache-2.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
Restaurant Roulette helps users decide where to eat by generating a visual spin-the-wheel interface. By providing a location and preferred cuisine, the skill fetches a list of local options and displays them in an interactive webview, allowing the user to make a final random selection themselves.
What it does
- Searches for restaurants based on user-provided location and cuisine.
- Generates an interactive roulette wheel interface for random selection.
- Displays up to 10 potential dining options.
- Provides a user-friendly webview for the spin experience.
When to use it
- When you are having trouble deciding on a place to eat.
- When you want a fun, randomized way to discover local restaurants.
- When you have a specific cuisine or location in mind but need help narrowing down the choices.
Advantages
- Removes decision fatigue through gamification.
- Keeps the final choice in the user's hands.
- Provides a clear, visual interface for discovery.
Usage examples
- “Suggest Mexican food in San Jose.”
- The agent displays a spin-the-wheel interface populated with Mexican restaurants in San Jose for the user to interact with.
- “Where should I get Sushi in San Francisco today?”
- The agent presents a roulette wheel containing local sushi spots in San Francisco, prompting the user to spin for a result.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/google-ai-edge/restaurant-roulette/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip restaurant-roulette.zip -d .agents/skills
Documentation by Google AI Edge
Restaurant Roulette
This skill searches for up to 10 restaurants matching a specific cuisine and location in a spin wheel.
Examples
"Suggest Mexican food in San Jose."
"Find a random Italian restaurant near Sunnyvale."
"Where should I get Sushi in San Francisco today?"
"Show a restaurant roulette for Indian food in Palo Alto."
Instructions
Call the run_js tool with the following exact parameters:
data: A JSON string with the following fields
location: the target city or location (e.g., "San Jose", "Sunnyvale", "San Francisco").
cuisine: the style of food or cuisine desired (e.g., "Mexican", "Italian", "Indian", "Sushi").
DO NOT use any other tool, DO NOT call run_intent.
IMPORTANT: When the wheel is generated, DO NOT pick a winner for the user or make up a restaurant. Simply return the requested webview and tell the user to tap the preview card to spin the wheel themselves.
Files
- ATTRIBUTION.mdAdded by AutoGineer909 B
- LICENSELicence file added by AutoGineer11.1 KiB
- README.md702 B
- SKILL.md1.3 KiB
- assets/ui.html8.2 KiB
- assets/webview.html3.0 KiB
- scripts/index.html910 B
- scripts/index.jsScript3.9 KiB
scripts/index.js
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
window['ai_edge_gallery_get_result'] = async (dataStr, secret) => {
try {
const jsonData = JSON.parse(dataStr || '{}');
const location = jsonData.location || 'Mountain View, CA';
const cuisine = jsonData.cuisine || 'Sushi';
// // 1. Generate the data
// const prefixes = ["The", "Golden", "Epic", "Supreme", "Authentic",
// "Local", "Happy", "Urban", "Secret", "Ninja"]; const suffixes = ["Spot",
// "House", "Palace", "Kitchen", "Diner", "Grill", "Eats", "Bites", "Cafe",
// "Express"];
// let places = [];
// for(let i = 0; i < 10; i++) {
// places.push(`${prefixes[i]} ${cuisine} ${suffixes[i]}`);
// }
const GEMINI_API_KEY = secret || 'YOUR_GEMINI_API_KEY';
if (GEMINI_API_KEY === 'YOUR_GEMINI_API_KEY') {
console.warn('GEMINI_API_KEY is missing. Calls to Gemini API will likely fail.');
}
// We simplified the prompt because we are using strict JSON mode now
const prompt = `List 10 real, highly-rated ${cuisine} restaurants in ${
location}. Within 15 miles location range`;
const url =
`https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=${
GEMINI_API_KEY}`;
let places = [];
try {
const response = await fetch(url, {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
contents: [{parts: [{text: prompt}]}],
// THIS IS THE MAGIC FIX: Forces Gemini to return pure JSON
generationConfig: {
responseMimeType: 'application/json',
// We tell it exactly what shape the JSON should be: an array of
// strings
responseSchema: {type: 'ARRAY', items: {type: 'STRING'}}
}
})
});
if (!response.ok) {
const errorText = await response.text();
throw new Error(`HTTP Error ${response.status}`);
}
const data = await response.json();
if (data.candidates && data.candidates.length > 0) {
const rawText = data.candidates[0].content.parts[0].text;
places = JSON.parse(rawText);
places.sort(() => 0.5 - Math.random());
} else {
throw new Error('Empty response from AI');
}
} catch (apiError) {
console.warn('Gemini API failed.', apiError);
// IF IT FAILS, THE WHEEL WILL NOW SHOW YOU THE EXACT ERROR MESSAGE!
let errorMessage = apiError.message;
if (errorMessage.length > 15)
errorMessage = errorMessage.substring(0, 15);
places = ['Error:', errorMessage, 'Check', 'Console'];
}
// 2. Compress the data
const placeString = places.join('|');
const compressedData = btoa(unescape(encodeURIComponent(placeString)));
// 3. Build the REAL local URL
const baseUrl = 'webview.html';
const fullUrl = `${baseUrl}?c=${encodeURIComponent(cuisine)}&l=${
encodeURIComponent(location)}&data=${compressedData}&v=${Date.now()}`;
// 4. Return ONLY the webview. This guarantees the preview card appears and
// stops the AI from overriding it!
return JSON.stringify({
webview: {url: fullUrl},
result:
'Here is the restaurant roulette wheel you requested! Tap the preview card to spin it and pick a winner!'
});
} catch (e) {
console.error(e);
return JSON.stringify({error: `Failed to load roulette: ${e.message}`});
}
};Requirements and compatibility
Written for: Google AI Edge Gallery
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Google AI Edge
- Publisher
- Google AI Edge (Official)
- Source
- google-ai-edge/gallery · skills/featured/restaurant-roulette · commit 3972f06
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google AI Edge.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download restaurant-roulette.zip