skills/chat/SKILL.md
Temporary chat lifecycle management - create, query, list, and respond to temporary chats. Primarily invoked by agents (PR Scanner, offline questions, etc.) to initiate user interactions. Use when user says keywords like "临时会话", "创建临时会话", "temporary chat", "/chat create", "发起讨论", "会话管理". Also supports direct user invocation via /chat create|query|list.
npx skillsauth add hs3180/disclaude chatInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Manage temporary chats with a four-state lifecycle: pending → active → expired / failed.
Each chat is a JSON file in workspace/chats/. Chats are automatically activated (group created) by the companion Schedule (chats-activation).
chat-timeout skill)Called by other agents/schedules that need to initiate a user interaction:
Agent → calls this Skill → creates pending chat file
No slash command needed; the agent invokes the Skill directly with chat parameters.
/chat create — Create a new temporary chat
/chat query {id} — Query chat status
/chat list — List all chats (optional --status filter)
When invoked, you receive:
Each chat is a single JSON file in workspace/chats/:
{
"id": "pr-123",
"status": "pending",
"chatId": null,
"createdAt": "2026-03-24T10:00:00Z",
"activatedAt": null,
"expiresAt": "2026-03-25T10:00:00Z",
"expiredAt": null,
"createGroup": {
"name": "PR #123 Review",
"members": ["ou_user1"]
},
"context": {"prNumber": 123},
"response": null,
"activationAttempts": 0,
"lastActivationError": null,
"failedAt": null
}
| Field | Required | Description |
|-------|----------|-------------|
| id | Yes | Unique chat identifier (used as filename: {id}.json) |
| status | Yes | pending → active → expired / failed |
| chatId | No | Group chat ID (filled by Schedule after group creation) |
| createdAt | Yes | ISO 8601 timestamp |
| activatedAt | No | ISO 8601 timestamp (filled by Schedule upon activation) |
| expiresAt | Yes | ISO 8601 UTC Z-suffix timestamp (e.g. 2026-03-25T10:00:00Z) |
| expiredAt | No | ISO 8601 timestamp (set when marked as expired by Schedule) |
| createGroup | Yes | Group creation config with name and members array |
| context | No | Arbitrary key-value data for consumer use |
| response | No | User response data (filled when user responds in group) |
| activationAttempts | No | Retry counter for group creation (managed by Schedule, default: 0) |
| lastActivationError | No | Last error message from failed group creation (managed by Schedule) |
| failedAt | No | ISO 8601 timestamp (set when marked as failed by Schedule) |
{
"response": {
"content": "User's response text",
"responder": "ou_developer",
"repliedAt": "2026-03-24T14:30:00Z"
}
}
All scripts accept input via environment variables (avoids shell quoting issues with JSON) and are located in skills/chat/. All scripts include built-in Chat ID validation (path traversal protection), file locking (via fs.flock), and native JSON validation. Scripts are implemented in TypeScript and run via tsx.
Usage: /chat create
CHAT_ID="pr-123" \
CHAT_EXPIRES_AT="2026-03-25T10:00:00Z" \
CHAT_GROUP_NAME="PR #123 Review" \
CHAT_MEMBERS='["ou_developer"]' \
CHAT_CONTEXT='{"prNumber": 123}' \
npx tsx skills/chat/create.ts
Validation (built into script):
CHAT_ID must match ^[a-zA-Z0-9_-][a-zA-Z0-9._-]*$ (no leading dots) and pass path traversal checkCHAT_EXPIRES_AT must be UTC Z-suffix ISO 8601 formatCHAT_MEMBERS must be a non-empty JSON array of ou_xxxxx open IDswriteFile + renameUsage: /chat query {id}
CHAT_ID="pr-123" npx tsx skills/chat/query.ts
Output is the raw JSON chat file. Display in readable format:
📋 Chat: pr-123
> **Status**: 🟡 Active (waiting for response)
> **Created**: 2026-03-24 10:00
> **Expires**: 2026-03-25 10:00
> **Group**: oc_xxx
> **Response**: None
Usage: /chat list [--status pending|active|expired|failed]
# List all chats
npx tsx skills/chat/list.ts
# Filter by status
CHAT_STATUS="active" npx tsx skills/chat/list.ts
Display in table format:
📂 Temporary Chats
| ID | Status | Created | Expires | Response |
|----|--------|---------|---------|----------|
| pr-123 | 🟡 Active | 03-24 10:00 | 03-25 10:00 | - |
| deploy-456 | 🔴 Expired | 03-23 08:00 | 03-24 08:00 | approved |
| ask-789 | 🟢 Pending | 03-24 12:00 | 03-25 12:00 | - |
Triggered by: User responds in the group chat (natural conversation).
CHAT_ID="pr-123" \
CHAT_RESPONSE="Looks good, approve it" \
CHAT_RESPONDER="ou_developer" \
npx tsx skills/chat/response.ts
Idempotency: If a response already exists, the script rejects the write (prevents accidental overwrites).
Note: After updating the chat, the consumer (PR Scanner, offline questioner, etc.) is responsible for polling the chat file and taking downstream action. This skill does NOT execute callbacks.
┌──────────────┐
│ │
▼ │
┌─────────────┐ Schedule ┌─────────────┐
│ pending │ ────────────>│ active │
│ 等待创建 │ (group │ 等待响应 │
└──────┬──────┘ created) └──────┬──────┘
│ │
│ 重试 ≥ 5 次 │ timeout / response
▼ ▼
┌──────────┐ ┌──────────┐
│ failed │ │ expired │
│ 创建失败 │ │ 已结束 │
└──────────┘ └──────────┘
| Status | Meaning | Trigger | Who Sets |
|--------|---------|---------|----------|
| pending | Waiting for group creation | Chat file created | This Skill |
| active | Group created, waiting for response | Schedule completes activation | chats-activation Schedule |
| failed | Group creation failed after max retries | Invalid members, API error, etc. | chats-activation Schedule |
| expired | Chat ended | User responded OR timeout | Consumer (response) / chat-timeout Skill (timeout) |
Consumers (PR Scanner, offline questions, etc.) use this pattern:
1. Consumer calls this Skill → creates pending chat file
2. Schedule detects pending → creates group via lark-cli → sets active
(or marks as failed after 5 retries if members are invalid)
3. Consumer detects chat is active (polls chat file) → sends message to group
4. User responds in group → consumer/skill updates chat file with response
5. chat-timeout Skill detects timeout → marks as expired, dissolves group
6. Consumer polls chat file → finds response → takes downstream action
workspace/chats/
├── pr-123.json # PR review chat
├── offline-deploy-456.json # Offline question chat
└── ask-review-789.json # Agent ask_user chat
chat-timeout skill dissolves)expiresAt (must be UTC Z-suffix).lock files (cleaned up by chats-cleanup schedule)| Scenario | Action |
|----------|--------|
| Chat file not found | Report "Chat {id} not found" |
| Chat already expired | Report "Chat {id} already expired, cannot update" |
| Chat status is failed | Report "Chat {id} failed to activate: {lastActivationError}" |
| Invalid JSON in chat file | Report error, do not overwrite |
| Duplicate id | Report "Chat {id} already exists" |
| Invalid chat ID (path traversal) | Report "Invalid chat ID" and reject immediately |
| Duplicate response | Report "Chat {id} already has a response" and reject |
| Node.js not available | Exit with error (required runtime, v20.12+ for file locking) |
| File locking unavailable | No-op fallback with warning (requires Node 20.12+) |
CHAT_ID="pr-123" \
CHAT_EXPIRES_AT="2026-03-24T22:00:00Z" \
CHAT_GROUP_NAME="PR #123: Fix auth bug" \
CHAT_MEMBERS='["ou_developer"]' \
CHAT_CONTEXT='{"prNumber": 123, "repository": "hs3180/disclaude"}' \
npx tsx skills/chat/create.ts
chats-activation Schedule reads the pending chat, creates group via lark-cli, updates status to active.
User replies in the group naturally (types text). Consumer or this skill updates the chat file with the response.
PR Scanner reads pr-123.json, finds response with user's decision, executes gh pr merge 123.
tools
--- name: issue-solver description: Issue Solver - creates a scheduled task to scan a GitHub repo for open issues, pick the best candidate, and submit a fix PR. Use when user wants to set up automated issue resolution. Keywords: "Issue Solver", "自动修 Bug", "solve issues", "issue solver", "issue solver 安装". allowed-tools: Read, Write, Edit, Bash, Glob, Grep --- # Issue Solver — Schedule 安装器 为指定 GitHub 仓库创建 Issue 扫描定时任务。将 schedule 模板实例化为可执行的 SCHEDULE.md。 **适用于**: 安装/配置 Issue Solver 定时任务 | **不适用于
testing
Dissolve a Feishu group chat and clean up associated resources. Use when a PR is merged/closed, a discussion is finished, or a group needs to be removed. Keywords: "解散群", "dissolve group", "删除群", "close group", "清理群".
data-ai
手气不错 — disclaude dogfooding skill. Randomly selects a real use case from disclaude's feature set, simulates a natural user interaction, and reports observations. Use when user says keywords like "手气不错", "随机测试", "feeling lucky", "dogfooding", "自我体验", "feeling-lucky".
tools
Feishu/Lark document operations via lark-cli. Read, upload, import, export, and manage Feishu docs. Keywords: '飞书文档', '上传文档', '读飞书文档', 'lark cli', '导入文档', '导出文档', 'upload to feishu', 'feishu doc', 'lark doc', 'lark-cli', 'feishu.cn', '读文档'.