Skills write-contract
๐Ÿ“ฆ

write-contract

Content revision r2 Safe โšก Contains scriptsโš™๏ธ External commands๐ŸŒ Network access

Design Reliable GenLayer Intelligent Contracts

GenLayer contracts must survive validator disagreement, changing external data, storage constraints, and unpredictable LLM responses. This skill provides practical patterns for consensus-safe contract design, error handling, storage, and cross-contract workflows.

Supports: Claude Codex Code(CC)
๐Ÿฅ‰ 77 Bronze

Install with my Agent

Copy this request to your Agent. It includes the canonical Skill page and manifest.

Agent request
Review the Skillstore skill "write-contract" from https://skillstore.io/skills/internet-court-write-contract.md and its manifest at https://skillstore.io/api/skills/internet-court-write-contract/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.

Your Agent should still show its plan and request any confirmation required by the security policy.

Agent-readable resources

Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.

Test it

Using "write-contract". A contract classifies uploaded evidence and releases escrow when validators agree.

Expected outcome:

Use comparative validation. Validators should independently inspect the same evidence, compare the settlement decision and normalized fields, reject malformed or conflicting results, and expose an appeal path.

Using "write-contract". A contract stores user balances, item records, and a variable-length activity list.

Expected outcome:

  • Use sized integer types for balances and avoid native floating point for money.
  • Use TreeMap for keyed records and DynArray for ordered activity entries.
  • Append new storage fields at the end when preserving upgrade compatibility.

Security Audit

Safe
v3 โ€ข 8/7/2026 Open versioned report

Three eval-related findings are confirmed because the skill recommends executing LLM-generated expressions, despite restricted builtins and a sandbox. The remaining static findings are false positives caused by markdown backticks, headings, prose, or legitimate web and RPC guidance.

3
Files scanned
587
Lines analyzed
3
Review items
0
False positives ignored
Capability review items (3)

These are real local capabilities that may be expected for this skill, so they require review but are not counted as confirmed malicious behavior.

High
Dynamic code evaluation with eval()
LLMs can't reliably inspect characters in their input (they hallucinate em dashes, miscount characte
The skill explicitly recommends evaluating expressions generated by an LLM. A sandbox and restricted builtins reduce exposure, but dynamically executing generated code remains a real escape and resource-exhaustion risk.
High
Dynamic code evaluation with eval()
# Step 2: eval() all checks in one sandbox โ€” deterministic, no hallucination
The example executes LLM-produced checks with eval inside a sandbox. The isolation is a mitigation, not proof that arbitrary generated expressions are safe.
High
Dynamic code evaluation with eval()
ok = eval(c["expression"], {
The example directly calls eval on c["expression"]. The globals restrict builtins and expose only text and basic functions, but attacker-influenced rules could still abuse parser or sandbox weaknesses.
Audited by: codex View Audit History โ†’
Share & cite this report

Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.

Open versioned report
Security Assessment

Copy report link

https://skillstore.io/skills/internet-court-write-contract/audits/3?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown badge

[![Skillstore security assessment](https://skillstore.io/badges/skills/internet-court-write-contract/security.svg)](https://skillstore.io/skills/internet-court-write-contract?utm_source=security_passport_badge)

HTML badge

<a href="https://skillstore.io/skills/internet-court-write-contract?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/internet-court-write-contract/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

Embed card

<iframe src="https://skillstore.io/embed/skills/internet-court-write-contract.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
Academic citations (APA ยท BibTeX ยท CFF)

APA citation

internet-court. (2026). write-contract security audit report (audit version 3) [Author version unspecified]. Skillstore. https://skillstore.io/skills/internet-court-write-contract/audits/3

BibTeX citation

@techreport{internet-court-internet-court-write-contract-2026, author = {internet-court}, title = {write-contract security audit report (audit version 3)}, institution = {Skillstore}, year = {2026}, number = {3}, url = {https://skillstore.io/skills/internet-court-write-contract/audits/3}, note = {Author version unspecified} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "write-contract security audit report (audit version 3)" version: "unspecified" type: report authors: - name: "internet-court" date-released: "2026-08-07" url: "https://skillstore.io/skills/internet-court-write-contract/audits/3" identifiers: - type: other value: "skillstore:internet-court-write-contract:audit:3" description: "Skillstore immutable audit report identifier"

Skillstore Score

Why this score Evidence Confidence: Medium
55
Architecture
85
Maintainability
87
Content
67
Community
78
Spec Compliance

What You Can Build

Build a dispute contract

Define evidence inputs, validator comparison, settlement effects, and an appeal path for an on-chain dispute workflow.

Review consensus logic

Assess whether a proposed LLM or web workflow independently verifies the leader result and compares the fields that affect state.

Plan contract storage

Translate ordinary Python collections and numeric values into persistent GenLayer types with upgrade-aware layout rules.

Try These Prompts

Choose a GenLayer boundary
Assess this feature: [describe feature]. State whether GenLayer consensus is necessary. Separate frontend, backend, contract, and external-source responsibilities.
Select a validation principle
Design validation for this operation: [describe operation]. Identify nondeterministic inputs, stable decision fields, comparison rules, failure behavior, and cases where strict equality is unsafe.
Map contract storage
Convert this state model into GenLayer storage: [describe fields]. Recommend types, initialization, numeric representation, collection indexes, and upgrade-safe field ordering.
Harden a contract workflow
Review this contract design: [paste design]. Produce a threat model covering validator disagreement, leader manipulation, external data, LLM errors, cross-contract calls, RPC endpoints, and resource limits. Give prioritized fixes and tests.

Best Practices

  • Pin a concrete runner hash and verify the dependency header before returning contract code.
  • Compare substantive decision fields or independently derive outcomes from the same source data.
  • Classify errors explicitly and force disagreement when an LLM produces an invalid result.

Avoid

  • Do not use strict equality for nondeterministic LLM calls or changing web pages.
  • Do not let validators check only output shape, labels, or confidence ranges.
  • Do not store native Python lists, dictionaries, or unscaled floating-point money values.

Frequently Asked Questions

What does this skill create?
It creates design guidance and contract examples for GenLayer intelligent contracts. It does not deploy or audit a finished contract.
When should I use GenLayer?
Use it when validator agreement is needed for subjective, external, or AI-mediated decisions that change on-chain state.
When should I avoid GenLayer?
Prefer a normal backend or deterministic contract when no validator-verifiable judgment is required.
How should validators check LLM results?
Rerun the task, independently derive the result, or verify it against the same source and explicit criteria.
How should I handle external APIs?
Extract stable fields, classify failures, validate endpoints, and compare derived outcomes instead of unstable timestamps or counts.
Is the generated contract production-ready?
No. Run the project linter, direct tests, integration tests, security review, and deployment-specific checks before production use.

Developer Details

License

MIT

Skillstore revision

r2

Version notice

The author did not declare a version.

Ref

1c2ebded2116f8124f45dba86a2e567f56e64d8e

Maintenance freshness

8/7/2026

Usage

3 downloads ยท 0 views

File structure

๐Ÿ“ agents/

๐Ÿ“„ openai.yaml

๐Ÿ“„ LICENSE

๐Ÿ“„ SKILL.md