loop
Fungsinya
Skill ini menyiapkan prompt yang berulang, misalnya memeriksa build atau pull request, dengan interval waktu atau jadwal mandiri. Ditujukan untuk orang yang ingin sesuatu terus dipantau atau diulang tanpa memulainya secara manual setiap kali.
Kapan dipakai
- βSaat Anda ingin tugas seperti memeriksa build diulang setiap beberapa menit.
- βKetika Anda ingin pull request atau deploy diperiksa lagi sesuai jadwal tertentu.
- βSaat Anda ingin melihat atau membatalkan tugas berulang yang sedang berjalan.
Link skill
https://github.com/QwenLM/qwen-code/blob/main/packages/core/src/skills/bundled/loop/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βPeriksa build setiap 10 menit dan beri tahu saya segera setelah gagal.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent membaca interval dan prompt, menjalankannya sekali segera, lalu menjadwalkan pengulangan berikutnya. Subperintah list menampilkan tugas aktif, dan subperintah clear membatalkannya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
/loop β run a prompt repeatedly
Subcommands
If the input (after stripping the /loop prefix) is exactly one of these keywords, run the subcommand instead of scheduling:
listβ call CronList and display the results. Done.clearβ call CronList, then call CronDelete for every job returned. Confirm how many were cancelled. Done.
Parsing
Parse the input after removing the /loop prefix:
- Empty input (no prompt, no interval): the autonomous path β run a self-paced autonomous loop. See the Autonomous mode section.
- Leading interval token: if the first whitespace-delimited token matches
^\d+[smhd]$(e.g.5m,2h), this is the fixed-interval recurring path. The rest is the prompt. - Trailing "every" clause: otherwise, if the input ends with
every <N><unit>orevery <N> <unit-word>(e.g.every 20m,every 5 minutes,every 2 hours), this is the fixed-interval recurring path. Extract that interval and strip it from the prompt. Only match when what follows "every" is a time expression βcheck every PRhas no interval. - Prompt-only input: otherwise, the entire input is the prompt and this is the prompt-only self-paced path.
If an interval was given but the prompt is empty (e.g. /loop 5m), this is a fixed-interval autonomous loop β see the Autonomous mode section.
Examples:
5m /babysit-prsβ fixed interval5m, prompt/babysit-prs(leading interval token)check the deploy every 20mβ fixed interval20m, promptcheck the deploy(trailing "every" clause)run tests every 5 minutesβ fixed interval5m, promptrun tests(trailing "every" clause)check every PRβ prompt-only self-paced path, promptcheck every PR("every" is not followed by a time expression)check the deployβ prompt-only self-paced path, promptcheck the deploy- (empty) β self-paced autonomous loop (sentinel
<<autonomous-loop-dynamic>>) 5mβ fixed-interval autonomous loop (interval5m, sentinel<<autonomous-loop>>)
Prompt-only self-paced path
Use this path only when the user supplied a prompt and no interval.
- Do not call CronCreate for this path.
- If this tick opens with a
<task-notification>block (a monitor or background event re-invoked you, not a bare/loopwakeup prompt), handle that event before re-running the prompt.- If the notification says the watched condition was met, cancel any pending fallback LoopWakeup with CronDelete if you still have its ID, then finish the loop.
- If a monitor auto-stopped on idle or max-events, restart it once if the watch is still useful, re-arm the fallback, report the restart count to the user, and include that count in the LoopWakeup prompt or reason (for example,
monitor restarted 1/1 time) so it survives context compaction. If it auto-stops again on the next tick, end the loop and report the repeated auto-stop to the user. - If the signal is ambiguous, re-arm a shorter follow-up and investigate on the next tick. If the signal remains ambiguous for three consecutive ticks, end the loop and report that the watch could not reach a clear conclusion.
- Run the parsed prompt immediately now.
- If it is a slash command, invoke it via the Skill tool.
- Otherwise, act on it directly.
- Before ending the turn, decide whether another check is useful.
- Call LoopWakeup only if continued follow-up is useful.
- Do not call LoopWakeup if the task is complete.
- Do not call LoopWakeup if the task is blocked on user input or external state that cannot be checked later.
- Do not call LoopWakeup just to keep polling when no useful next check exists.
- If you started a background agent or a Monitor, it wakes you via a terminal
<task-notification>on exit, failure, cancellation, or monitor auto-stop β so set LoopWakeup as a long fallback rather than a short poll. Do not omit it just because something is watching: the work may hang, or a Monitor may auto-stop on idle or max-events (and one owned by another agent routes its notification only to that agent). Omit LoopWakeup only on the terminal conditions above (complete, blocked, or repeated monitor auto-stop).
- When scheduling a continuation, call LoopWakeup with:
delaySeconds: the next useful delay in seconds. The runtime clamps to 60β3600 (1β60 min); follow the tool's own guidance on picking a value β it accounts for the prompt-cache window and for the fallback-heartbeat case when a background task will wake
Pertanyaan umum
Bagaimana cara melihat loop yang sedang berjalan?
Gunakan subperintah list, yang menampilkan tugas terjadwal.
Bagaimana cara menghentikan semuanya?
Gunakan subperintah clear, yang membatalkan setiap tugas terjadwal.
Bagaimana jika interval tidak diisi?
Agent menjalankan loop mandiri dan memilih waktunya sendiri.
Detail
Deskripsi asli dari pembuat
Create a loop that runs a prompt now and follows up either on a fixed schedule or through self-paced wakeups. Usage - /loop check the build, /loop 5m check the build, /loop check the PR every 30m. /loop list to show jobs, /loop clear to cancel all.
repo: QwenLM/qwen-code
Popularitas
- Bintang GitHub
- 29k
- Peringkat
- #9782
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
codegraph
29kMembantu agent Anda menganalisis kodebase yang sudah diindeks melalui grafik pemanggilan, dependensi, kode mati, titik panas, dan pencarian semantik.
qwen-code-claw
29kMembantu agent Anda menyerahkan tugas coding ke Qwen Code, seperti memahami codebase, memperbaiki bug, merapikan kode, atau membuat proyek baru.
structured-debugging
29kMengajari agent Anda men-debug bug sulit secara bertahap: menyusun hipotesis, menguji, dan menemukan penyebab asli sebelum memperbaiki.
tmux-real-user-testing
29kMembantu agent Anda menguji aplikasi terminal seperti pengguna sungguhan di dalam tmux, dengan log yang mudah dibaca dan cuplikan layar tiap aksi.
Skill serupa
knowledge-automation
394kMembantu agent Anda mengatur tugas terjadwal yang memasukkan konten baru ke Knowledge vault Anda secara rutin, lalu memastikan tugas itu berjalan.
knowledge-source-ingest
394kMembantu agent Anda menjaga Knowledge vault tetap mutakhir dengan item baru dari chat, feed, atau kotak surat, tanpa menambahkan ulang yang sudah ada.
benchmark
280kMembantu agent Anda mengukur kecepatan dan performa kode. Berguna untuk memastikan semuanya cepat dan menemukan penyebab kelambatan.