> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# patch • AI Agent SDK

> patch: Patch an existing skill using find-replace.

# patch

Method

> This is a method of the [**SkillMutatorProtocol**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/SkillMutatorProtocol.md) class in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

Patch an existing skill using find-replace.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def patch(name: str, old_string: str, new_string: str, file_path: Optional[str], replace_all: bool, propose: bool) -> str
```

## Parameters

**name** `str` *required*

Skill name to modify

**old\_string** `str` *required*

Text to find and replace

**new\_string** `str` *required*

Replacement text

**file\_path** `Optional[str]`

Optional specific file within skill (defaults to SKILL.md)

**replace\_all** `bool` (default: False)

Replace all occurrences vs first only

**propose** `bool` (default: True)

If True, stage for approval; if False, apply directly

### Returns

**Returns** `str`

Status message describing the action taken

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/skills/protocols.py#L89)
>
> `praisonaiagents/skills/protocols.py` at line 89


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.