Skill Manager • AI Agent SDK
SkillManager: Manager for discovering, loading, and using Agent Skills.
SkillManager
Defined in the manager module.
AI Agent
Manager for discovering, loading, and using Agent Skills.
This is the main entry point for Agent Skills integration. Supports progressive disclosure and zero performance impact when skills are not used.
Constructor
Optional[EnforcementLevel]No description available.
Optional[bool]No description available.
Methods
Get all loaded skills.
skill_names()Get names of all loaded skills.
discover()Discover skills from directories.
reload()Re-scan skill sources and refresh the in-memory index.
bundles()Get all registered bundle manifests.
bundle_names()Get names of all registered bundles.
add_bundle()Register a bundle manifest.
get_bundle()Get a bundle manifest by name (`@` marker optional).
Discover bundle manifests from directories.
resolve()Expand `@bundle` selectors into member skill names.
Return bundle-level instructions for selected bundles, in order.
add_skill()Add a single skill from a directory path.
add_skill_by_name()Add a single skill resolved by name (not path).
get_skill()Get a skill by name.
activate()Activate a skill (load its instructions).
activate_by_name()Activate a skill by name.
get_available_skills()Get metadata for all available skills.
get_user_invocable_skills()Return skills the user may invoke via slash-commands.
get_allowed_tools()Return the `allowed-tools` list for a skill as a list of names.
Render a skill body into a ready-to-send prompt.
to_prompt()Generate XML prompt for available skills.
get_instructions()Get instructions for a skill, activating if needed.
load_resources()Load all resources for a skill.
create_skill()Create a new skill with the given content.
edit_skill()Edit an existing skill’s content (full rewrite).
patch_skill()Apply a patch to a skill using fuzzy find-and-replace.
delete_skill()Remove a skill.
archive_skill()Archive a skill (recoverable, never hard-deleted).
restore_skill()Restore a previously archived skill back to active use.
list_archived_skills()List the names of skills currently in the archive store.
rollback_skill()Roll a skill’s SKILL.md back to its content before the last mutation.
write_skill_file()Write a file within a skill’s directory.
remove_skill_file()Remove a file from a skill’s directory.
validate_skill_capabilities()Validate a skill’s capability requirements.
get_available_skills_by_state()Get skills filtered by their capability validation state.
get_skills_diagnostics()Get capability diagnostics for all skills.
list_pending()List all pending skill mutations awaiting approval.
approve()Approve a pending skill mutation and apply it to disk.
reject()Reject a pending skill mutation without applying it.
create()Protocol alias for :meth:create_skill.
Protocol alias for :meth:edit_skill.
Protocol alias for :meth:patch_skill.
Protocol alias for :meth:delete_skill.
Protocol alias for :meth:write_skill_file.
Protocol alias for :meth:remove_skill_file.
Clear all loaded skills.
Usage
manager = SkillManager()
# Discover skills from directories
manager.discover(["./skills", "~/.praisonai/skills"])
# Get XML for system prompt
prompt_xml = manager.to_prompt()
# Activate a specific skill
skill = manager.get_skill("pdf-processing")
manager.activate(skill)Source
View on GitHubpraisonaiagents/skills/manager.py at line 23