Discover Skills • AI Agent SDK

discover_skills: Discover all valid skills in the given directories.

discover_skills

Function

</div>

This function is defined in the discovery module.

Discover all valid skills in the given directories.

Signature

python
def discover_skills(skill_dirs: Optional[List[str]], include_defaults: bool, sources: Optional[List]) -> List[SkillProperties]

Parameters

ParamField Optional

List of directory paths to scan for skills. Each directory should contain skill subdirectories.

ParamField bool

Whether to include default skill directories

ParamField Optional[List]

Optional declarative remote skill sources (URL strings, `&#123;"url","ref"&#125; dicts, or objects implementing fetch`). These are synced into a versioned local cache and scanned after local directories. Opt-in and offline-safe (falls back to the last-good cache). Remote skills are re-validated by the parser like any other.

Returns

ResponseField List[SkillProperties]

List of SkillProperties for all valid skills found

Uses

  • resolve
  • expanduser
  • Path
  • path.exists
  • path.is_dir
  • get_default_skill_dirs
  • fetch_remote_skill_dirs
  • logger.warning
  • seen.add
  • find_skill_md

Used By

Source

View on GitHub

praisonaiagents/skills/discovery.py at line 77


Related Documentation