Skills — Extend your AI agent with MicroFn

Skills teach your AI agent how to use MicroFn to deploy, execute, and manage serverless JavaScript functions

What are Skills?

Skills are instructions that teach your AI agent how to use the MicroFn CLI to deploy, update, inspect, and execute sandboxed JavaScript functions on the MicroFn cloud platform.

Once installed, your AI agent can create new tools for itself on the fly — write a JavaScript function, deploy it, and immediately start using it. Your agent gets smarter and more capable over time by building its own toolbox.

Installation

Install MicroFn skills with a single command:

npx skills add microfnhq/skills

To list all available skills before installing:

npx skills add microfnhq/skills --list

Claude Code Plugin

If you're using Claude Code, you can also install via the plugin marketplace:

claude plugin marketplace add microfnhq/skills
claude plugin enable microfn

Or enable it interactively with /plugins

What your agent can do

With MicroFn skills installed, your AI agent can:

  • Deploy JavaScript functions to isolated cloud sandboxes
  • Execute functions with parameters and get results back
  • Use key-value storage for state across conversations
  • Store and access secrets securely
  • Expose functions as MCP tools for reuse
  • Integrate with any REST API (Stripe, Twilio, Discord, etc.)

Examples

Weather service with caching

import kv from "@microfn/kv";

export async function main(input) {
  const cached = await kv.get(`weather:${input.city}`);
  if (cached) return cached;

  const response = await fetch(
    `https://api.openweathermap.org/data/2.5/weather?q=${input.city}`
  );
  const weather = await response.json();

  await kv.set(`weather:${input.city}`, weather, { ttl: 3600 });
  return weather;
}

Discord/Slack notifications

import secret from "@microfn/secret";

export async function main(input) {
  const webhook = await secret.get("DISCORD_WEBHOOK");

  await fetch(webhook, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      content: input.message,
      username: "AI Agent Bot",
    }),
  });

  return { sent: true, timestamp: new Date().toISOString() };
}

Authenticated API calls

import secret from "@microfn/secret";

export async function main(input) {
  const apiKey = await secret.get("GITHUB_TOKEN");

  const response = await fetch(
    `https://api.github.com/repos/${input.repo}/issues`,
    {
      headers: {
        Authorization: `Bearer ${apiKey}`,
        Accept: "application/vnd.github.v3+json",
      },
    }
  );

  return await response.json();
}