Skillflag CLI Convention & Library

0.1.4 · active · verified Wed Apr 22

Skillflag is a CLI convention and library for bundling, listing, and installing agent skills directly from a CLI tool's repository without relying on third-party registries. It provides a standardized `--skill` flag interface (`list`, `show`, `export`) for agents to discover and integrate capabilities. The current stable version is 0.1.4, indicating early development and a nascent ecosystem. As a new project, release cadence is currently irregular, but recent updates suggest active development. Its key differentiator is decentralizing skill discovery, enabling agents to parse skills directly from a tool's published repository, akin to a `--help` or `manpage` for skills, reducing overhead and central points of failure associated with traditional skill registries. It targets Node.js (>=18) environments and ships with TypeScript types.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to integrate skillflag into a Node.js/TypeScript CLI by intercepting `--skill` arguments and delegating to the library, ensuring proper skill discovery.

import { findSkillsRoot, maybeHandleSkillflag } from 'skillflag';
import process from 'node:process';

async function main() {
  // Intercept --skill arguments and delegate to skillflag logic
  const handled = await maybeHandleSkillflag(process.argv, {
    skillsRoot: findSkillsRoot(import.meta.url), // Automatically locate the 'skills' directory
  });

  if (handled) {
    return; // Skillflag handled the command, exit without further CLI processing
  }

  // ... Your existing CLI logic for other commands ...
  console.log('Your CLI running other commands...');
  // Example: hue-cli --help for other commands
}

main().catch(console.error);

view raw JSON →