> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Discover Skills • AI Agent SDK

> discover_skills: Discover all valid skills in the given directories.

# discover\_skills

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**discovery**](../modules/discovery) module.

Discover all valid skills in the given directories.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def discover_skills(skill_dirs: Optional[List[str]], include_defaults: bool, sources: Optional[List]) -> List[SkillProperties]
```

## Parameters

<ParamField query="skill_dirs" type="Optional" required={false}>
  List of directory paths to scan for skills. Each directory should contain skill subdirectories.
</ParamField>

<ParamField query="include_defaults" type="bool" required={false} default="True">
  Whether to include default skill directories
</ParamField>

<ParamField query="sources" type="Optional[List]" required={false}>
  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.
</ParamField>

### Returns

<ResponseField name="Returns" type="List[SkillProperties]">
  List of SkillProperties for all valid skills found
</ResponseField>

## 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

* [`SkillManager.discover`](../functions/SkillManager-discover)
* [`SkillManager.reload`](../functions/SkillManager-reload)
* [`SkillManager.add_skill_by_name`](../functions/SkillManager-add_skill_by_name)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/skills/discovery.py#L77">
  `praisonaiagents/skills/discovery.py` at line 77
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Skills Concept" icon="wand-magic-sparkles" href="/docs/docs/concepts/skills" />

  <Card title="Skills Feature" icon="star" href="/docs/docs/features/skills" />
</CardGroup>
