feat(skills): gate-my-tool — one-command install of a CredentAgent gate - #170
Open
TheBlackBit wants to merge 1 commit into
Open
feat(skills): gate-my-tool — one-command install of a CredentAgent gate#170TheBlackBit wants to merge 1 commit into
TheBlackBit wants to merge 1 commit into
Conversation
…te (#17) Adds the .claude/skills/gate-my-tool skill: pointed at an MCP server whose registerTool handler completes a consequential action ungated, it walks an agent through the orders wiring (serve once, create per purchase, poll door), deriving the policy from the catalog, and requires the bypass test proven red-when-removed (write-bypass-test). Verified by applying the skill verbatim to a fixture MCP server (ungated checkout settling a 21+ item with no proof): after the skill, the unverified checkout returns approveUrl + requires manifest, retrieve() stays pending, fulfillment never runs — and reverting the handler to the ungated write turns the bypass test red. Closes #17 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Ever Morales <ever.morales@koombea.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
In plain terms
This adds a recipe file that a coding agent (like Claude Code) can follow to protect an online shop's "buy" button in one run. A developer with an existing agent-facing server can say "gate my checkout tool", and the agent wires in CredentAgent so the purchase only completes after the human proves the required credential (their age, a payment authorization) from their phone — instead of the developer reading the docs and wiring it by hand.
What you're approving
.claude/skills/gate-my-tool/SKILL.md— a "skill", i.e. a packaged instruction set coding agents in this repo can invoke. No library code changes, nothing ships to npm, no user-facing change.How to test
Read the skill and check the code snippets against the real API:
Then confirm the repo still builds and tests green (the change is documentation-only):
Expected: build succeeds; 38 test files, 605 tests pass.
For reviewers — the detail
What the skill teaches, step by step. Pointed at an MCP server (a server exposing tools to AI agents) whose
registerToolhandler completes a consequential action ungated:credentagent.orders.serve(app)once at startup, and move fulfillment into theorder.settledevent.credentagent.orders.create({ order, policy }), and return the approve link +requiresmanifest instead of completing.get-order-statuspoll tool overcredentagent.orders.retrieve(the three execution contexts: tool mints the link, the human proves on the page, the agent polls).write-bypass-testskill): an unverified age-restricted checkout must stay pending and unfulfilled — and the test must go red if the gate is reverted.It also carries the honesty fence (
trust_level: "presence-only-demo"— a flow demo, not a real safety control) and a red-flags table mirroring the style of the existingadd-ceremony-railskill.Decision table: the skill defaults to the
ordersfacade and points hosts that already own their catalog/order stores and checkout route atdefineHost(...)+examples/bring-your-own-host.mjs.How it was verified (the issue's "done when", executed). A fixture MCP server with an ungated checkout was built; baseline confirmed it settled a 21+ item with zero proof. Applying the skill's steps verbatim produced a gated tool where the same unverified checkout returns the approve URL + manifest,
retrieve()stays{ ok: false, pending: true }, and fulfillment never runs. Load-bearing proof: reverting the handler to the ungated write turned the bypass test red; restoring it, green. Every API call in the snippets was checked against the source (orders.create→{ id, approveUrl, manifest }, empty-id minting inorders.ts, theGateOrdershape intypes.ts) and the MCP result shape against SDK 1.29.Also in this change: issue #17 itself was rewritten (title + body) for the CredentAgent rename and to drop its stale claim that the old discovery surface (
llms.txt+/.well-known/attestomcp.json) still ships — it was removed during the rename.🤖 Generated with Claude Code