install_skill#
- ansys.mapdl.core.cli.skills.install_skill(skill_name, env, scope='local', skills_dir=None)#
Install a bundled skill into an AI coding environment.
All files in the skill directory, except
evals/andworkspace/, are copied to the target location, and a reference is added to the main configuration file of the environment so that the AI tool discovers the skill. Running the function twice is safe: existing references are not duplicated.- Parameters:
- skill_name
str Skill identifier, as reported by
list_skills().- env
str AI coding environment. One of
SUPPORTED_ENVS.- scope
str, default: “local” Either
"local"to install into the current working directory, or"global"to install into the home directory of the user.- skills_dir
pathlib.Path,optional Directory holding one sub-directory per skill. Defaults to the directory bundled with the package.
- skill_name
- Returns:
- Raises:
UnknownSkillErrorWhen skill_name is not bundled with PyMAPDL.
UnsupportedScopeErrorWhen env does not support scope.
- Return type:
Examples
Install the
pymapdl-cliskill for Claude in the current project:>>> from ansys.mapdl.core.cli.skills import install_skill >>> install_skill("pymapdl-cli", env="claude") [' updated /home/user/project/CLAUDE.md']