Skip to main content

klapp

Klapp (klapp.mobi) school communication integration. Read messages from the Klapp inbox. Triggers on "klapp", "check klapp", "klapp nachrichten", "klapp messages".

インストールへ移動

ソース情報

リポジトリ
stumpigit/nanoclaw-klapp
ソースの最終更新活動
2026年3月13日 19:46
検出された SKILL.md の言語
英語
スター
2
フォーク
0

インストール方法

デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。

ソースファイルを確認

インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。

ファイルエクスプローラー
8 ファイル

SKILL.md を表示中

SKILL.md
ソースの指示 · 読み取り専用プレビュー
name
klapp
description
Klapp (klapp.mobi) school communication integration. Read messages from the Klapp inbox. Triggers on "klapp", "check klapp", "klapp nachrichten", "klapp messages".
# Klapp Integration Reads messages from [klapp.mobi](https://klapp.mobi) — a Flutter-based school communication platform. ## Architecture ``` Container (agent) └── mcp__nanoclaw__klapp_read_messages └── writes IPC → data/ipc/{group}/tasks/ ↓ Host (src/ipc.ts → handleKlappIpcInline) └── spawns .claude/skills/klapp/scripts/read-messages.ts via npx tsx └── Playwright (headless Chromium) → klapp.mobi └── returns JSON → data/ipc/{group}/klapp_results/{requestId}.json ↓ Container polls result → returns formatted messages to user ``` ## Credentials Loaded automatically from `groups/global/secrets.env`: ```env KLAPP_USERNAME=your@email.com KLAPP_PASSWORD=yourpassword ``` ## Browser Session A persistent Chromium profile is stored in `data/klapp-browser-profile/` so the session is reused across calls (no repeated logins). Debug screenshots are saved to `data/klapp-screenshots/` if anything goes wrong. ## Usage (via WhatsApp / any channel) ``` @Andy check my klapp messages @Andy Klapp Nachrichten lesen @Andy any new messages in klapp? ``` ## Files | File | Purpose | |------|---------| | `scripts/read-messages.ts` | Playwright script: login + scrape inbox | | `host.ts` | Reference copy of host-side IPC handler (actual code is inlined in `src/ipc.ts`) | | `agent.ts` | Container-side MCP tool definitions (reference; actual tool is in `container/agent-runner/src/ipc-mcp-stdio.ts`) | ## Integration Points (already applied) **`src/ipc.ts`** — `handleKlappIpcInline` + `runKlappScript` functions handle `klapp_read_messages` IPC type. **`container/agent-runner/src/ipc-mcp-stdio.ts`** — `klapp_read_messages` MCP tool added. **`package.json`** — `playwright` dependency added; Chromium downloaded to `~/.cache/ms-playwright/`. ## Troubleshooting ### Login fails / wrong elements clicked Klapp is a Flutter CanvasKit app — the UI is rendered on canvas with a semantic overlay. Debug screenshots in `data/klapp-screenshots/` show what Playwright sees at each step. To re-run the login script manually: ```bash NANOCLAW_ROOT=$(pwd) npx tsx .claude/skills/klapp/scripts/read-messages.ts ``` ### Selectors break after Klapp update Edit the selector arrays in `scripts/read-messages.ts`: - `userSelectors` — username field - `passSelectors` / `allTextboxes.nth(1)` — password field - `submitSelectors` — login button - `navSelectors` — inbox navigation - `itemSelectors` — message list items Check `data/klapp-screenshots/` for the numbered screenshots to see what the page looks like at each step. ### Clear saved session ```bash rm -rf data/klapp-browser-profile/ ``` ### Rebuild after changes ```bash npm run build systemctl --user restart nanoclaw ```
GitHubで見る