MCPcopy Index your code
hub / github.com/MiniMax-AI/Mini-Agent / Skill

Class Skill

mini_agent/tools/skill_loader.py:16–44  ·  view source on GitHub ↗

Skill data structure

Source from the content-addressed store, hash-verified

14
15@dataclass
16class Skill:
17 """Skill data structure"""
18
19 name: str
20 description: str
21 content: str
22 license: Optional[str] = None
23 allowed_tools: Optional[List[str]] = None
24 metadata: Optional[Dict[str, str]] = None
25 skill_path: Optional[Path] = None
26
27 def to_prompt(self) -> str:
28 """Convert skill to prompt format"""
29 # Inject skill root directory path for context
30 skill_root = str(self.skill_path.parent) if self.skill_path else "unknown"
31
32 return f"""
33# Skill: {self.name}
34
35{self.description}
36
37**Skill Root Directory:** `{skill_root}`
38
39All files and references in this skill are relative to this directory.
40
41---
42
43{self.content}
44"""
45
46
47class SkillLoader:

Callers 1

load_skillMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected