Token导航 LogoToken导航

Agent Skill · 研究检索

scaffold-codex-hooks(scaffold Codex hooks 搜索)

scaffold-codex-hooks 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

scaffold-codex-hooks 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 59,000。

总安装 396周安装 17GitHub Stars 13下载 139核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:scaffold-codex-hooks(scaffold Codex hooks 搜索)
来源仓库:https://github.com/jpcaparas/skills
仓库路径:skills/scaffold-codex-hooks
安装命令:
npx skills add https://github.com/jpcaparas/skills --skill scaffold-codex-hooks
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jpcaparas/skills --skill scaffold-codex-hooks

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

scaffold-codex-hooks 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。适用于关键词搜索、任务场景匹配或来源线索筛选等研究检索场景。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。

安装前需确认权限范围、维护状态,注意是否触发联网或文件操作。建议结合原始 README 和仓库内容进一步验证具体用法和功能边界。

来源仓库内路径:skills/scaffold-codex-hooks

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/jpcaparas/skills --skill scaffold-codex-hooks;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

scaffold-codex-hooks 怎么安装?

在终端执行 npx skills add https://github.com/jpcaparas/skills --skill scaffold-codex-hooks。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

scaffold-codex-hooks 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

scaffold-codex-hooks 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

scaffold-codex-hooks 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

scaffold-codex-hooks 用的人多吗?

公开数据是累计安装 396 次,近一周安装 17 次,下载 139 次,GitHub 13 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

scaffold-codex-hooks 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
scaffold-codex-hooks

scaffold Codex hooks 搜索 · 本页

39613需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

scaffold-codex-hooks

Audit the target project first, then scaffold Codex hooks with a deterministic managed layout around the current official hook model.

Decision Tree

What is the user asking for?

  • New project-local Codex hooks in a repo with no hook setup yet: Verify the live official docs and schemas, audit the repo, inspect the effective feature flag, enable it if needed, then scaffold.
  • Existing .codex/hooks.json, .codex/config.toml, or .codex/hooks/ files: Audit what exists first, choose additive or overhaul, then refresh only the managed hook layer.
  • Hooks that exist on disk but never seem to affect Codex: Inspect the effective codex_hooks feature first. If it is still off, enable it deliberately. If it is on, remember that repo-local .codex/config.toml only loads in trusted projects, then debug hooks.json.
  • Explanation only, not implementation: Read references/hook-events.md, references/feature-flag.md, and references/scaffold-layout.md, then answer without scaffolding.

Quick Reference

TaskAction
Verify the current official Codex hook modelRead https://developers.openai.com/codex/hooks, https://developers.openai.com/codex/config-basic, and the generated schemas listed in assets/hook-events.json
Audit a target repoRun scripts/audit_project.sh /path/to/project
Inspect the effective codex_hooks featureRun python3 scripts/check_hooks_feature.py --project /path/to/project --json
Enable hooks in project configRun python3 scripts/check_hooks_feature.py --project /path/to/project --enable --scope project
Enable hooks in user configRun python3 scripts/check_hooks_feature.py --project /path/to/project --enable --scope user
Understand the current event catalogRead references/hook-events.md
Decide additive vs overhaulRead references/merge-strategy.md
Generate or refresh the managed hook scaffoldRun `scripts/scaffold_hooks.sh --project /path/to/project --plan /path/to/plan.json --mode additive
Merge generated handlers into .codex/hooks.jsonLet scripts/scaffold_hooks.sh call scripts/merge_hooks_json.sh, or run the merge script directly
Regenerate the hooks README in a target projectRun scripts/render_hooks_readme.sh --project /path/to/project --plan /path/to/plan.json

Non-Negotiable Workflow

  1. Verify the live official Codex hook docs before planning any scaffold.
  2. Compare the live docs, current schemas, and assets/hook-events.json before assuming the event set or output contract is unchanged.
  3. Audit the target project in detail before deciding which events to enable or which commands to run.
  4. Inspect the effective codex_hooks feature in the target project before treating any repo-local hooks.json as active.
  5. If the feature is off, enable it deliberately in the right scope:

- default to project scope for shared repo scaffolds - use user scope for personal/global hooks or when the repo should not commit .codex/config.toml

  1. Inspect any existing .codex/config.toml, .codex/hooks.json, .codex/hooks/, AGENTS.md, README*, and other automation files before choosing a merge mode.
  2. Produce or update a concrete hook plan JSON. Keep the scaffold deterministic by putting project-specific judgment into the plan, not into the scaffold script.
  3. Scaffold every current official event as a commented bash stub under the managed hook root, even if that event stays disabled in hooks.json.
  4. Wire only the enabled events into .codex/hooks.json so inactive stubs stay cheap.
  5. Regenerate .codex/hooks/README.md so the target project always has a readable event map.
  6. If hooks still appear inactive after a real scaffold, re-check the effective feature state and remember that project config files only load in trusted projects.

Feature First Heuristic

Check codex_hooks early whenever any of these signals appear:

  • the user asks to scaffold Codex hooks into a repo
  • .codex/hooks.json exists, but nothing seems to happen
  • the user is unsure whether the feature flag is on
  • a repo-local .codex/config.toml exists, but the effective feature still looks off

Use this flow:

  1. Canonicalize the target project path first.
  2. Run python3 scripts/check_hooks_feature.py --project /path/to/project --json.
  3. If the effective status is off, enable the feature deliberately:

- --scope project for shared repo-local setups - --scope user for personal/global setups

  1. Re-run the inspection after enabling.
  2. Only then spend time debugging hooks.json, matcher choices, or hook script logic.

Live Docs First

The official Codex docs are the source of truth:

  • https://developers.openai.com/codex/hooks
  • https://developers.openai.com/codex/config-basic
  • https://developers.openai.com/codex/config-reference

For exact wire formats and current parser behavior, also verify:

  • https://github.com/openai/codex/tree/main/codex-rs/hooks/schema/generated
  • https://raw.githubusercontent.com/openai/codex/main/codex-rs/hooks/src/engine/discovery.rs
  • https://raw.githubusercontent.com/openai/codex/main/codex-rs/hooks/src/engine/config.rs
  • https://raw.githubusercontent.com/openai/codex/main/codex-rs/hooks/src/events/common.rs

Use the article at https://reading.sh/codex-hooks-just-gave-you-back-complete-control-over-your-code-57d044bcae1b as secondary material for practical patterns, not as the source of truth. Early hook writeups drifted as the feature evolved.

Project Analysis Rules

Before choosing any hook structure, inspect:

  • repo root and workspace shape
  • whether the project already has .codex/config.toml, .codex/hooks.json, or .codex/hooks/
  • languages and package managers
  • build, test, lint, format, and validation entry points
  • monorepo tools like Turborepo, Nx, pnpm workspaces, Bun workspaces, Cargo workspaces, or custom task runners
  • existing AI instructions such as AGENTS.md, project rules, or repo automation docs
  • existing Git hooks, Husky, Lefthook, or CI gates
  • sensitive paths like .env, secrets, lockfiles, generated code, migrations, and infra directories
  • whether the hook setup should be shareable in repo config or kept user-local

Run scripts/audit_project.sh first, then read references/project-analysis.md when you need the full checklist.

Deterministic vs Project-Specific Work

Keep these parts deterministic:

  • managed hook root path
  • event stub filenames
  • generated hooks.generated.json shape
  • merge behavior for previously managed hooks
  • hooks README generation
  • event manifest coverage for every current official Codex hook event
  • feature-flag inspection and reporting

Allow these parts to stay project-specific:

  • which events are enabled
  • matcher regexes for supported events
  • timeouts and status messages
  • whether feature enablement belongs in project or user config
  • the actual logic inside enabled event scripts
  • whether the refresh is additive or overhaul

Repeat-Run Rules

When the skill is invoked again against a project:

  • Re-verify the live docs and schemas before assuming the event set is unchanged.
  • Re-audit the project before assuming the current hook plan still fits.
  • Re-check the effective feature state before assuming repo-local hooks are active.
  • Preserve non-managed hooks by default.
  • Treat previously generated hooks under the managed root as replaceable in overhaul mode.
  • Treat previously generated hooks as append-only in additive mode unless the managed layer or README is stale.
  • If the official event set or parser rules changed, update the scaffold inputs first.

Scaffold Rules

  • Generate bash scripts, not Python, for the managed runtime hook stubs.
  • Comment the generated bash stubs with the event-specific input and output contract.
  • Default to a managed root of .codex/hooks/generated.
  • Default to a hooks file target of .codex/hooks.json.
  • Default to enabling codex_hooks in .codex/config.toml for shared repo scaffolds.
  • Use ~/.codex/config.toml only when the hook setup should stay personal or machine-local.
  • Keep one managed script per official event so the event map stays obvious.
  • Keep the merged hooks.json deterministic: remove only previously managed handlers, never unrelated custom hooks.
  • Never assume async, prompt, or agent hooks work today. The current runtime skips them.
  • Never pretend PreToolUse or PostToolUse can currently see Write, MCP, WebSearch, or every shell invocation. Today the useful matcher value is Bash.
  • Treat Stop carefully. For that event, decision: "block" means "continue Codex with this new prompt", not "reject the turn".

Reading Guide

NeedRead
Full audit checklist and planning questionsreferences/project-analysis.md
How to inspect and enable codex_hooks safelyreferences/feature-flag.md
Current official event list, matcher support, and output semanticsreferences/hook-events.md
Managed folder layout and plan file shapereferences/scaffold-layout.md
Additive versus overhaul behaviorreferences/merge-strategy.md
Runtime limits, docs drift, and fail-open trapsreferences/gotchas.md

Operational Scripts

  • scripts/audit_project.sh builds a project profile from real repo signals.
  • scripts/check_hooks_feature.py inspects or enables codex_hooks in user or project config.
  • scripts/scaffold_hooks.sh renders the managed hook tree, manifest, fragment, README, and feature setup.
  • scripts/merge_hooks_json.sh preserves non-managed handlers while replacing previously managed ones.
  • scripts/render_hooks_readme.sh rebuilds .codex/hooks/README.md from the manifest and current plan.
  • scripts/validate.py checks structure, frontmatter, manifest integrity, and cross-references.
  • scripts/test_skill.py runs lightweight validation plus temp-project integration checks.

Gotchas

  1. PreToolUse and PostToolUse are Bash-only today. A regex like Edit|Write is valid, but it will not match anything useful in current Codex.
  2. matcher is ignored for UserPromptSubmit and Stop. Do not design logic that depends on those matchers.
  3. async, prompt, and agent parse in config shapes, but the current runtime skips them with warnings.
  4. Multiple matching command hooks for the same event run concurrently. One hook cannot stop another matching hook from starting.
  5. PostToolUse cannot undo command side effects. At best it can replace the feedback Codex sees next.
  6. Stop with decision: "block" continues Codex with a new prompt. It does not reject the turn.
  7. Repo-local .codex/config.toml only loads in trusted projects. If you enable the feature in project scope but the project is not trusted, the effective feature can still look off.
  8. Early blog posts described smaller event sets. Re-check the official docs and schemas every time you scaffold for real.

平台分布

Codex

35.71%
按下载量换算50

Claude

29.11%
按下载量换算40

Cursor

19.22%
按下载量换算27

Gemini CLI

8.71%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills