Pi Loop logo

Pi Loop

Community
Dimon94
pi-loop

在 pi 里按节奏重复跑同一条提示词或 skill(/loop)。用户要在 pi 中定时轮询、按间隔或 cron 重复任务、让 issue-sweep 这类 skill 自定节奏持续跑,或安装、排查、卸载 pi-loop 扩展时使用。

Overview

PublisherDimon94
Repositoryskills
Skill namepi-loop
Stars
107
Forks
21
Bundled files
11
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 11 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Dimon94 on GitHub. Read the source before you install it.

Installation

Install the Pi Loop AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Dimon94/skills/tree/main/skills/pi-loop
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Dimon94/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/pi-loop .claude/skills/pi-loop
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pi Loop in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pi Loop on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pi Loop is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

pi-loop

pi 没有内置 /loop。本 Skill 自带一个 pi 扩展,提供 /loop 命令与 loop_next、loop_status 两个工具。循环状态存在当前会话记录里,不写仓库文件。

安装

安装会在 ~/.pi/agent/extensions/pi-loop 建一个指向本 Skill lib/ 的 symlink,pi 启动时会执行这份代码。先取得用户明确授权,再运行:

bash
node skills/pi-loop/scripts/install.js            # 安装
node skills/pi-loop/scripts/install.js --check    # 只读检查:installed / missing / drift
node skills/pi-loop/scripts/install.js --uninstall

PI_EXTENSIONS_DIR 可覆盖扩展目录。安装或卸载后,在 pi 里运行 /reload。删除本 Skill 前先卸载。

用法

/loop 只能由用户在 pi 交互会话(TUI)里输入。模型不能新建循环。用户想重复做某件事时,给出对应命令,由用户自己输入:

场景命令
模型自定节奏地持续扫票/loop auto /skill:issue-sweep wip=2
每 5 分钟看一次 CI,最多 12 次/loop 5m --max=12 检查 CI 状态,失败就报原因
工作日 9 点出日报/loop cron 0 9 * * 1-5 @docs/daily-prompt.md
查看、暂停、恢复、立即跑、停止/loop list · /loop pause <名> · /loop resume <名> · /loop run <名> · /loop stop <名>

完整语法运行 /loop help。

在循环轮次里

循环触发的每一轮,扩展都会在上下文里注入一条以 [pi-loop] 开头的说明。照它执行:

  • auto 循环:本轮结束前必须调用一次 loop_next。还要继续就给 delay,纯数字按秒,范围 60 到 86400,也接受 15m、2h。事情已经做完、不用再查,就给 reason,写一句理由。
  • 固定间隔与 cron 循环:不要调用 loop_next。
  • 本轮做不完时,交代进度后结束本轮。下一轮会重新收到同一条提示词,不要在一轮里自己睡眠或轮询。

排查

先调用 loop_status,或让用户运行 /loop list。两者都会列出每个循环的状态与最近 5 条事件。

循环遇到下列情况会暂停,不会自己恢复。原因修好后,由用户运行 /loop resume <名>:

暂停原因处理
本轮被 Esc 中断确认要继续再恢复
消息发出 30 秒内没有开工检查模型、鉴权,或斜杠提示词是否被别的命令吃掉
连续 2 轮没调 loop_next检查 skill 是否要求调用;必要时改用固定间隔
提示词文件读不了文件需存在、非空、不超过 64KB

其他边界:

  • 只在 TUI 会话里调度。print、json、rpc 模式与子 agent 会话不恢复也不触发循环。非 TUI 模式输入 /loop 会收到一行 stderr 说明,但退出码仍为 0。
  • 同一会话同一时刻只跑一轮。会话忙或有排队消息时让路,空闲后再跑。
  • 停机期间错过的轮次不补跑。重新打开同一会话后,中断的那一轮从打开时刻起算一个周期,未到点的循环保持原时刻。
  • 循环跟着会话与分支走。/tree 切到别的分支后,以那条分支上记录的循环为准。
  • 未写 --until 的循环 7 天后自动停止。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pi Loop AI skill do?

在 pi 里按节奏重复跑同一条提示词或 skill(/loop)。用户要在 pi 中定时轮询、按间隔或 cron 重复任务、让 issue-sweep 这类 skill 自定节奏持续跑,或安装、排查、卸载 pi-loop 扩展时使用。

Why use Pi Loop on TypingMind?

Because you install it once and use it with any model. Pi Loop is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pi Loop in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Dimon94/skills/tree/main/skills/pi-loop. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pi Loop?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pi Loop?

As many as you like. As long as a model supports skills, you can use Pi Loop with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pi Loop AI skill free?

It is published on GitHub by Dimon94. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇