scripts
Installation
SKILL.md
Agent Scripts
Rule
Complex operations the agent needs to perform are implemented as scripts in scripts/. The agent runs them via pnpm script <name>.
Why
Scripts give the agent callable tools with structured input/output. They keep the agent's chat context clean (no massive code blocks), they're reusable, and they can be tested independently.
How to Create a Script
Create scripts/my-script.ts:
import fs from "fs";
import { parseArgs, loadEnv, fail, agentChat } from "@agent-native/core";