Write File • AI Agent SDK

write_file: Write a file within a skill directory.

write_file

Method

</div>

This is a method of the SkillMutatorProtocol class in the protocols module.

Write a file within a skill directory.

Signature

python
def write_file(name: str, file_path: str, file_content: str, propose: bool) -> str

Parameters

ParamField str

Skill name

ParamField str

Relative path within skill directory

ParamField str

File contents to write

ParamField bool

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

Returns

ResponseField str

Status message describing the action taken

Source

View on GitHub

praisonaiagents/skills/protocols.py at line 132