Inspiration
If you code with local AI clients every day, your disk is probably haunted. Behind the scenes, AI coding assistants quietly pile up gigabytes of "ghost sessions," compressed conversation archives, cached images, and orphaned temporary files scattered across hidden folders and /tmp.
Most disk cleaners either ignore AI developer tools completely or feel like bland, risky utilities you're nervous to click "Clean" on. For the Costume Contest category, we wanted to turn everyday AI workspace maintenance into something hauntingly polished and genuinely fun—AI Cleaner (GitHub), a cross-platform desktop utility dressed in a Kiro-inspired Halloween theme that helps developers safely exorcise AI clutter without ever risking active work.
What it does
AI Cleaner scans, inspects, and safely cleans bloated caches, temporary artifacts, and forgotten sessions left behind by AI clients across macOS, Windows, and Linux.
Using Kiro, we are crafting both a signature Halloween visual experience and new workflow features:
- Kiro-Inspired Halloween Theme: Sleek midnight-purple surfaces, subtle spectral glows, tactile dark/light polish, and playful "ghost-hunting" scan discovery cards that turn finding phantom caches into a delight.
- Safe-by-Design Cleanup: Strictly trash-first (zero permanent deletion paths), with built-in guardrails that protect active projects, skip unowned
/tmpitems by default, and leave files modified within the last 24 hours untouched during bulk selection. - Project-Level Session Protection: Browse AI sessions grouped by project, pin/protect important projects from accidental cleanup, and view full conversation titles linked to cached archives and images.
- High-Scale Performance & Analytics: Smooth virtual scrolling across 5,000+ discovered items, real-time streaming scan progress, and visual cleanup trend charts (cumulative, daily, and per-client breakdowns).
How we built it
We built AI Cleaner on a unified cross-platform architecture that keeps all safety rules in one place while delivering a crisp, expressive desktop UI:
- Shared Cross-Platform Core (
AICleanerCorein Swift): Owns scanning, declarative per-platform JSON rule packs, session parsing,SafetyGuardboundaries, project protection, and cleanup history storage. All business and safety logic lives strictly in Core so the frontend never duplicates risky rules. - Platform Abstraction (
PlatformAdapter): Handles OS-specific primitives cleanly—FileManager.trashItemon macOS,IFileOperationon Windows, and the freedesktop.org Trash spec on Linux—along with non-traversing file inspection (lstat+ UID checks on POSIX;GetFileInformationByHandle, owner SID, and reparse-point/junction detection on Windows). - JSON-RPC 2.0 Sidecar (
aicleaner-core): Exposes Core capabilities over stdio with versioned contracts, cancellable jobs, streaming scan progress notifications, and idle auto-exit. - Unified Frontend (Tauri 2) + Kiro: A single Tauri 2 desktop UI shared across macOS, Windows, and Linux. We use Kiro to iterate rapidly on the signature Halloween theme (color tokens, ghostly scan transitions, micro-interactions) alongside new features like the redesigned scan flow, session attribution, and cleanup history visualizations.
Challenges we ran into
- Making Swift truly cross-platform and lightweight: Our original engine relied on Apple-specific frameworks (
Darwin, systemSQLite3,oslocks, andICU). We refactoredAICleanerCoredown toFoundationEssentials, bundled the SQLite amalgamation as a C target, migrated locks toSynchronization.Mutexand logging toswift-log, and removedICUdependencies to keep Windows and Linux packages lean. - Zero-compromise file safety across three OSes: Symlinks, Windows junctions/reparse points, and shared
/tmpdirectories are classic traps for cleanup tools. Enforcing non-following metadata checks and guaranteeing zero permanent-delete code paths across macOS, Windows, and Linux took careful design and cross-platform integration tests. - Keeping 5,000+ items silky smooth: AI clients can easily generate thousands of small session and cache artifacts. We replaced naïve list rendering with true virtualization and fixed layout overflow edge cases when switching into large unowned
/tmpgroups. - Balancing spooky charm with utility trust: A Costume Contest entry should feel atmospheric and memorable, yet a file cleaner must always feel calm, legible, and trustworthy. Using Kiro to iterate on contrast, spacing, and restrained motion helped us keep the Halloween theme playful without ever cluttering critical safety indicators.
Accomplishments that we're proud of
- Single source of truth for safety: Every platform shares the exact same
SafetyGuardengine with automated tests verifying that no permanent deletion path exists. - Cross-platform Swift + Tauri 2 working seamlessly: Running a Swift core as a streaming JSON-RPC sidecar inside Tauri 2 gave us native speed and a unified UI across macOS, Windows, and Linux.
- Turning a chore into an experience: Watching live client discovery cards light up in a midnight-purple Halloween theme while reclaiming gigabytes of disk space makes cleanup genuinely satisfying.
What we learned
- Decoupling safety from presentation pays off immediately: Moving selection rules, filtering, and guardrails into a standalone JSON-RPC core made cross-platform testing far easier and eliminated UI/logic drift.
- Great theming is about restraint and craft: A memorable Halloween costume doesn't require noisy gimmicks—consistent midnight-purple atmosphere, thoughtful copy ("ghost sessions", "phantom caches"), and purposeful micro-animations go much further.
- AI-assisted iteration with Kiro accelerates design polish: Having Kiro help refine theme tokens, motion states, and new feature specs let us spend more time testing real edge cases and perfecting UX details.
What's next for AI Cleaner
- Expanding our per-platform JSON rule packs to cover even more AI coding tools, local LLM runners, and agent frameworks.
- Finishing our cross-platform release pipeline (code signing, notarization, and Tauri auto-updates).
- Adding even more seasonal and customizable theme packs built with Kiro—plus optional scheduled "ghost sweeps" that notify you when AI caches cross a size threshold.