# SkillMessage

> **Class** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/widgets/messages/SkillMessage)

Widget displaying a skill invocation with collapsible body.

Shows skill name, source badge, description, and user args as a compact
header. The full SKILL.md body (frontmatter stripped) is hidden behind a
preview/expand toggle (click or Ctrl+O).  The expanded view renders
markdown via Rich's `Markdown` inside a single `Static` widget.

Visibility is driven by a CSS class (`-expanded`) toggled via a Textual
reactive `var`. Click handlers are scoped to the header and hint widgets
(`_SkillToggle`) so clicks on the rendered markdown body do not trigger
expansion toggles (preserving text selection, for instance).

## Signature

```python
SkillMessage(
    self,
    skill_name: str,
    description: str = '',
    source: str = '',
    body: str = '',
    args: str = '',
    **kwargs: Any = {},
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `skill_name` | `str` | Yes | Skill identifier. |
| `description` | `str` | No | Short description of the skill. (default: `''`) |
| `source` | `str` | No | Origin label (e.g., `'built-in'`, `'user'`). (default: `''`) |
| `body` | `str` | No | Full SKILL.md content (frontmatter included). (default: `''`) |
| `args` | `str` | No | User-provided arguments. (default: `''`) |
| `**kwargs` | `Any` | No | Additional arguments passed to parent. (default: `{}`) |

## Extends

- `Vertical`

## Constructors

```python
__init__(
    self,
    skill_name: str,
    description: str = '',
    source: str = '',
    body: str = '',
    args: str = '',
    **kwargs: Any = {},
) -> None
```

| Name | Type |
|------|------|
| `skill_name` | `str` |
| `description` | `str` |
| `source` | `str` |
| `body` | `str` |
| `args` | `str` |


## Properties

- `DEFAULT_CSS`

## Methods

- [`compose()`](https://reference.langchain.com/python/deepagents-cli/widgets/messages/SkillMessage/compose)
- [`on_mount()`](https://reference.langchain.com/python/deepagents-cli/widgets/messages/SkillMessage/on_mount)
- [`toggle_body()`](https://reference.langchain.com/python/deepagents-cli/widgets/messages/SkillMessage/toggle_body)
- [`watch__expanded()`](https://reference.langchain.com/python/deepagents-cli/widgets/messages/SkillMessage/watch__expanded)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/4869645403fe9ce57df6067417fdefc6bf509fe0/libs/cli/deepagents_cli/widgets/messages.py#L326)