Skip to content

Add Claude Code skill wrapping the Enclosed CLI#22

Open
yokoszn wants to merge 2 commits into
twn-mainfrom
claude/api-search-execute-skill-GTiqm
Open

Add Claude Code skill wrapping the Enclosed CLI#22
yokoszn wants to merge 2 commits into
twn-mainfrom
claude/api-search-execute-skill-GTiqm

Conversation

@yokoszn

@yokoszn yokoszn commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds .claude/skills/enclosed/SKILL.md so Claude Code (and the Agent SDK) can create and read Enclosed notes by shelling out to the enclosed CLI.
  • Chose CLI-wrapper over a search(OpenAPI) / execute(HTTP) split because the API surface is tiny (3 route modules) and, more importantly, raw HTTP would bypass the client-side AES-GCM / PBKDF2 encryption that @enclosed/lib performs before any request leaves the machine.
  • Documents every flag for create / view / config (sourced directly from packages/cli/src), self-hosted instance-url setup, URL-fragment-key handling, and a set of safety rules (no logging URLs/passwords/plaintext, avoid --password on the CLI, don't post URLs to third-party services).

Test plan

  • ls .claude/skills/enclosed/SKILL.md exists on the branch.
  • In a Claude Code session inside this repo, ask Claude to "create an Enclosed note that self-destructs after reading" and verify it invokes enclosed create -d ... (installing via npx -y @enclosed/cli if the binary is absent).
  • Ask Claude to read an Enclosed URL and verify it calls enclosed view <url> and does not echo the URL or decrypted content unprompted.
  • Set enclosed config set instance-url https://<self-hosted> and confirm subsequent create calls target that instance.

https://claude.ai/code/session_01DfYYW8uJxLjcZUPm8VZ62s


Generated by Claude Code

Adds .claude/skills/enclosed/SKILL.md so Claude Code can create and read
E2E-encrypted Enclosed notes by shelling out to the `enclosed` CLI rather
than hitting the API directly (which would bypass client-side AES-GCM /
PBKDF2 encryption).

Documents create/view/config flags sourced from packages/cli, self-hosted
instance-url config, URL-fragment-key handling, and safety rules around
passwords, note URLs, and decrypted content.
@coderabbitai

coderabbitai Bot commented Apr 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5f4c5fe6-5cd8-4142-9bb8-ea34b4a13bac

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/api-search-execute-skill-GTiqm

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Apr 23, 2026

Copy link
Copy Markdown
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
enclosed ❌ Failed (View Log) 61c8107
enclosed-docs ❌ Failed (View Log) 61c8107

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 23, 2026

Copy link
Copy Markdown

Deploying enclosed-twn with  Cloudflare Pages  Cloudflare Pages

Latest commit: 61c8107
Status: ✅  Deploy successful!
Preview URL: https://05ad80f2.enclosed-twn.pages.dev
Branch Preview URL: https://claude-api-search-execute-sk.enclosed-twn.pages.dev

View logs

@yokoszn yokoszn changed the base branch from main to twn-main April 23, 2026 06:03
All six failures pre-date this branch and are triggered by a recent
dependency bump: TypeScript 5.7+ made `Uint8Array` generic over its
backing buffer (`Uint8Array<ArrayBufferLike>`), which no longer satisfies
`BufferSource` / `BlobPart`; Hono 4.11 tightened middleware input-type
merging; `unocss-preset-animations` dropped its ESM default export; and
vite/rollup now use subpath exports that classic `moduleResolution: Node`
cannot resolve.

- crypto/web: narrow return types of `createRandomBuffer` and
  `base64UrlToBuffer` to `Uint8Array<ArrayBuffer>` (both always produce
  `ArrayBuffer`-backed views); cast the remaining `Uint8Array` params
  received through the shared abstract API at the webcrypto call sites.
- app-server: merge the two sequential post-validation handlers on
  `POST /api/notes` into a single handler. Hono was producing a union
  `context.req.valid('json')` signature across the chain; collapsing to
  one handler preserves behavior (covered by existing e2e tests) and
  restores a callable signature.
- lib: cast `noteAsset.content` to `Uint8Array<ArrayBuffer>` at the
  `new File([...])` call, and add `skipLibCheck: true` to its tsconfig so
  tsc stops chasing vite's transitive `rollup/parseAst` subpath import.
- app-client: switch `unocss-preset-animations` to a named import
  (package no longer exposes a default export in its .d.mts).
@yokoszn yokoszn marked this pull request as ready for review April 25, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants