patch • AI Agent SDK
patch: Patch an existing skill using find-replace.
patch
Method
</div>
This is a method of the SkillMutatorProtocol class in the protocols module.
Patch an existing skill using find-replace.
Signature
def patch(name: str, old_string: str, new_string: str, file_path: Optional[str], replace_all: bool, propose: bool) -> strParameters
ParamField
strSkill name to modify
ParamField
strText to find and replace
ParamField
strReplacement text
ParamField
Optional[str]Optional specific file within skill (defaults to SKILL.md)
ParamField
boolReplace all occurrences vs first only
ParamField
boolIf True, stage for approval; if False, apply directly
Returns
ResponseField
strStatus message describing the action taken
Source
View on GitHubpraisonaiagents/skills/protocols.py at line 89