***

title: get_skill_data
slug: /reference/python/agents/skill-base/get-skill-data
description: Read this skill instance's namespaced state from raw_data.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[ref-skillbase]: /docs/server-sdks/reference/python/agents/skill-base

Read this skill instance's namespaced state from `raw_data["global_data"]`.
Each skill instance gets an isolated namespace to prevent collisions between
multiple skills.

## **Parameters**

<ParamField path="raw_data" type="dict[str, Any]" required={true} toc={true}>
  The raw\_data dict passed to SWAIG function handlers.
</ParamField>

## **Returns**

`dict[str, Any]` -- The skill's state, or empty dict if not found.

## **Example**

```python {3}
def _handle_query(self, args, raw_data):
    state = self.get_skill_data(raw_data)
    last_query = state.get("last_query", "none")
    return FunctionResult(f"Previous query was: {last_query}")
```