| description | allowed-tools | |||
|---|---|---|---|---|
Trash all unstarred gammas on the current dashboard page using browser automation. Use when asked to "clean up gammas", "trash unstarred", "delete unstarred gammas", or "clean dashboard". |
|
Switches to list view and trashes all unstarred gammas on the current dashboard page.
- Browser must be on a Gamma dashboard page (e.g., gamma.app/my-gammas or a folder)
- Claude-in-Chrome extension must be active
mcp__claude-in-chrome__tabs_context_mcp
Verify the active tab is on a Gamma dashboard page. If not, ask the user to navigate there first.
Run this JS to ensure list view is active:
document.querySelector('[data-testid="view-toggle-list"]').click();Wait ~500ms for the view to switch.
Run this JS to iterate through rows and trash each unstarred gamma:
(function() {
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function trashUnstarredGammas() {
let trashed = 0;
let errors = [];
while (true) {
const rows = Array.from(document.querySelectorAll('tr'));
let targetRow = null;
for (const row of rows) {
const starBtn = row.querySelector('button[data-favorite-button="true"]');
if (!starBtn) continue;
const svgIcon = starBtn.querySelector('svg[data-prefix="far"]');
if (svgIcon) {
targetRow = row;
break;
}
}
if (!targetRow) break;
const menuBtn = targetRow.querySelector('.chakra-menu__menu-button');
if (!menuBtn) { errors.push('No menu button found'); break; }
menuBtn.click();
await sleep(600);
const menuItems = document.querySelectorAll('[role="menuitem"]');
let trashItem = null;
for (const item of menuItems) {
if (item.textContent.trim() === 'Send to trash') {
trashItem = item;
break;
}
}
if (!trashItem) { errors.push('No trash option found'); break; }
trashItem.click();
trashed++;
await sleep(800);
}
return { trashed, errors };
}
trashUnstarredGammas().then(result => console.log('CLEANUP_RESULT:' + JSON.stringify(result)));
})();After the script finishes, read console messages filtered by CLEANUP_RESULT to get the count:
mcp__claude-in-chrome__read_console_messages pattern="CLEANUP_RESULT"
Report how many gammas were trashed and any errors.