ClaudeModsClaude Code 模组目录
☰
● 0 人在线 · 浏览 0 次
+ 提交作品
← 返回作品集
GitHub 仓库 · Git 与代码审查

gh-ci-status — Claude Code 插件 · ClaudeMods

回报这个作品这是你的作品?认领

在 ClaudeMods 了解这款 Claude Code 插件,查看原始来源与所需权限。 把当前仓库的 GitHub Actions 状态固定在输入框上方。

ddiegorv@diegorv
已翻译

关于这个 mod

把当前仓库的 GitHub Actions 状态固定在输入框上方。

此作品由社区作者维护,具体功能、版本要求与配置方法请查看下方原始 README。本站提供权限扫描结果;安装前请检查源码及外部依赖。

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add diegorv/claude-functions-hook
claude plugin install gh-ci-status
原文 / 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
查看原始来源 ↗

更多类似作品