Add Claude Code skill wrapping the Enclosed CLI#22
Open
yokoszn wants to merge 2 commits into
Open
Conversation
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.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
Deploying enclosed-twn with
|
| 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 |
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.claude/skills/enclosed/SKILL.mdso Claude Code (and the Agent SDK) can create and read Enclosed notes by shelling out to theenclosedCLI.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/libperforms before any request leaves the machine.create/view/config(sourced directly frompackages/cli/src), self-hostedinstance-urlsetup, URL-fragment-key handling, and a set of safety rules (no logging URLs/passwords/plaintext, avoid--passwordon the CLI, don't post URLs to third-party services).Test plan
ls .claude/skills/enclosed/SKILL.mdexists on the branch.enclosed create -d ...(installing vianpx -y @enclosed/cliif the binary is absent).enclosed view <url>and does not echo the URL or decrypted content unprompted.enclosed config set instance-url https://<self-hosted>and confirm subsequentcreatecalls target that instance.https://claude.ai/code/session_01DfYYW8uJxLjcZUPm8VZ62s
Generated by Claude Code