Skip to content

importer

diapason.skills.importer

SkillImporter — install ResolvedSkill instances into ~/.diapason/skills/.

Steps performed by import_skill:

  1. Parse the source SKILL.md through SkillParser (strict + tolerant).
  2. Translate tool references in the markdown body via ToolTranslator.
  3. Decide on scripts (default-skip; opt-in via with_scripts=True).
  4. Write to disk at ///:
  5. translated SKILL.md
  6. references/, assets/, templates/ (always copied)
  7. scripts/ (only if approved)
  8. .source metadata file
  9. Return ImportResult with status, warnings, translated/missing tools.

ImportResult dataclass

Result of importing a single skill.

SkillImporter

Install resolved skills into the user skills directory.

import_skill(resolved, *, with_scripts=False, force=False, confirm_dangerous=False)

Install resolved into <target_root>/<source>/<name>/.

Returns an :class:ImportResult with status, paths, translated tools, untranslated tools, and warnings.