Skip to content
Back to skills

Tickets

ASecurity

優先度:P2 範圍:`termade-daemon`、`termade` CLI、`docs/` 相依:T20, T37 Status: done

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 23, 2026
ai-agents

Works with

  • cli

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 23, 2026

npx -y skills add single9/ertangle --skill tickets --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tickets?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tickets
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/single9-tickets/badge)](https://www.skillsdirectory.com/skills/single9-tickets)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# T38 — 額度感知的 spawn、即時額度警告與可安裝的 termade-ade skill

優先度:P2 範圍:`termade-daemon`、`termade` CLI、`docs/` 相依:T20, T37

Status: done

## 問題

agent 自行 spawn 子 session 會快速消耗 token,也可能在額度用盡時讓工作被中斷。

## 做法

1. **額度感知 spawn**:agent 自行建立 session 時檢查該 agent 的額度。達到 `[handoff] warn_percent` (預設 90%) 或已滿時,改用 `[handoff] fallback` 中可用的 agent;沒有可用者就以英文錯誤拒絕 (含重置時間)。成功的回覆一律附上簡短額度摘要,例如 `quota claude 72% (5h window)`。
2. **同時子 session 上限**:新增 `[agent_spawn] max_live_children` (預設 3),沿用既有 `max_children` 檢查;`[limits] max_children` 有設時以它為準。
3. **即時警告**:額度越線時除了 SessionNote,也透過匯流排送 `QUOTA_WARN <agent> <used>%: ...` 給執行中的 coordinator 與該 agent 的 session,可喚醒 `termade_wait`。`termade_whoami` 另外回傳 `quotas`。
4. **省 token 指引**:coordinator 協作說明與 `termade_spawn` 工具描述加入精簡原則。
5. **termade-ade skill**:內嵌 SKILL.md,提供 `termade skill install|uninstall|show`;`[collab] inject_skill = true` 時把內文附加到協作說明 (預設關閉)。

## 驗收

- `check_spawn_quota` 的放行、改用 fallback、拒絕三種情形有單元測試。
- skill 安裝與移除路徑 (claude/agents/codex) 以暫存目錄測試。

## Comments

- 2026-11-17:實機發現 Claude 在 7 天視窗超過 75% 時,`rate_limit_event` 回報 `"status":"allowed_warning"` (附 `surpassedThreshold: 0.75`)。原本 `parse_rate_limit_event` 把所有非 `allowed` 的狀態都當成 `reached`,導致 76% 就顯示「額度已滿」、送出 `QUOTA_WARN`,額度感知 spawn 也會誤拒。改為只有非 `allowed*` 的狀態 (如 `rejected`) 才算用完。

Files in this skill

  • README.md13.9 KB
  • T01-daemon-restart-state.md3.1 KB
  • T02-merge-safety.md3.6 KB
  • T03-gc-unmerged-work.md2.4 KB
  • T04-policy-engine-effective.md4.1 KB
  • T05-remote-mode-security.md3.6 KB
  • T06-ci-and-integration-tests.md2.8 KB
  • T07-daemon-concurrency.md3.1 KB
  • T08-event-log-rotation.md2.4 KB
  • T09-split-large-modules.md3.2 KB
  • T10-docs-and-makefile.md3.7 KB
  • T11-agent-config-and-model.md5 KB
  • T12-permission-settings.md5.8 KB
  • T13-tui-layout-modes.md4.2 KB
  • T14-session-resume.md6.7 KB
  • T15-notifications.md4.4 KB
  • T16-transcript-search.md3.5 KB
  • T17-budget-limits.md5.3 KB
  • T18-task-board.md4.9 KB
  • T19-daemon-prompt-queue.md4.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.