Patch Skill • AI Agent SDK
patch_skill: Apply a patch to a skill using fuzzy find-and-replace.
patch_skill
Method
</div>
This is a method of the SkillManager class in the manager module.
Apply a patch to a skill using fuzzy find-and-replace.
Signature
def patch_skill(name: str, old_string: str, new_string: str, file_path: str, replace_all: bool, propose: Optional[bool]) -> dictParameters
ParamField
strSkill name to patch
ParamField
strString to find and replace
ParamField
strReplacement string
ParamField
strOptional relative path within skill (defaults to SKILL.md)
ParamField
boolReplace all occurrences
ParamField
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
ResponseField
dictDict with success status
Uses
get_skillPathrelative_path.is_absoluteresolvetarget_file.relative_totarget_file.existsf.readactivate
Used By
Source
View on GitHubpraisonaiagents/skills/manager.py at line 793