Skip to content
Back to skills

Cairo Functions

ASecurity

Explain Cairo function syntax, parameters, return values, statements vs expressions, and `const fn`; use when a request involves defining or calling functions, return types, or function-related compiler errors in Cairo.

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

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-functions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cairo Functions?

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

Security grade badge for Cairo Functions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-cairo-functions/badge)](https://www.skillsdirectory.com/skills/david-li0406-cairo-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-functions
description: Explain Cairo function syntax, parameters, return values, statements vs expressions, and `const fn`; use when a request involves defining or calling functions, return types, or function-related compiler errors in Cairo.
---

# Cairo Functions

## Overview
Guide users through Cairo function definitions, calls, return values, and const functions with correct syntax and typing.

## Quick Use
- Read `references/functions.md` before answering.
- Show minimal, compile-ready snippets with correct parameter and return type annotations.
- Call out statement vs expression rules when return values are involved.

## Response Checklist
- Include parameter types and return types where required.
- If returning a value, use a tail expression without a semicolon or an explicit `return`.
- If the user mentions named arguments, show `foo(x: value)` or `foo(:x)`.

## Example Requests
- "How do I return a value from a Cairo function?"
- "Can I call a function with named arguments?"
- "What is a `const fn` in Cairo?"

## Cairo by Example
- [Functions](https://cairo-by-example.xyz/fn)
- [Methods](https://cairo-by-example.xyz/fn/methods)
- [Higher Order Functions](https://cairo-by-example.xyz/fn/hof)

Files in this skill

  • SKILL.md1.2 KB
  • references/functions.md1.2 KB

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…