actions

Create and run agent-callable TypeScript actions via pnpm action commands.

Updated May 13, 2026
One-click install
npx skills add https://github.com/fred07diamond/Call-Copilot --skill actions-fred07diamond
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: actions
Source: https://github.com/fred07diamond/Call-Copilot/tree/main/apps/design/.agents/skills/actions
Command: npx skills add https://github.com/fred07diamond/Call-Copilot --skill actions-fred07diamond

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @agent-native/core, zod.

What problem does it solve? Agents need structured, reusable tools for complex operations, but embedding large code blocks in chat context is messy and untestable. This Skill defines how to implement agent-callable actions as standalone TypeScript files that the agent invokes with pnpm action <name>. ## Core Features & Use Cases - Action scaffolding: Create actions in actions/ using parseArgs(), loadEnv(), fail(), and agentChat.submit() from @agent-native/core. - Schema-validated actions: Use defineAction with a Zod schema for runtime validation, typed run() arguments, and auto-generated JSON Schema for the agent's tool definition. - Common patterns: Includes templates for API integration actions (e.g., image generation) and data processing actions that read/write JSON files. - Use Case: You need the agent to generate an image from a prompt. Create actions/generate-image.ts, then the agent runs pnpm action generate-image --prompt "..." --output data/image.png and reports the result back to chat. ## Quick Start Ask the agent to create a new action that reads a JSON input file, transforms the data, and writes the result to an output path, then run it with pnpm action.

Frequently Asked Questions about actions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an agent-callable action in TypeScript?▼

Create a file in actions/ such as actions/my-action.ts that exports a default async function using parseArgs, loadEnv, and fail from @agent-native/core. The agent then runs it with pnpm action my-action followed by --key value arguments.

How do I add input validation to an agent action?▼

Use defineAction from @agent-native/core with a Zod schema in the schema field. This provides runtime validation with clear error messages, TypeScript type inference for the run() arguments, and auto-generated JSON Schema for the agent's tool definition.

Why is my action not found when running pnpm action?▼

The filename must match the command name exactly, so pnpm action foo-bar looks for actions/foo-bar.ts. Action names must be lowercase with hyphens only.

Why does the UI not update after my action runs?▼

The action must write its results to the database so db sync polling can pick them up and push updates to the UI. Use agentChat.submit() to report results or errors back to the agent chat as well.

How do action arguments get parsed from the command line?▼

Use parseArgs() from @agent-native/core, which converts --key value or --key=value pairs into a Record<string, string>. Boolean flags passed as --flag are set to the string "true".