load_skill / load_skills. The agent resolves string names against the package defaults and your workspace skill directories automatically.
Resolution order
When you pass a skill name as a string, the agent resolves it in this order:- Package defaults —
logicore/skills/defaults/ - Workspace skill directories (when
workspace_rootis set) —.agent/skills/,_agent/skills/,.agents/skills/,_agents/skills/
Loading at initialization
Pass skill names in theskills list when constructing an Agent:
web_research and code_review resolve without a workspace_root:
Loading a skill object directly
UseSkillLoader.load() to load a skill from a directory path, then pass the resulting object to agent.load_skill():
SkillLoader.load() returns None if the directory does not contain a valid SKILL.md. Always check the return value before calling agent.load_skill().Loading multiple skills
- Constructor
- load_skills method
- Discovered from directory
Using skills with different agent types
BasicAgent, SmartAgent, and MCPAgent all share the same underlying skill-loading flow from Agent. The skills constructor parameter and load_skill / load_skills methods work identically across all agent types.
What happens after loading
Whenload_skill() runs, the agent does the following:
- Deduplication — if a skill with the same name is already loaded, it is skipped.
- Tool registration — each tool schema from
Skill.toolsis appended toself.internal_tools. - Executor registration — each callable from
Skill.tool_executorsis stored inself.skill_tool_executors. - Tool support flag —
supports_toolsis set toTrueif the skill contributes any tools. - Prompt injection —
_build_skills_prompt_section()formats all loaded skill instructions and_rebuild_system_prompt_with_tools()appends the block to the system prompt:
Inspecting loaded skills
Access the list of currently loaded skills from theskills attribute on an agent instance:
Skill object exposes:
skill.name
skill.name
The
name field from SKILL.md frontmatter, also available via skill.metadata.name.skill.description
skill.description
The
description field from SKILL.md frontmatter, also available via skill.metadata.description.skill.tools
skill.tools
A list of tool schema dicts in OpenAI function-calling format, one per discovered function in
scripts/.skill.tool_executors
skill.tool_executors
A
dict mapping function names to their callables for runtime execution.skill.instructions
skill.instructions
The raw instruction markdown from
SKILL.md (everything after the frontmatter block).skill.skill_dir
skill.skill_dir
A
pathlib.Path pointing to the skill’s root directory, or None if built from an object directly.