Write Skill File • AI Agent SDK

write_skill_file: Write a file within a skill's directory.

write_skill_file

Method

</div>

This is a method of the SkillManager class in the manager module.

Write a file within a skill’s directory.

Signature

python
def write_skill_file(name: str, file_path: str, file_content: str, propose: Optional[bool]) -> dict

Parameters

ParamField str

Skill name

ParamField str

Relative path within skill (must be under allowed subdirs)

ParamField str

File content to write

ParamField Optional[bool]

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

Returns

ResponseField dict

Dict with success status

Uses

  • get_skill
  • Path
  • relative_path.is_absolute
  • resolve
  • target_file.relative_to
  • mkdir

Used By

Source

View on GitHub

praisonaiagents/skills/manager.py at line 1051


Related Documentation