Synopsis
Description
Reads a skill repository, finds the plugins in it, and writes one package definition per plugin, pinned to a single commit.<path|url> is an owner/repo shorthand, a GitHub URL, or a local git clone.
Only GitHub is supported.
A local clone is imported at its committed HEAD, and its origin remote must point at GitHub; uncommitted changes are never imported.
Import:
- Clones the repository and pins the commit.
- Finds every plugin and its skills.
- Computes the hash of the source the build will fetch.
- Validates each plugin with the
check-pluginrules. A plugin with errors is not written; the others are. - Writes
agent-plugin-<name>/default.jsonandagent-plugin-<name>/default.nixunder the packages folder, and prints a summary. - Writes what the packages need to build beside them: the builder in the lib folder, and the
flox-agentthat ran the import as its own package.
new plugin on a first import.
On a re-import it is unchanged at <rev>, regenerated at <rev>, or <old> -> <new> with the skills added and removed.
There is no separate update command; re-importing is how a package moves to a newer commit.
default.json records the source, the skills, the flags given, and every warning.
default.nix is the same in every package, apart from a block between its BEGIN custom and END custom markers that a re-import keeps.
A package written before default.json holds source.json instead; import still reads it, and moves it to default.json on its next write.
Finding plugins
Import tries these in order, and the first that matches declares the repository’s plugins:- Agent Plugins manifests (
plugin.json). - A marketplace listing, such as
.claude-plugin/marketplace.json. - Claude plugin manifests (
.claude-plugin/plugin.json). - The whole repository as one plugin.
SKILL.md files and records anything it does not package as a warning.
Options
Every option except
--yes and --replay is recorded in default.json.
--pkgs-dir and --lib-dir are recorded only when given, relative to the root.
--replay can be combined only with --pkgs-dir and --yes.
A packages folder under .flox needs that .flox to be a Flox environment, and one anywhere else needs a flake.nix beside it.
When it is missing, import offers to create it; --yes creates it without asking, and a run without a terminal fails instead.
--out was removed. Passing it is a usage error that names --pkgs-dir instead.
A package folder belongs to the repository that wrote it.
Import refuses to overwrite a package recorded from a different repository.