loop
하는 일
이 스킬은 고정된 간격으로 프롬프트를 실행하는 반복 작업을 설정합니다. 에이전트가 무언가를 계속 확인하거나 일상 작업을 반복하기를 원하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓작업을 몇 분, 몇 시간, 며칠마다 반복하고 싶을 때.
- ✓에이전트가 상태나 과정을 계속 지켜보기를 원할 때.
- ✓직접 시작하지 않아도 루틴이 계속 돌아가기를 원하는 경우.
스킬 링크
https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/loop/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“배포 상태를 15분마다 확인하고, 실패하면 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 간격과 프롬프트를 읽고 일정을 정한 뒤 등록합니다. 작동하는 모습을 볼 수 있도록 프롬프트를 바로 한 번 실행합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
/loop — schedule a recurring prompt
This skill turns a free-form [interval] <prompt> line into a cron tool call and runs the prompt once right away.
1. Parse the input
The user's text is whatever appears after /loop . Apply the three rules below in order and stop at the first match.
Leading interval token. If the first whitespace-separated token matches the regex
^\d+[smhd]$(case-insensitive), that token is the interval. Examples:5m,2h,1d,30s. The rest of the input is the prompt.Trailing
every <N><unit>clause. Otherwise, look for a clause at the end of the input of the formevery <N><unit>orevery <N> <unit-word>where<unit>iss|m|h|dand<unit-word>issecond(s)|minute(s)|hour(s)|day(s). Strip the clause; what's left is the prompt; the captured<N><unit>is the interval. Examples:every 20m,every 5 minutes,every 2 hours.Default. No interval found → interval is
10m, the whole input is the prompt.
If the input is empty, or is only an interval with no prompt body, reply with a one-line usage hint (/loop [interval] <prompt>) and stop. Do not schedule anything.
2. Special: empty prompt with autonomous opt-in
When the user types /loop <interval> (interval only) and the project has explicitly opted into autonomous-loop mode (a session-level flag the runtime sets), the prompt body is the sentinel <<autonomous-loop>>. The scheduler expands this sentinel at fire time into a self-directed tick instruction. If autonomous mode is not enabled, treat empty as the usage-hint case above.
3. Map interval → 5-field cron expression
| Pattern | Cron expression |
|---|---|
Ns |
treat as ceil(N/60)m; minimum is 1m |
Nm where N is 1–59 and divides cleanly (1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30) |
*/N * * * * |
Nm where N ≥ 60 and N/60 divides 24 (1, 2, 3, 4, 6, 8, 12) |
0 */(N/60) * * * |
Nh where N is 1–23 and divides 24 |
0 */N * * * |
Nd where N divides 31 sensibly (1, 2) |
0 0 */N * * |
Cron fields are UTC. These interval patterns are timezone-agnostic; the Nd
row fires at midnight UTC, not local midnight.
Rounding rule. If N does not divide its wrap-around cleanly (e.g. 7m, 90m, 5h, 7d), pick the nearest interval that does and tell the user explicitly what you rounded to and why. Acceptable nearby values:
- minutes < 60: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30
- hours: 1, 2, 3, 4, 6, 8, 12
- days: 1, 2
Examples of rounding messages:
7m→ "rounding 7m to 6m so the fires stay evenly spaced;*/7skews at the hour wrap"90m→ "rounding 90m to 2h; cron's hour field can't express 1.5h"
4. Call the cron tool
With the parsed cron expression and prompt, invoke the cron tool's schedule verb. Use whichever call form the tool's own prompt describes — pass cron and prompt as required, leave durable: false (the default; only set true when the user explicitly asked the job to persist across sessions), leave it recurring (the default; one-shot is wrong for /loop — one-shots come from natural-language scheduling).
The cron tool returns a job id. Mention it briefly so the user can cancel with /loops cancel <id>.
5. Execute the prompt once immediately
After the cron call succeeds, do not wait for the first scheduled tick. Run the prompt body once right now:
- If the prompt starts with
/(e.g./loop 5m /standup→ prompt is/standup), invoke it as a slash command — load the corresponding skill or command via theskilltool. - Otherwise, act on the prompt directly in this turn.
This is the "don't make the user wait" rule. The cron job carries the recurring behavior; the immediate run is for responsiveness.
6. Examples
| User input | Interval | Cron | Prompt |
|---|---|---|---|
/loop 5m /babysit-prs |
5m (leading) |
*/5 * * * * |
/babysit-prs |
/loop check the deploy every 20m |
20m (trailing) |
*/20 * * * * |
check the deploy |
/loop /standup every 2 hours |
2h |
0 */2 * * * |
/standup |
/loop tidy inbox |
10m (default) |
*/10 * * * * |
tidy inbox |
/loop 30s ping |
30s → 1m |
*/1 * * * * |
ping |
/loop 7m ping |
7m → 6m (rounded, explain) |
*/6 * * * * |
ping |
/loop |
(usage hint) | — | — |
/loop 5m |
autonomous-only | (if enabled) | <<autonomous-loop>> |
7. Do not
- Do not invent intervals the user didn't ask for. If unsure, default to
10mand sa
자주 묻는 질문
어떤 간격 형식을 쓸 수 있나요?
5m이나 2h 같은 간격으로 입력하거나, '20분마다'처럼 적을 수 있습니다. 생략하면 기본값은 10분입니다.
바로 한 번 실행되나요?
네. 스킬은 프롬프트를 즉시 한 번 실행한 뒤 일정에 따라 실행합니다.
빈 요청이면 어떻게 되나요?
스킬은 짧은 사용법 안내를 보여 주고, 아무 일정도 등록하지 않습니다.
상세 정보
작성자의 원본 설명
Schedule a prompt to fire on a fixed cadence (recurring loop). Use when the user asks to "run X every N minutes/hours/days", "loop X", "babysit Y", "be proactive about Y every N", or invokes `/loop` directly. Parses `[interval] <prompt>`, picks a clean cron expression, registers the job via the `cron` tool, and executes the prompt once immediately so the user sees activity without waiting for the first cron tick.
repo: XiaomiMiMo/MiMo-Code
인기도
- GitHub 스타
- 14k
- 순위
- #11330
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
effect
14k에이전트가 기억에 의존하지 않고 소스 코드와 문서를 확인해 Effect TypeScript 프레임워크에 관한 질문에 답하도록 돕습니다.
arxiv
14k에이전트가 arXiv의 학술 논문을 검색하고, 읽고, 인용하고, 추적하도록 돕습니다. 초록, BibTeX 인용, PDF 다운로드, 인용 관계를 포함합니다.
claude-code
14k에이전트가 코딩 작업을 Claude Code 명령줄 도구에 맡기도록 돕습니다. 한 번 실행하거나, 대화형 세션으로 하거나, 백그라운드 작업으로 돌릴 수 있습니다.
codex
14k채팅 창 없이 OpenAI Codex 명령줄 도구를 실행해 코딩 작업, 스크립트, 자동화 파이프라인을 처리하도록 에이전트를 돕습니다.