> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# cleanup

> Release resources when the skill is removed or the agent shuts down.

Called when the skill is removed or the agent shuts down. Override to release
resources, close connections, cancel background tasks, etc.

## **Returns**

`None`

## **Example**

```python {11}
from signalwire.core.skill_base import SkillBase

class DatabaseSkill(SkillBase):
    SKILL_NAME = "database"
    SKILL_DESCRIPTION = "Database query skill"

    def setup(self) -> bool:
        self.connection = create_connection()
        return True

    def cleanup(self):
        if hasattr(self, "connection"):
            self.connection.close()
            self.logger.info("Database connection closed")

    def register_tools(self):
        pass
```