Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions docs/INTEGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,61 @@ Ensure the `skills/` directory is included in your published package. For npm:

If you publish via a different mechanism, just make sure the skill directory ships alongside your built CLI output.

### OpenClaw plugin packages

OpenClaw plugins can already declare packaged skills in `openclaw.plugin.json`.
If your plugin also exposes a user-facing CLI, Skillflag can export the same
skills to Codex, Claude, Goose, and other agents without adding agent-specific
install paths to the plugin itself.

For a package shaped like `@xquik/tweetclaw`, keep the install metadata and
skill folder in the package:

```json
{
"name": "@xquik/tweetclaw",
"files": ["dist", "skills/tweetclaw/SKILL.md", "openclaw.plugin.json"],
"openclaw": {
"install": {
"defaultChoice": "npm",
"npmSpec": "@xquik/tweetclaw"
}
}
}
```

```json
{
"id": "tweetclaw",
"skills": ["skills/tweetclaw"]
}
```

Then point the CLI entrypoint at the package's `skills/` directory:

```ts
import { findSkillsRoot, maybeHandleSkillflag } from "skillflag";

await maybeHandleSkillflag(process.argv, {
includeBundledSkill: false,
skillsRoot: findSkillsRoot(import.meta.url),
});
```

This keeps OpenClaw installation native:

```bash
openclaw plugins install npm:@xquik/tweetclaw
```

After the package wires that entrypoint to a `tweetclaw` bin, users also get a
portable skill export path for non-OpenClaw agents:

```bash
tweetclaw --skill list
tweetclaw --skill export tweetclaw | npx skillflag install --agent codex
```

## 3) Wire `--skill` early in your CLI

Intercept `--skill` before your regular CLI parsing so Skillflag can take over. Example (ESM):
Expand Down
4 changes: 2 additions & 2 deletions docs/SKILLFLAG_SPEC.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Skillflag Specification
author: Onur Solmaz <2453968+osolmaz@users.noreply.github.com>
author: Onur Solmaz (GitHub: osolmaz)
date: 2026-01-11
---

Expand Down Expand Up @@ -589,7 +589,7 @@ If a tool isn’t listed, `skill-install` must support:
This keeps the spec future-proof without baking in every new agent.

[1]: https://developers.openai.com/codex/skills/ "Agent Skills"
[2]: https://block.github.io/goose/docs/guides/context-engineering/using-skills/ "Using Skills | goose"
[2]: https://goose-docs.ai/docs/guides/context-engineering/using-skills/ "Agent Skills | goose"
[3]: https://code.claude.com/docs/en/skills "Agent Skills - Claude Code Docs"
[4]: https://docs.github.com/copilot/concepts/agents/about-agent-skills "About Agent Skills - GitHub Docs"
[5]: https://ampcode.com/news/agent-skills "Agent Skills - Amp"
Expand Down