Rollback Skill • AI Agent SDK

rollback_skill: Roll a skill's SKILL.md back to its content before the last mutation.

rollback_skill

Method

</div>

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

Roll a skill’s SKILL.md back to its content before the last mutation.

Restores the snapshot saved by the most recent `edit_skill or patch_skill` call, undoing a mutation that broke a previously working skill.

Note: this is a single-step undo. Only the most recent mutation is snapshotted; sequential `edit/patch` calls overwrite the prior snapshot, so rollback cannot step back more than one mutation.

Signature

python
def rollback_skill(name: str) -> dict

Parameters

ParamField str

Skill name to roll back

Returns

ResponseField dict

Dict with success status

Uses

  • get_skill
  • backup_file.exists
  • backup_file.read_text
  • activate

Source

View on GitHub

praisonaiagents/skills/manager.py at line 1009


Related Documentation