agentleFS
codestripes-devcodestripes-dev/clooks/page/llms.txt

clooks / page

llms.txt4 starsChanged 3 months agoMITView on GitHub

A TypeScript hook runtime for Claude Code and Codex CLI. Both integrations are shipped. Codex supports twelve events, not full Claude capability parity. Other native agent integrations are not shipped; Claude Code can also run through its IDE integrations. Clooks sits between native hooks and user-defined scripts. A bash entrypoint invokes a compiled Bun binary that reads .clooks/clooks.yml. Configuration, matching, ordering, execution, and tests are shared; normalization and decisions are agent-specific. The default onError: block requests the event's available refusal.…

  • In this repositoryOne other file it gives its agents.

The file

We split this llms.txt into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run these two external CLI commands in your terminal:

    line 15
  2. Very specific:

    Keep ~/.local/bin on PATH in your shell profile.

    line 59
  3. Very specific:

    Stop/SubagentStop: allow/block/skip.

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 1,484 llms.txt files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
llms.txt
# Clooks

> A TypeScript hook runtime for Claude Code and Codex CLI. Both integrations are shipped. Codex supports twelve events, not full Claude capability parity. Other native agent integrations are not shipped; Claude Code can also run through its IDE integrations.

Clooks sits between native hooks and user-defined scripts. A bash entrypoint invokes a compiled Bun binary that reads `.clooks/clooks.yml`. Configuration, matching, ordering, execution, and tests are shared; normalization and decisions are agent-specific. The default onError: block requests the event's available refusal. Post-tool feedback cannot undo effects; observational events cannot universally prevent native actions. Repositories and hook code are trusted, not sandboxed by Clooks.

Hooks use the named export `export const hook: ClooksHook = { ... }` with meta and per-event handlers, importing ClooksHook from `./types`. Custom hooks live in `.clooks/hooks/`; installed hooks are vendored into `.clooks/vendor/`. Commit configuration and vendored hooks, but install the runtime separately. Codex project registrations use a committed project ID and a portable ancestor-search launcher, so clones, moves, and worktrees do not require path repair.

Supported platforms: macOS and Linux. Windows is deferred.

## Setup

### Codex Plugin

Run these two external CLI commands in your terminal:

    codex plugin marketplace add codestripes-dev/clooks-marketplace
    codex plugin add clooks@clooks-marketplace

Then run setup inside Codex, in your intended project:

    $clooks:setup

The setup instruction is not a shell command. Do not join it to the external CLI commands with &&. Review native hook trust when prompted. After approval, the startup reminder can arrive on the first user message in the same session; trust approval alone does not require restart. Review generated runtime hooks when prompted after init too.

The plugin provides onboarding only. Startup checks executable availability and returns a read-only reminder; it never executes the binary, downloads, installs, updates, initializes, edits profiles, or invokes setup. Only explicit user invocation authorizes setup. Default Codex setup initializes the intended project with `clooks init --agent codex`; both-agent or global setup requires an explicit request. Launching from HOME is not authorization for global setup.

### Claude Code Plugin

In your terminal:

    claude plugin marketplace add codestripes-dev/clooks-marketplace
    claude plugin install clooks@clooks-marketplace

Reload Claude Code if needed to load the plugin, then run setup inside Claude Code:

    /clooks:setup

Claude setup keeps default Claude-only `clooks init` and separate consent for global setup. Its startup reminder is also read-only and never authorizes automatic setup.

### Reuse, Updates, And PATH

Both setup skills use the same installer. Install selects an executable PATH binary first, then an executable ~/.local/bin/clooks, otherwise downloads and validates the release checksum and version. Reuse does not download, replace the binary, or edit shell profiles. A broken selected binary or requested-version mismatch fails instead of silently replacing it. Setup uses the resolved absolute executable path for init and stops on failure.

Explicit `$clooks:setup update` or `/clooks:setup update` updates the managed binary only; external PATH installations must be updated through their own installation method. Updating the plugin is not authorization to update the runtime. The corresponding `check` instruction reports installation, PATH, and project-file presence without installing or initializing anything.

Absolute-path init can succeed even when the running agent cannot find clooks on PATH. A profile edit or child-shell export does not fix that agent environment; relaunch with the corrected PATH if needed. Successful init establishes registration, not native activation. This PATH condition is separate from plugin hook-trust approval.

### Direct Binary / Both Agents

Download the appropriate binary from https://github.com/codestripes-dev/clooks/releases/latest. Assets: clooks-darwin-arm64, clooks-darwin-x64, clooks-linux-x64, clooks-linux-x64-baseline, clooks-linux-arm64. For example, with clooks-linux-x64 downloaded in the current directory:

    chmod +x clooks-linux-x64
    mkdir -p "$HOME/.local/bin"
    cp clooks-linux-x64 "$HOME/.local/bin/clooks"
    export PATH="$HOME/.local/bin:$PATH"
    clooks --version

Keep ~/.local/bin on PATH in your shell profile. In the project:

    clooks init --agent codex

Or register both agents:

    clooks init --agent all

Plain `clooks init` and `clooks init --agent claude-code` select only Claude Code. Shared files go in `.clooks/`; hook registrations go in `.claude/settings.json` and/or `.codex/hooks.json`. Init also registers the `clooks` MCP approval server; restart the selected agent when it is first added. Re-run init to refresh older installations, including SessionEnd. Native project trust and hook review remain required; registration is not proof of activation.

Optional global setup: `clooks init --global --agent codex` or `clooks init --global --agent all`. Shared files live in ~/.clooks/; Codex registration uses the effective absolute CODEX_HOME, default ~/.codex. Refresh project and global init when upgrading older registrations.

Install a concrete single hook after init:

    clooks add https://github.com/codestripes-dev/clooks-marketplace/blob/master/clooks-core-hooks/hooks/no-rm-rf.ts

`clooks add https://github.com/<owner>/<repo>` requires clooks-pack.json at the repository root; `--all` installs all hooks without the picker. A tree/pack URL does not select a nested marketplace pack. Review code and agent-specific tool assumptions. At runtime, enabled installed Codex plugins with `clooks-pack.json` are discovered, vendored, and registered automatically.

## Codex Event And Capability Scope

Supported events: SessionStart, SubagentStart, PreToolUse, PermissionRequest, PostToolUse, PreCompact, PostCompact, UserPromptSubmit, SubagentStop, Stop, SessionEnd, Interrupt.

- SessionStart/SubagentStart: skip-only handlers with optional context/debug.
- PreToolUse: allow/block/skip; handler ask uses the shared live checkpoint below. Plain allow retains native approvals and sandbox policy. Sequential allow/ask rewrites require an approved tool codec; parallel rewrites are refused.
- PermissionRequest: allow/block/skip; block accepts `interrupt: false` as the native default, while `interrupt: true`, rewrites, permission updates, and context are refused.
- PostToolUse: block/skip with optional context; block provides feedback after execution, not rollback. No output rewrite.
- UserPromptSubmit: allow/block/skip with optional context; no sessionTitle.
- PreCompact: allow/block/skip; block prevents compaction, no context.
- PostCompact: skip/debug only, no context or rollback.
- Stop/SubagentStop: allow/block/skip; block requests continuation. Failure instead requests termination. No context.
- SessionEnd: skip/debug only, including no-op returns. Observation-only; no context or closure veto. Registration allows three seconds for the entire pipeline. Successful diagnostics are local stderr, discarded natively.
- Interrupt: skip/debug only, including no-op returns. Observation-only; no cancellation veto. Registration allows three seconds for the entire pipeline.

Codex exec_command normalizes to Bash; apply_patch does not become Claude Edit/Write input. PreToolUse rewrites use command-only codecs for command tools and compatible record codecs for ordinary local and MCP tools; non-record MCP input is observable but not rewritable. Hosted tools and specialized native paths may bypass hooks. Codex defer is unsupported. Check ctx.agent and actual event/tool contracts rather than assuming parity from names. Native invocation evidence is bounded, not full conformance; existing website recordings show Claude Code only.

## Shared Approval Checkpoints

PreToolUse handler `ctx.ask({ reason })` pauses the hook pipeline for confirmation through MCP. Add an optional `question` for a short prompt; use `reason` to explain why approval is needed. Approval continues the same invocation without replaying earlier hooks; decline, cancellation or an unavailable required interaction denies the operation. Each required checkpoint must be approved, and later hooks and native permissions still apply. `ctx.defer()` remains a separate result with its existing event and agent restrictions.

## Links

- [Landing page](https://clooks.cc/): product overview, install command, hook examples, FAQ
- [GitHub: clooks](https://github.com/codestripes-dev/clooks): source for the CLI and runtime
- [GitHub: clooks-marketplace](https://github.com/codestripes-dev/clooks-marketplace): registry index + curated hook packs

## Contact

- Author: Joe Degler (joe@clooks.cc)
- License: MIT

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.