crane-access

Implement layered access control in Crane Diamond contracts with ownership, operator permissions, and reentrancy protection.

Updated Jan 22, 2026
One-click install
npx skills add https://github.com/cyotee/cyotee-claude-plugin-crane --skill crane-access
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crane-access
Source: https://github.com/cyotee/cyotee-claude-plugin-crane/tree/main/.opencode/skills/crane-access
Command: npx skills add https://github.com/cyotee/cyotee-claude-plugin-crane --skill crane-access

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Crane Diamond contracts require robust, layered access control to prevent unauthorized function calls and risky ownership transfers. This Skill demonstrates how to combine MultiStepOwnable, Operable, and ReentrancyLock patterns to enforce ownership, operator permissions, and reentrancy protection across facets, targets, and repos.

Core Features & Use Cases

  • Two-step ownership transfer with a configurable buffer period.
  • Global and function-level operator permissions for fine-grained access control.
  • Transient, gas-efficient reentrancy protection across contract functions.
  • Ready-to-integrate patterns for deploying and configuring access facets in a Crane-based Diamond package.

Quick Start

Integrate and configure the three access control patterns in your Diamond-based contracts to enforce ownership, operator permissions, and reentrancy protection.

Frequently Asked Questions about crane-access

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement two-step ownership transfer in Diamond smart contracts?

Two-step ownership transfer in Diamond smart contracts uses a configurable buffer period to accept or reject ownership, preventing unauthorized or accidental admin changes. The MultiStepOwnable pattern enforces this secure transfer.

What is function-level operator permission control in Crane Diamond facets?

Function-level operator permission control in Crane Diamond facets restricts specific contract calls to approved operators. The Operable pattern provides global and granular access control across facets, targets, and repos.

How do I add reentrancy protection to smart contract facets without high gas costs?

Reentrancy protection without high gas costs uses transient storage to apply reentrancy guards efficiently. The ReentrancyLock pattern secures contract functions against recursive calls while minimizing gas overhead.

Can I use Crane access control patterns with existing Diamond-based targets and repos?

You can use Crane access control patterns with existing Diamond-based targets and repos. The patterns integrate into deployed Diamond packages to enforce operator permissions and reentrancy protection across your facets.

When do I need reentrancy guards for smart contract ownership transfer functions?

Reentrancy guards for smart contract ownership transfer functions are needed when external calls occur during state changes. The ReentrancyLock pattern prevents recursive exploitation of transfer logic before execution completes.