contract
Clarity smart contract deployment and interaction — deploy contracts from source files, call public functions with post conditions, and call read-only functions.
What this skill does
# Contract Skill
Provides Clarity smart contract deployment and interaction on the Stacks blockchain. Deploy contracts from `.clar` source files, call public functions (with optional post conditions), and call read-only functions to query on-chain state.
- **read** — Read-only, no wallet required.
- **deploy** and **call** — Write operations that broadcast transactions; require an unlocked wallet.
## Usage
```
bun run contract/contract.ts <subcommand> [options]
```
## Subcommands
### deploy
Deploy a Clarity smart contract to the Stacks blockchain. Reads the contract source from a `.clar` file and broadcasts a `smart_contract` transaction.
```
bun run contract/contract.ts deploy \
--source <path-to-file.clar> \
--name <contract-name> \
[--fee <fee>]
```
Options:
- `--source` (required) — Path to the `.clar` source file to deploy
- `--name` (required) — Contract name (lowercase, hyphens allowed, max 128 chars)
- `--fee` (optional) — Fee preset (`low|medium|high`) or micro-STX amount; auto-estimated if omitted
Output:
```json
{
"success": true,
"txid": "abc123...",
"contractId": "SP2...deployer.my-contract",
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}
```
### call
Call a public function on a deployed Stacks smart contract. Signs and broadcasts a `contract_call` transaction.
```
bun run contract/contract.ts call \
--contract <contractId> \
--function <functionName> \
--args <json-array> \
[--post-condition-mode <deny|allow>] \
[--post-conditions <json-array>] \
[--fee <fee>]
```
Options:
- `--contract` (required) — Full contract ID in `ADDRESS.contract-name` format
- `--function` (required) — Public function name to call
- `--args` (optional) — Function arguments as a JSON array (default: `[]`). Typed objects use `{"type":"uint","value":100}` format.
- `--post-condition-mode` (optional) — `deny` (default) blocks unexpected token transfers; `allow` permits any
- `--post-conditions` (optional) — Post conditions as a JSON array (see Notes for format)
- `--fee` (optional) — Fee preset (`low|medium|high`) or micro-STX amount; auto-estimated if omitted
Output:
```json
{
"success": true,
"txid": "abc123...",
"contract": "SP2...deployer.my-contract",
"function": "set-value",
"args": [42],
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}
```
### read
Call a read-only function on a deployed Stacks smart contract. Does not broadcast a transaction; no wallet required.
```
bun run contract/contract.ts read \
--contract <contractId> \
--function <functionName> \
[--args <json-array>] \
[--sender <address>]
```
Options:
- `--contract` (required) — Full contract ID in `ADDRESS.contract-name` format
- `--function` (required) — Read-only function name to call
- `--args` (optional) — Function arguments as a JSON array (default: `[]`)
- `--sender` (optional) — Stacks address to use as the read-only call sender (uses active wallet address if omitted)
Output:
```json
{
"contract": "SP2...deployer.my-contract",
"function": "get-value",
"okay": true,
"result": "(ok u42)",
"network": "mainnet"
}
```
## Arguments
| Subcommand | Option | Required | Description |
|------------|--------|----------|-------------|
| `deploy` | `--source` | yes | Path to `.clar` source file |
| `deploy` | `--name` | yes | Contract name |
| `deploy` | `--fee` | no | Fee preset or micro-STX amount |
| `call` | `--contract` | yes | Full contract ID (`ADDRESS.name`) |
| `call` | `--function` | yes | Public function name |
| `call` | `--args` | no | JSON array of function arguments |
| `call` | `--post-condition-mode` | no | `deny` (default) or `allow` |
| `call` | `--post-conditions` | no | JSON array of post condition objects |
| `call` | `--fee` | no | Fee preset or micro-STX amount |
| `read` | `--contract` | yes | Full contract ID (`ADDRESS.name`) |
| `read` | `--function` | yes | Read-only function name |
| `read` | `--args` | no | JSON array of function arguments |
| `read` | `--sender` | no | Sender address for the read-only call |
## Notes
- Contract names must be unique per deployer address. Deploying a contract that already exists will fail.
- Deployment is irreversible — the contract lives on-chain permanently once confirmed.
- Pre-simulate contract calls on [stxer.xyz](https://stxer.xyz) before deploying or calling to catch Clarity errors and estimate fees without spending STX.
- Post condition format: `{"type":"stx","principal":"SP2...","conditionCode":"eq","amount":"1000000"}` for STX; `{"type":"ft","principal":"SP2...","asset":"SP2....my-token","assetName":"my-token","conditionCode":"eq","amount":"100"}` for fungible tokens; `{"type":"nft","principal":"SP2...","asset":"SP2....my-nft","assetName":"my-nft","tokenId":1}` for NFTs — NFT conditions are binary (send/not-send), so `conditionCode` is not applicable; use `"notSend":true` to assert the NFT must NOT leave the principal.
- `--post-condition-mode allow` skips post condition checks entirely — use only when you fully trust the contract logic and have verified the source code.
- Wallet operations require an unlocked wallet (use `bun run wallet/wallet.ts unlock --password <password>` first).
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.