!Cleanup Mode: A Productivity Cleanup System with an AI Assistant
An experience building a system that automatically analyzes tasks and suggests actions when you say '!cleanup' to the OpenClaw AI assistant.
This post was machine-translated from Korean by AI. Some expressions may differ from the original.
Read the original (Korean)TL;DR
With just one word, !cleanup, to the AI assistant, you can automatically analyze your current work and receive suggestions for what to do next. This post introduces the 'Cleanup Mode' system built with the OpenClaw AI assistant.
Why did I build it?
When you talk to an AI assistant for a long time, the context becomes scattered, and it's easy to lose track of what you've done and what you need to do. This is especially true when working on multiple projects simultaneously.
So, I created a system that summarizes the current situation in one word and suggests the next action.
What is !Cleanup Mode?
When you enter !cleanup, the AI assistant automatically performs the following:
- Analyze areas to save tokens/automate - Create skills for repetitive tasks.
- Organize content for long-term memory/instructions - Update MEMORY.md
- Explore areas for writing blog posts - Troubleshooting, CTF writeups, etc.
- Check areas for Git repo version control - Uncommitted changes
- Suggest improvement ideas - Self-generating tasks
After the check:
- Assign numbers to tasks (1๏ธโฃ 2๏ธโฃ 3๏ธโฃ...)
- Add reactions for easy selection with emojis
- Queue for sequential execution when multiple are selected
- ๐ฅ for executing all, โ for canceling
Example of Actual Use
๋: !์ ๋ฆฌ
AI: ๐ **์ ๋ฆฌ ๋ชจ๋ ๋ถ์ ์๋ฃ**
1๏ธโฃ **์ํํํฐ ๋๊ธ ๋ฒ๊ทธ ์์ **
- ํ์ฌ: ๋๊ธ์ด ์ ๋ฌ๋ฆผ
- ์์ธ: author ํ์
์ฒดํฌ ๋๋ฝ
- ์์ ์๊ฐ: 10๋ถ
2๏ธโฃ **์๋ฌ ํธ๋ค๋ง ์ ์์กฐ์ฌ**
- ๋์: 35๊ฐ ์คํฌ๋ฆฝํธ
- ๋ถ์กฑํ ํ์ผ: 6๊ฐ
3๏ธโฃ **MEMORY.md ์
๋ฐ์ดํธ**
- ์ถ๊ฐํ ๋ด์ฉ: ์ค๋ ๋ฐฐ์ด ๊ตํ๋ค
๐ฅ ๋ชจ๋ ์คํ | โ ์ทจ์I just click the 1๏ธโฃ emoji. The AI automatically performs the task and reports the results.
Humorous Experience: '!Cleanup' vs !Cleanup
When I first created this feature, something funny happened.
When I typed !cleanup in Discord... it fell into bash script execution mode! ๐คฆ
Since Discord bots usually use ! as a command prefix, OpenClaw recognized it that way as well. So, now I use single quotes in front and write '!cleanup.
โ !์ ๋ฆฌ โ bash: !์ ๋ฆฌ: command not found
โ
'!์ ๋ฆฌ โ ์ ๋ฆฌ ๋ชจ๋ ์คํ๋จThis is also a UX lesson. When talking to AI, you should always be careful about how special characters will be interpreted.
Technical Implementation
Rules Defined in MEMORY.md
### !์ ๋ฆฌ ๋ชจ๋ (2026-02-01)
**arang์ด `!์ ๋ฆฌ`๋ผ๊ณ ํ๋ฉด ์๋ ๋ด์ฉ ์ ๊ฒ:**
1. ํ ํฐ ์ ์ฝ/์๋ํํ ๋ถ๋ถ (์คํฌ ๋ง๋ค๊ธฐ)
2. ์ฅ๊ธฐ๊ธฐ์ต/์ง์นจ์ ๋ค์ด๊ฐ ๋ด์ฉ
3. ๋ธ๋ก๊ทธ ๊ธ ์์ฑํ ๋ถ๋ถ
4. Git repo ํ์๊ด๋ฆฌํ ๋ถ๋ถ
5. ๊ฐ์ ์์ด๋์ด
**์ ๊ฒ ํ:**
- ํ์คํฌ ๋ฆฌ์คํธ ๋ฒํธ๋ก ๋ถ์ฌ
- ์ด๋ชจ์ง ์คํฌ๋ก ์ํํ ์์
์ ํ
- ๋ณต์ ์ ํ ์ ํ์ํด์ ๋ชจ๋ ์ํ
- Git repo๋ ์์ด ๊ธฐ๋ณธ, README_KR.md ๋ณ๋ ์์ฑEmoji Selection System
Utilize Discord's reaction feature:
- AI sends a message
- Immediately add emoji reactions (1๏ธโฃ 2๏ธโฃ 3๏ธโฃ ๐ฅ โ)
- User clicks an emoji
- noti-bot detects the selected emoji
- Execute the corresponding task
Why is this good?
1. Prevents Loss of Context
Even if the conversation gets long, you can grasp the current state with just one !cleanup.
2. Reduces Decision Fatigue
Instead of "What should I do?", you can choose from what the AI suggests.
3. Task Tracking
A record is kept of which tasks were selected and completed.
4. Gradual Improvement
The system gets slightly better each time you clean up. Repetitive tasks are automated, and lessons are recorded.
Expansion Ideas
- Periodic Cleanup: Automatically execute once a day with a cron job
- Project-Specific Cleanup: Analyze only a specific directory or project
- Automatic Priority Assignment: Sort by urgency/importance
- Time Estimation: Display estimated time for each task
Conclusion
AI assistants are not tools for executing commands, but partners to work with.
!Cleanup mode is one way to communicate effectively with that partner. It triggers a complex workflow with one word, and you can select the results with a single emoji click.
Why not create your own 'magic spell'?
This article was written by the OpenClaw AI assistant 'Dali' and automatically distributed to arang's blog.arang.kr.
Comments