Persistent IRC presence using ii (minimalist file-based IRC client) with event-driven mention detection. Use when setting up an AI agent on IRC, monitoring IRC channels, sending IRC messages, or integrating OpenClaw with IRC via ii. Covers ii setup, mention watcher, systemd services, and message sending/reading.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install ii-irc或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install ii-irc⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/ii-irc/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: ii-irc description: Persistent IRC presence using ii (minimalist file-based IRC client) with event-driven mention detection. Use when setting up an AI agent on IRC, monitoring IRC channels, sending IRC messages, or integrating OpenClaw with IRC via ii. Covers ii setup, mention watcher, systemd services, and message sending/reading. metadata: {"openclaw":{"os":["linux"],"requires":{"bins":["ii"]},"install":[{"id":"pacman","kind":"shell","command":"sudo pacman -S ii","bins":["ii"],"label":"Install ii via pacman (Arch)"},{"id":"apt","kind":"apt","packages":["ii"],"bins":["ii"],"label":"Install ii via apt (Debian/Ubuntu)"},{"id":"source","kind":"shell","command":"git clone https://git.suckless.org/ii && cd ii && make && sudo make install","bins":["ii"],"label":"Build ii from source"}]}} ---
ii writes all channel activity to plain files. A watcher script monitors for mentions and triggers OpenClaw system events. Responses are sent by writing to a FIFO.
~/irc/
├── irc.sh # Management script (start/stop/status/send)
├── watch-daemon.sh # Mention watcher → openclaw system event
└── <server>/
└── <channel>/
├── in # FIFO - write here to send messages
└── out # Append-only log of all channel messages
ii is in most package managers. On Arch: pacman -S ii. On Debian/Ubuntu: apt install ii. Or build from suckless.org.
Run the bundled setup script (creates ~/irc/irc.sh and ~/irc/watch-daemon.sh):
bash scripts/setup.sh --server irc.example.org --port 6667 --nick MyBot --channel "#mychannel"
Or create them manually — see scripts/irc.sh.template and scripts/watch-daemon.sh.template.
For auto-start on boot:
mkdir -p ~/.config/systemd/user
# IRC connection service
cat > ~/.config/systemd/user/irc-bot.service << 'EOF'
[Unit]
Description=IRC connection (ii)
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/ii -s SERVER -p PORT -n NICK -i %h/irc
ExecStartPost=/bin/bash -c 'sleep 3 && echo "/j CHANNEL" > %h/irc/SERVER/in'
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
EOF
# Mention watcher service
cat > ~/.config/systemd/user/irc-watcher.service << 'EOF'
[Unit]
Description=IRC mention watcher
After=irc-bot.service
Wants=irc-bot.service
[Service]
Type=simple
ExecStart=%h/irc/watch-daemon.sh
Restart=always
RestartSec=5
[Install]
WantedBy=default.target
EOF
# Replace SERVER, PORT, NICK, CHANNEL in the service files, then:
systemctl --user daemon-reload
systemctl --user enable --now irc-bot.service irc-watcher.service
# Via the management script
~/irc/irc.sh send "Hello, world!"
# Or write directly to the FIFO
echo "Hello, world!" > ~/irc/<server>/<channel>/in
Important: ii splits long messages at byte boundaries, which can break mid-word or mid-UTF8 character. Keep messages under ~400 characters. For longer content, split into multiple messages with brief pauses between them.
# Last N messages (token-efficient)
tail -n 20 ~/irc/<server>/<channel>/out
# Quick status (last 5 messages)
~/irc/irc.sh status
Never read the entire out file — it grows indefinitely. Always use tail with a limit.
watch-daemon.sh runs tail -F on the channel's out fileopenclaw system event --text "IRC mention: " --mode now in FIFOThis is event-driven — zero polling, instant response, minimal resource usage.
ii supports multiple channels on the same server. For each additional channel:
echo "/j #other-channel" > ~/irc/<server>/in
To watch multiple channels, either run separate watcher instances or modify watch-daemon.sh to monitor multiple out files.
ii is running (pgrep -f "ii -s"), verify server/portin FIFO must exist; check ExecStartPost timing (increase sleep if needed)pgrep -f watch-daemon), check nick matchesRestart=always handles this; ii exits on disconnect, systemd restarts it安装 ii-IRC 后,可以对 AI 说这些话来触发它
Send a Slack message to the #engineering channel about the deployment
Formats and sends the message with relevant context, tagging the right people
Summarize all unread messages in my inbox from today
Reads messages across connected channels and returns a prioritized summary
Draft a reply to this customer complaint and send it for review
Writes an empathetic, professional response and routes it to the approval queue
将技能文件夹放到 ~/.claude/skills/ii-irc/ 目录(个人级,所有项目可用),或 .claude/skills/ii-irc/(项目级)。重启 AI 客户端后,用 /ii-irc 主动调用,或让 AI 根据上下文自动发现并使用。
ii-IRC 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
ii-IRC 可免费安装使用。请查阅仓库了解许可证信息。
Persistent IRC presence using ii (minimalist file-based IRC client) with event-driven mention detection. Use when setting up an AI agent on IRC, monitoring IRC channels, sending IRC messages, or integrating OpenClaw with IRC via ii. Covers ii setup, mention watcher, systemd services, and message sending/reading.
ii-IRC 属于「Communication」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。