Create Skill • AI Agent SDK
create_skill: Create a new skill with the given content.
create_skill
Method
</div>
This is a method of the SkillManager class in the manager module.
Create a new skill with the given content.
Signature
def create_skill(name: str, content: str, category: str, agent_created: bool, propose: Optional[bool], base_dir: Optional[str]) -> dictParameters
strSkill name (must be valid identifier)
strSkill instructions/content for SKILL.md
strOptional skill category
boolProvenance flag marking the skill as agent-authored. Defaults to True since skills created via this API originate from the agent’s self-improvement loop. Lifecycle curator plugins only ever touch agent-created skills.
Optional[bool]If True, stage the mutation for human approval instead of writing to disk. Defaults to the manager’s `write_approval policy (safe-by-default). Pass propose=False` to write directly in trusted/local contexts.
Optional[str]Internal override for the destination skills directory. Used when applying an approved proposal so the skill lands in the directory it was staged from, independent of the approving process’s cwd. When None, the destination is resolved via :meth:_skills_base_dir.
Returns
dictDict with success status and skill info
Uses
expanduserPathbase_path.mkdirskill_path.mkdiradd_skilllogger.info
Used By
Source
View on GitHubpraisonaiagents/skills/manager.py at line 635