diff --git a/.claude/skills/create-lure/SKILL.md b/.claude/skills/create-lure/SKILL.md index 2482b41..8492254 100644 --- a/.claude/skills/create-lure/SKILL.md +++ b/.claude/skills/create-lure/SKILL.md @@ -57,15 +57,16 @@ config: ### Template body -Below the frontmatter is an [eta](https://eta.js.org) template. Write it as a -natural language prompt for the LLM that will process the webhook. The -following are available on `it`: +Below the frontmatter is a [Liquid](https://liquidjs.com) template. Write it +as a natural language prompt for the LLM that will process the webhook. The +following variables are available: -- `it.payload` — the request body (parsed JSON for `contentType: json`) -- `it.headers` — request headers as a `Headers` object (`it.headers.get("X-Foo")`) -- `it.query` — query string as a `URLSearchParams` object (`it.query.get("foo")`) +- `payload` — the request body (parsed JSON for `contentType: json`) +- `headers` — request headers as a plain object with lowercase keys (e.g. `{{ headers["x-my-header"] }}`) +- `query` — query string as a plain object (e.g. `{{ query.foo }}`) -Use `<%= expression %>` to interpolate values into the prompt. +Use `{{ expression }}` to interpolate values and `{% if %}...{% endif %}` for +conditionals. ## Notes diff --git a/README.md b/README.md index 40c6af1..0d070f8 100644 --- a/README.md +++ b/README.md @@ -38,10 +38,10 @@ config: someValue: 3 --- -You have received information about a <%= it.payload.event %> event on My +You have received information about a {{ payload.event }} event on My Service. Read the following payload and respond according to your skills: -<%= it.payload.body %> +{{ payload.body }} ``` Different verification methods can be supported, for generic implementations or @@ -50,13 +50,18 @@ lure. ### Template scope -Templates are evaluated using [eta](https://eta.js.org). The following -properties are available on `it`: +Templates are evaluated using [Liquid](https://liquidjs.com). The following +variables are available: -- `it.payload`: The request body. For `contentType: json`, this is the parsed +- `payload`: The request body. For `contentType: json`, this is the parsed JSON value. -- `it.headers`: The request headers as a [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) object. -- `it.query`: The query string parameters as a [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) object. +- `headers`: The request headers as a plain object with lowercase keys + (e.g. `{{ headers["x-my-header"] }}`). +- `query`: The query string parameters as a plain object + (e.g. `{{ query.foo }}`). + +Use `{{ expression }}` to interpolate values and `{% if %}...{% endif %}` for +conditionals. ## Usage @@ -129,15 +134,16 @@ config: ## Template body -Below the frontmatter is an eta template (https://eta.js.org). Write it as a -natural language prompt for the LLM that will process the webhook. The -following are available on `it`: +Below the frontmatter is a Liquid template (https://liquidjs.com). Write it as +a natural language prompt for the LLM that will process the webhook. The +following variables are available: -- `it.payload` — the request body (parsed JSON for `contentType: json`) -- `it.headers` — request headers as a Headers object (`it.headers.get("X-Foo")`) -- `it.query` — query string as a URLSearchParams object (`it.query.get("foo")`) +- `payload` — the request body (parsed JSON for `contentType: json`) +- `headers` — request headers as a plain object with lowercase keys (e.g. `{{ headers["x-my-header"] }}`) +- `query` — query string as a plain object (e.g. `{{ query.foo }}`) -Use `<%= expression %>` to interpolate values into the prompt. +Use `{{ expression }}` to interpolate values and `{% if %}...{% endif %}` for +conditionals. ## Task