Skip to content
Back to skills

Cairo Contract Functions

ASecurity

Explain Starknet contract entry points (external, view, constructor, l1 handler) and ABI configuration; use when a request involves defining or exposing contract functions in Cairo.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
documentation

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill cairo-contract-functions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Contract Functions?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cairo Contract Functions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-cairo-contract-functions/badge)](https://www.skillsdirectory.com/skills/david-li0406-cairo-contract-functions)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cairo-contract-functions
description: Explain Starknet contract entry points (external, view, constructor, l1 handler) and ABI configuration; use when a request involves defining or exposing contract functions in Cairo.
---

# Cairo Contract Functions

## Overview
Guide how to define contract entry points and control ABI exposure in Cairo.

## Quick Use
- Read `references/contract-functions.md` before answering.
- Use `#[starknet::interface]` with `#[abi(embed_v0)]` for standard ABI definitions.
- Use `self: ContractState` for view, `ref self: ContractState` for state-mutating entry points.

## Response Checklist
- Mark constructors with `#[constructor]` and L1 handlers with `#[l1_handler]`.
- Use `#[external(v0)]` for public entry points if using per-item ABI.
- Explain that view functions are not enforced by the protocol.

## Example Requests
- "How do I define a view function vs external function?"
- "Where do I put a constructor in a Cairo contract?"
- "How do I expose a function in the ABI?"

Files in this skill

  • SKILL.md1022 B
  • references/contract-functions.md836 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…