get_skill_related_file
Retrieve file content or paths from skill directories to access supporting scripts, documentation, and resources for AI skill implementation.
Instructions
Read the content of a specific file within a skill directory.
This tool returns the requested file based on a path relative to the skill's SKILL.md location. Use get_skill_details() first to see the list of available files.
Parameters
skill_name : str The name of the skill. relative_path : str Path to the file relative to the skill directory (e.g., "scripts/qc_core.py"). return_type : str Type of data to return: "content" (default), "file_path", or "both". - "content": Returns only the file content as text - "file_path": Returns only the absolute path to the file - "both": Returns both content and file path in a dict
Returns
str | dict[str, str] If return_type is "content": The content of the requested file. If return_type is "file_path": The absolute path to the file. If return_type is "both": Dictionary with "content" and "file_path" keys.
Raises
ValueError If the skill or file is not found, if the path is invalid, or if return_type is invalid.
Examples
content = get_skill_related_file("single-cell-rna-qc", "scripts/qc_core.py", return_type="content") print(len(content) > 0) True
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skill_name | Yes | ||
| relative_path | Yes | ||
| return_type | No | both |