跳到正文
cccskills
免费在 GitHub 公开

create-hook

Create or update Codex hooks for global or project scope by asking for scope and hook type when ambiguous, then writing the hook config, scripts, and any required feature flag config.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(3)

  • SKILL.md2.0 KB
  • agents/openai.yaml399 B
  • references/hook-scope.md617 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Create Hook

Use when the user wants to add Codex hooks and explains the behavior they want.

Workflow

  1. Determine scope.

    • If the user says global, use the personal/home scope.
    • If the user says project, use the repo scope.
    • If scope is missing or unclear, ask: Should this be global or project-scoped?
  2. Determine hook type.

    • If the event is missing or unclear, ask which hook they want:
      • SessionStart
      • UserPromptSubmit
      • PreToolUse
      • PostToolUse
      • Stop
    • If the user wants more than one, keep them separate unless they explicitly want shared behavior.
  3. Determine behavior.

    • Ask what the hook should do if the intent is not already clear.
    • Prefer the smallest deterministic script that satisfies the request.
  4. Write the hook files in the chosen scope.

    • Global: ~/.codex/hooks.json and ~/.codex/hooks/
    • Project: <repo>/.codex/hooks.json and <repo>/.codex/hooks/
    • Keep script paths explicit and relative where practical.
  5. Enable the feature flag if the target Codex build still gates hooks.

    • Set [features] codex_hooks = true in the relevant config.toml.
  6. Keep the hook output clear.

    • Use statusMessage for a short visible signal.
    • For logging hooks, write to a repo-local or home-local log file.
    • For blocking hooks, return a nonzero exit only when the hook should actually stop the tool.
  7. Verify the result.

    • Run a command that should trigger the hook.
    • Confirm the log, output, or blocking behavior matches the requested scope and event.

Practical defaults

  • Use PreToolUse for prevention.
  • Use PostToolUse for logging, formatting, or test follow-up.
  • Use UserPromptSubmit for prompt shaping and injected context.
  • Use SessionStart for startup context.
  • Use Stop for end-of-turn checks.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

A fast Rust-based headless browser automation CLI with Node.js fallback that enables AI agents to navigate, click, type, and snapshot pages via structured commands.

中文简介正在准备中。当前显示原文说明。

am-will/codex-skills10372026年7月15日 更新

Build responsive, mobile-first layouts using fluid containers, flexible units, media queries, and touch-friendly design that works across all screen sizes. Use this skill when creating or modifying UI layouts, responsive grids, breakpoint styles, mobile navigation, or any interface that needs to adapt to different screen sizes. Apply when working with responsive CSS, media queries, viewport settings, flexbox/grid layouts, mobile-first styling, breakpoint definitions (mobile, tablet, desktop), touch target sizing, relative units (rem, em, %), image optimization for different screens, or testing layouts across multiple devices. Use for any task involving multi-device support, responsive design patterns, or adaptive layouts.

中文简介正在准备中。当前显示原文说明。

am-will/codex-skills10372026年7月15日 更新

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

中文简介正在准备中。当前显示原文说明。

am-will/codex-skills10372026年7月15日 更新

Build and run Gemini 2.5 Computer Use browser-control agents with Playwright. Use when a user wants to automate web browser tasks via the Gemini Computer Use model, needs an agent loop (screenshot → function_call → action → function_response), or asks to integrate safety confirmation for risky UI actions.

中文简介正在准备中。当前显示原文说明。

am-will/codex-skills10372026年7月15日 更新

Build, transform, audit, and migrate prompts for GPT-5.6 Sol using outcome-first contracts, explicit success criteria, evidence and tool rules, approval boundaries, output requirements, and stop conditions. Use when someone asks for a GPT-5.6 prompt, wants an existing prompt optimized for GPT-5.6, or needs a prompt stack adapted from an older model.

中文简介正在准备中。当前显示原文说明。

am-will/codex-skills10372026年7月15日 更新

Use when the user wants an end-to-end premium visual design workflow for any type of website or web page created directly from images.

中文简介正在准备中。当前显示原文说明。

am-will/codex-skills10372026年7月15日 更新

查看 am-will 的全部技能

报告此技能的问题