ClaudeModsClaude Code 模組目錄
☰
● 0 人在線上 · 瀏覽 0 次
+ 提交作品
← 返回作品集
GitHub 儲存庫 · 工作流程與 CI

time — Claude Code 插件/外掛 · ClaudeMods

回報這個作品這是你的作品?認領

在 ClaudeMods 了解這款 Claude Code 插件/外掛,查看原始來源與所需權限。 在訊息旁顯示時間戳記,方便回顧工作的節奏。

ddiegorv@diegorv
已翻譯

關於這個 mod

在訊息旁顯示時間戳記,方便回顧工作的節奏。

本作品由社群作者維護。功能、版本需求與設定方式,請查看下方原始 README。本站提供權限掃描結果;安裝前請檢查原始碼與外部相依套件。

安裝

請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。

claude plugin marketplace add diegorv/claude-functions-hook
claude plugin install time
原文 / README

claude-function-hooks

Function hooks for Claude Code, packaged as a plugin marketplace. Function hooks are early access: TypeScript modules that run inside the session, behind the CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 flag. The API may change between releases.

| Plugin | What it does | | --- | --- | | time | The time you sent each message, drawn above it | | gh-ci-status | GitHub Actions runs of the session's repo, pinned above the prompt, with links to the PR and the run |

time

The time above a message is the one of its first drawing, which is when you sent it, and it is kept per message, so a resize or a redraw does not move it. A resumed session, or a reload of the plugin, draws the old messages with the current time.

gh-ci-status

⚙ owner/repo · Actions · 1 running · 1 finished
#167  ◐ Running    PR       0m37s  chore(ci): smoke-test PR
main  ● Success    Deploy   2m15s  Release 1.4.0
  • Finds the repo the way gh does (gh repo view, the default remote), so gh must be on your PATH and logged in. Without a GitHub remote it logs one line and stays quiet. The check runs once, at session start, so a failure there, no network or an expired token, keeps it quiet for the whole session: after gh auth login, or once the network is back, restart the session or edit a hook module to reload the plugin.
  • Polls gh run list every 60 s, and every 15 s while a run is in flight or for 6 minutes after a push. A git push, git subtree push, gh pr merge, gh workflow run or gh run rerun in Bash wakes it.
  • #N links to the PR (matched by branch through gh pr list, or from refs/pull/N/head); the workflow name links to the run.
  • Shows runs from a push, a pull request, a manual dispatch, the merge queue, a release, or a workflow another one started, and leaves cron and issue bots out. Toasts when a run starts or finishes. A finished run stays for 5 minutes.

Use

# a folder of plugins needs Claude Code 2.1.265 or later
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude --plugin-dir /path/to/claude-function-hooks/plugins

Or install them from the marketplace, in a session started with the same flag:

/plugin marketplace add diegorv/claude-functions-hook
/plugin install gh-ci-status@claude-function-hooks
/plugin install time@claude-function-hooks

Edits to a hook module reload without restarting the session.

Develop

npm test           # node --test, no dependencies
npm run typecheck  # tsc
npm run format     # prettier
npm run validate   # claude plugin validate

The API's type declarations (.claude/types/) are not in git. Generate them with /plugin-types in a Claude Code session at the root of this repo, and regenerate after updating Claude Code.

Plugin layout

plugins/gh-ci-status/
  .claude-plugin/plugin.json   manifest
  hooks/hooks.json             points at the entry module
  src/core/                    the run model and the text derived from it, no I/O
  src/utils/                   generic helpers (text)
  src/app/                     use cases (the poller), dependencies injected
  src/infra/                   external clients (GitHub through gh)
  src/components/              the band's view model and its JSX
  src/hooks/                   the wiring to the engine
  *.test.ts                    next to the file it tests, run on Node
查看原始來源 ↗

更多類似作品