# discover_skills_and_roots

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/skills/invocation/discover_skills_and_roots)

Discover skills and build pre-resolved containment roots.

## Signature

```python
discover_skills_and_roots(
    assistant_id: str,
) -> tuple[list[ExtendedSkillMetadata], list[Path]]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `assistant_id` | `str` | Yes | Agent identifier used to resolve user skill directories. |

## Returns

`tuple[list[ExtendedSkillMetadata], list[Path]]`

Tuple of `(skill metadata list, pre-resolved containment roots)`.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/0412009c5441bef8d75a427e1da8909e33ab5b56/libs/code/deepagents_code/skills/invocation.py#L28)