Building Agent Skills

The definitive guide to creating reusable capabilities for the Maikers ecosystem.

Introduction

An Agent Skill is a self-contained module that extends an AI agent's capabilities. It consists of a configuration file defining the interface and an implementation script (typically TypeScript/JavaScript) that executes the logic.

Prerequisites

  • Node.js 18+ installed
  • A GitHub repository (public or private)
  • Basic knowledge of TypeScript/JavaScript

Step 1: Initialize a New Skill

Create a new directory for your skill. A standard skill structure looks like this:

my-skill/
├── skill.json         # Configuration manifest
├── index.ts           # Main entry point
├── package.json       # Dependencies
└── README.md          # Documentation

Step 2: Define Skill Manifest (skill.json)

The skill.json file tells the agent what your skill does and what inputs it needs.

{
  "name": "token-sniper",
  "version": "1.0.0",
  "description": "Snipes new token launches on Solana based on liquidity criteria.",
  "entryPoint": "dist/index.js",
  "inputs": {
    "minLiquidity": {
      "type": "number",
      "description": "Minimum liquidity in SOL to trigger a buy",
      "required": true
    },
    "tokenAddress": {
      "type": "string",
      "description": "The mint address of the token",
      "required": true
    }
  },
  "permissions": ["network", "wallet"]
}

Step 3: Implement Logic

Write your skill logic in index.ts. Your default export must be a function that accepts the inputs defined in your manifest.

import { Connection, PublicKey } from '@solana/web3.js';

interface Inputs {
  minLiquidity: number;
  tokenAddress: string;
}

export default async function run(inputs: Inputs) {
  const { minLiquidity, tokenAddress } = inputs;
  
  console.log(`Received task: Snipe ${tokenAddress} with min liquidity ${minLiquidity}`);
  
  // Implementation logic here...
  // 1. Check liquidity
  // 2. Build swap transaction
  // 3. Send transaction
  
  return {
    status: "success",
    txHash: "5KtBn...z9y"
  };
}

Step 4: Build & Publish

Compile your TypeScript code to JavaScript. Ensure your `package.json` points to the correct main file.

  1. Run tsc to build your project.
  2. Commit your code to a GitHub repository.
  3. Tag a release (optional but recommended).
# Publish by pushing to GitHub
git add .
git commit -m "feat: initial release"
git push origin main

Step 5: Install & Test

Test your skill by installing it into an agent environment using the URL of your repository.

npx skills add https://github.com/your-username/my-skill --skill token-sniper

Ready to contribute?

Submit your skill to the official Maikers registry to appear on the leaderboard and gain verified status.