> ## 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 Skill • AI Agent SDK

> patch_skill: Apply a patch to a skill using fuzzy find-and-replace.

# patch\_skill

Method

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

Apply a patch to a skill using fuzzy find-and-replace.

## Signature

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

## Parameters

**name** `str` *required*

Skill name to patch

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

String to find and replace

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

Replacement string

**file\_path** `str`

Optional relative path within skill (defaults to SKILL.md)

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

Replace all occurrences

**propose** `Optional[bool]`

If True, stage the mutation for human approval instead of writing to disk. Defaults to the manager's `write_approval` policy. Pass `propose=False` to apply directly.

### Returns

**Returns** `dict`

Dict with success status

## Uses

* `get_skill`
* `Path`
* `relative_path.is_absolute`
* `resolve`
* `target_file.relative_to`
* `target_file.exists`
* `f.read`
* `activate`

## Used By

* [`SkillManager.patch`](../functions/SkillManager-patch)

## Source

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

***

## Related Documentation

> [card] [Skills Concept](https://praison.ai/docs/docs/concepts/skills)

> [card] [Skills Feature](https://praison.ai/docs/docs/features/skills)


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