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.
npm install skillflagVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to integrate skillflag into a Node.js/TypeScript CLI by intercepting `--skill` arguments and delegating to the library, ensuring proper skill discovery.
Upgrade your Node.js environment to version 18 or newer.
Pin skillflag to exact versions or review changelogs carefully when upgrading in pre-1.0 releases.
Ensure your project's `package.json` includes `"type": "module"` and use `import` statements for `skillflag`.
Verify that your skill definitions follow the `skills/<skill-id>/SKILL.md` pattern relative to your CLI's root.
Place `await maybeHandleSkillflag(process.argv, { skillsRoot: findSkillsRoot(import.meta.url) });` at the very beginning of your CLI's main function.Update your project to use ES module `import` syntax (`import { ... } from 'skillflag';`) and ensure your `package.json` specifies `"type": "module"` or that files using `import` have `.mjs` extension.Ensure a `skills/` directory exists at the root of your project (or a predictable location) and that `SKILL.md` files are correctly placed within `skills/<skill-id>/SKILL.md`. Adjust the `skillsRoot` path in `maybeHandleSkillflag` if necessary.
Verify the skill ID matches a subfolder name in `skills/` and confirm that `skills/<id>/SKILL.md` exists and has valid YAML frontmatter.
Place the `await maybeHandleSkillflag(process.argv, { skillsRoot: findSkillsRoot(import.meta.url), });` call at the very beginning of your CLI's main execution path, before any other argument parsing logic.No dependency data recorded yet.