Remove Skill File • AI Agent SDK

remove_skill_file: Remove a file from a skill's directory.

remove_skill_file

Method

</div>

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

Remove a file from a skill’s directory.

Signature

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

Parameters

ParamField str

Skill name

ParamField str

Relative path within skill to remove

ParamField Optional[bool]

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

Returns

ResponseField dict

Dict with success status

Uses

  • get_skill
  • target_file.exists
  • relative_to
  • target_file.resolve
  • resolve
  • target_file.unlink

Used By

Source

View on GitHub

praisonaiagents/skills/manager.py at line 1108


Related Documentation