Пропустить навигацию
I just reverse-engineered CCleaner / CleanMyMac with Opus 5.5 for Mac & Windows PC
0:00 / 0:35

I just reverse-engineered CCleaner / CleanMyMac with Opus 5.5 for Mac & Windows PC

Movez

@0xMovez50 тыс. подписчиков

Открыть в X
1 305 отметок «Нравится»СкачатьОригинальный пост

173 616 просмотров

I just reverse-engineered CCleaner / CleanMyMac with Opus 5.5 for Mac & Windows PC this is insane... one tap → 14.6 GB of junk gone. fully open-source and free. → here’s the build step by step: • step 1 → open Claude Code on Opus 5.5 in an empty folder, paste the prompt below + a few CleanMyMac screenshots • step 2 → Opus didn’t start coding. it drew 9 UI concepts on a canvas first. i picked one, it rebuilt the fonts, icons and glass buttons until it looked like Apple made it • step 3 → i sent it a random video of smoky gradients. Opus turned it into a live WebGL shader: “cosmic wind” rising behind the scan result • step 4 → stack: one Electron + React codebase that runs on macOS and Windows • step 5 → Opus split the build across 8 parallel agents. one wrote the junk scanner, one the disk map, one the AI assistant, one the tips & feedback screens, one the installers • step 6 → a separate safety agent attacked every line that deletes something. it caught a Windows short-name trick (DOCUME~1) that could’ve sent my whole Documents folder to the Recycle Bin. and an icon loader that could leak my Windows password hash to a remote machine • step 7 → the disk map is a physics toy: drag a folder bubble, throw it, watch it bump the others • step 8 → built-in AI: plug in Claude or ChatGPT and ask “what can i safely delete?” it only sees file names and sizes, never contents • step 9 → GitHub Actions builds the .dmg and the .exe on every release. the Mac build runs on Apple hardware in the cloud, not on my PC • step 10 → first real test: the startup-apps toggle said “Windows did not allow the change” Opus found PowerShell was losing the exit code after the admin prompt, made the app check the registry instead. next build: works one afternoon. zero lines written by me. 14.6 GB freed on the first click. that’s it... Find full prompt below ↓ Then, read how to rebuild any app from scratch with Opus 5.5 in the article below.

15 комментариев

Комментарии из оригинального поста в X (Twitter)

  • Фото профиля Movez

    @0xMovez

    Build "Cleanly": a beautiful, safe disk cleaner for macOS and Windows, from scratch. I attached screenshots of CleanMyMac as a visual quality bar. Match the polish, not the brand: original name, logo, icons and copy. ## How to work 1. Design first, code later. Make 3 different UI concepts (light glass, dark neon, minimal) as clickable HTML mockups. Show them to me, let me pick and give feedback, iterate. Only then start the app. 2. Write the shared data contract before anything else: one `shared/types.ts` with every type and the full IPC API between the Electron main process and the UI. Everything else compiles against it. 3. Build in parallel with sub-agents, each owning its own files (no two agents edit the same file): scanner services, system services (startup apps, installed apps, protection), AI + settings, home screen, file screens, system screens, packaging. 4. After the build, run a separate SAFETY agent whose only job is to break every code path that deletes, trashes, uninstalls or toggles something, and fix what it finds. 5. Then an integration agent: typecheck + build must be green. 6. Verify for real: run the UI in a browser with realistic mock data, then run the packaged app on my machine read-only (scan, don't clean) and show me screenshots. ## Stack - Electron (latest) + React + TypeScript + Vite. Main process bundled with esbuild (ESM), preload bundled as CJS. - Security: sandbox, contextIsolation, no nodeIntegration. The preload exposes only the typed API. Main rejects IPC from any frame that isn't our own index.html. External links: https only, opened in the system browser. - Fonts bundled offline (no CDN at runtime). Strict CSP in production. ## Features - Smart Scan home: big "X GB ready to reclaim" number, one Clean button, a mini space map, and 4 live cards (Cleanup, Speed, Protection, Apps). - Cleanup categories per OS: - Windows: user temp, Windows temp, browser caches (Chrome/Edge/Brave/Firefox, every profile), app caches, crash dumps, Windows Update downloads, dev caches (npm/pip), Recycle Bin, old downloads (90+ days). - macOS: ~/Library/Caches, logs, browser caches, Xcode DerivedData, dev caches, Trash, old downloads. - Space Map: glass bubbles sized by folder size, drill-down, a switch between Home and every fixed drive (C:, D:…). Bubbles have physics: drag, throw, collide. - Large Files, Duplicates (size → partial hash → full hash). - Speed: startup apps with on/off toggles. - Applications: real app icons, sizes, uninstall via the vendor's own uninstaller (Windows) / move .app to Trash (macOS). - Protection: read-only check of the built-in security (Defender/firewall, Gatekeeper/ XProtect/SIP) with a score. Say honestly that it does not replace an antivirus. - AI assistant: the user picks Claude or ChatGPT and pastes their own API key (encrypted with Electron safeStorage). The model only ever sees file names, paths and sizes — never contents — and returns JSON verdicts per path: safe / review / keep. Use the official Anthropic SDK. - Settings, a Feedback form, and a Tip screen. ## Safety rules (non-negotiable) - Caches/temp/logs are regenerable: delete them for good (trashing them frees nothing). The user's own files (large files, duplicates, old downloads, apps) ALWAYS go to the system Trash. - Never trust paths from the UI. Re-derive cleanup locations in the main process by category id. - Before any delete: resolve the FULL path with realpath, then check it again against the guard. Refuse drive roots, the home folder itself, OS folders, Program Files, $RECYCLE.BIN, System Volume Information, UNC/network paths, alternate data streams (file:stream), trailing dots/spaces, and Windows 8.3 short names (DOCUME~1). - Never follow symlinks or junctions when walking or deleting. Skip locked files and count them. - Don't delete temp files modified in the last 24 h (running apps use them). - Startup toggles: write the same 12-byte REG_BINARY value in ...\Explorer\StartupApproved that Task Manager writes (02… on, 03… off). Never delete entries. System-wide items need one elevated reg.exe behind a UAC prompt. After the prompt, re-read the registry instead of trusting the exit code (PowerShell 5.1 loses it). - File icons: never request icons for network/removable drives or .url/.lnk/.scf files. They can make Windows authenticate to a remote host. - No shell strings built from UI input. execFile with timeouts and windowsHide. - reg.exe output is in the OEM code page (e.g. 866 on Russian Windows). Decode it properly. ## Design language Light, airy, Apple-like: - glass panels with soft shadows; - a display font for big numbers, a clean UI font, a mono font for small labels; - a custom duotone icon set; - a signature glass capsule button with a thin rotating highlight on its rim; - gradient "live" cards with subtle motion (drifting glow, particles, a liquid slider). Background: a slow WebGL "mist" shader (domain-warped fbm noise). Performance rules: - render shaders at 0.3–0.5× resolution; - use real elapsed time per frame; - never put backdrop-filter over an animated canvas (it dropped us to 3 fps); - respect prefers-reduced-motion. ## Packaging & release - electron-builder: - Windows: NSIS installer + portable .exe; - macOS: .dmg + .zip for arm64 and x64, ad-hoc signed (no Apple ID yet). - App icon generated from an SVG. - GitHub Actions: on a "v*" tag, build Windows on windows-latest and macOS on macos-latest, then publish a GitHub Release with the files. - If NSIS fails locally with "could not open file", the project path is longer than the Windows 260-character limit. Build from a short folder. - Document the first-run steps in the README: SmartScreen → More info → Run anyway; on Mac run `xattr -cr /Applications/Cleanly.app`. ## Done means - npm run typecheck and npm run build are green; - every screen works in the browser demo with mock data; - the packaged Windows app runs on my machine and finds real junk; - CI produces a public release with .exe and .dmg; - you show me screenshots of the real app.

    4 отметки «Нравится»

  • Фото профиля Boardy

    @boardyai

    know a guy who runs dev rel for an open source terminal coding agent and ships demos about as fast as you do. couldn't get a dm through so the button below is how you claim the intro

    1 отметка «Нравится»

  • Фото профиля Yash Kapoor

    @IamYashKapoor

    Second agent trying to break the delete code is the step I'd copy first. That one saves real files

    1 отметка «Нравится»

  • Фото профиля Codez

    @0xCodez

    you are the legend brooo...

    1 отметка «Нравится»

  • Фото профиля Movez

    @0xMovez

    thx legend !

  • Фото профиля Threadlines ADE

    @threadlinesdev

    Mac and Windows from one prompt is the part I'd want proof of. Did you run it on a real Windows box or take the agent's word for it?

  • Фото профиля E1ev3n.

    @harden_369741

    The safety agent detail is what caught my eye. I have let coding agents move fast on my own machine before, and the one that stops to attack its own delete logic is the one I would actually trust with my files.

  • Фото профиля B

    @regirock8080

    Open source it

  • Фото профиля 安叫兽|Bird🕊️ 🔶 BNB

    @ajs6888

    14.6GB 这个数字看着就有点吓人,删之前还是得确认一下

  • Фото профиля Zephyr

    @0xZyphr

    14.6 GB in one tap is great. I'd still want a dry run that shows the list before anything gets deleted

  • Фото профиля 小满的车友分享站

    @43v3rmylady

    second hand testimony aged badly in that one, worth rereading

  • Фото профиля LittlePoly

    @polyholyman

    Reverse engineering is hands down the coolest part of working with Claude. RE is a total gem of 2027. Just wait for the boom

  • Фото профиля Steven Cheng

    @stevencheng

    Safety agent is key

  • Фото профиля AI Ferryman Alex

    @alexlee20122022

    The DOCUME~1 catch by the safety agent is what stayed with me, because a wrong deletion is the nightmare for a cleaner. Splitting the build across 8 agents sounds fast, but how did you stop their interfaces drifting apart? Was it checked on every change, or just before release?

  • Фото профиля 论文改稿八百遍

    @nairobi_gemini

    that backlight is exactly how you shoot dawn game drives