Skip to main content

skl capture

Copy a skill from the current project into the library at ~/.local/share/skl/skills.

Synopsis​

skl capture <path>
skl capture <path> --force
skl capture <path> --as <name>
skl capture <path> --keep-copy
skl capture <path> --project <dir>

Arguments and flags​

  • <path>. A path to the skill directory, or a skill name. A name resolves under .agents/skills, under the extras listed in the project's skills.toml, and under the extras saved in config.toml.
  • --force. Overwrite a library skill with the same name.
  • --as <name>. Store the skill in the library under <name>.
  • --keep-copy. Leave the project directory as a real copy. Without it, skl replaces the project directory with a symlink to the library copy.
  • --project <dir>. Project root. Default is the current directory.

The command never prompts.

What it writes​

  • {data_dir}/skills/<name>/, a copy of the source tree.
  • The skill's entry in state.db.
  • The skill's entry in skills.toml, with mode = "symlink", or mode = "copy" with --keep-copy.
  • The project directory, replaced with a symlink unless --keep-copy is set.
  • A background sync may run afterwards.

If the project directory already is a symlink to that library skill, capture only refreshes the index and prints already linked.

Output​

captured writing-tests (/home/you/.local/share/skl/skills/writing-tests)

(kept project copy) or (overwrote library) follows when --keep-copy or --force applied.

Errors​

  • local state: skill <name> not found under <project>/.agents/skills or extra project dests
  • local state: capture path is not a skill directory
  • local state: skill directory <path> is missing SKILL.md
  • local state: skill <name> already exists in the personal library at <path>; pass --force to overwrite or --as <name>
  • local state: invalid skill name <name>
  • local state: project skill <path> already links at <target> but that library skill is missing