How to use SkillPort's Path-Based Design for efficient execution
mainSkillPort is designed as a knowledge provider, not an execution environment. When an agent calls load_skill(), the server returns the file path to the skill's resources rather than the raw file content.
Why use paths?
- Low Context Cost: Returning a path costs ~20 tokens, whereas returning file content can cost thousands.
- Direct Execution: The agent can execute scripts directly in the user's project context using the provided path.
Workflow Example:
- Agent calls
load_skill("pdf-extractor"). - Server returns:
{"name": "pdf-extractor", "instructions": "...", "path": "/Users/me/.skillport/skills/pdf-extractor"}. - Agent executes the tool locally:
python /Users/me/.skillport/skills/pdf-extractor/scripts/extract.py ./input.pdf --output ./output.txt.
# load_skill returns:
{
"name": "pdf-extractor",
"instructions": "...",
"path": "/Users/me/.skillport/skills/pdf-extractor"
}