Imported from sergeysobolev-spbu/sbd-drones-economics (
.cursor/skills/skill_fabric_chaincode_contracts/SKILL.md). Install upstream withnpx skills add sergeysobolev-spbu/sbd-drones-economics --skill skill_fabric_chaincode_contracts. Copyright stays with the author.
Skill Fabric Chaincode Contracts
Use When
Use for Fabric chaincode, smart contract method design, MSP/role authorization, endorsement policy, state transitions, idempotency and contract review.
Workflow
- Identify domain asset: drone pass, firmware, insurance, order, flight permission or funds.
- Define contract method: operation type, args, output, errors and chaincode event.
- Map allowed callers: MSP, attributes, admin override and denied roles.
- Define invariants: state transition, idempotency, duplicate handling and validation rules.
- Add evidence: unit tests, wrong-MSP tests, state negative tests and read-after-write query.
- Escalate
human_reviewfor endorsement policy, privacy, trusted boundary and legal semantics.
Output Contract
## contract_scope
## methods_and_events
## role_matrix
## invariants
## tests_required
## privacy_and_trusted_boundary
## human_review
## next_step