# build_skill_invocation_envelope

> **Function** in `deepagents_cli`

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

Build the wrapped prompt and persisted metadata for a skill.

## Signature

```python
build_skill_invocation_envelope(
    skill: ExtendedSkillMetadata,
    content: str,
    args: str = '',
) -> SkillInvocationEnvelope
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `skill` | `ExtendedSkillMetadata` | Yes | Loaded skill metadata. |
| `content` | `str` | Yes | Raw `SKILL.md` content. |
| `args` | `str` | No | Optional user request appended after the skill body. (default: `''`) |

## Returns

`SkillInvocationEnvelope`

A `SkillInvocationEnvelope` with the composed prompt and
`message_kwargs` containing persisted skill metadata.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/b710a69b12e49479045eaa54dfb709326473500b/libs/cli/deepagents_cli/skills/invocation.py#L68)