型号
- 作者仓库星标 330
- 许可证 MIT
- 作者仓库 claude-skill-registry
- 领域
- 通用
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @majiayu000 · MIT
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
"""Data models for Agent Skills."""
from dataclasses import dataclass, field
from typing import Optional
@dataclass
class SkillProperties:
"""Properties parsed from a skill's SKILL.md frontmatter.
Attributes:
name: Skill name in kebab-case (required)
description: What the skill does and when the model should use it (required)
license: License for the skill (optional)
compatibility: Compatibility information for the skill (optional)
allowed_tools: Tool patterns the skill requires (optional, experimental)
metadata: Key-value pairs for client-specific properties (defaults to
empty dict; omitted from to_dict() output when empty)
"""
name: str
description: str
license: Optional[str] = None
compatibility: Optional[str] = None
allowed_tools: Optional[str] = None
metadata: dict[str, str] = field(default_factory=dict)
def to_dict(self) -> dict:
"""Convert to dictionary, excluding None values."""
result = {"name": self.name, "description": self.description}
if self.license is not None:
result["license"] = self.license
if self.compatibility is not None:
result["compatibility"] = self.compatibility
if self.allowed_tools is not None:
result["allowed-tools"] = self.allowed_tools
if self.metadata:
result["metadata"] = self.metadata
return result
章节与文件索引
按说明文件中的顺序排列。
文件/命令 -> 原文未列出明确文件或命令
内容校验值 -> 64c98a76be55
当前原文的自动摘译,尚未人工审校。
@dataclass class SkillProperties: """从技能的 SKILL.md frontmatter 解析的属性。
属性: name:技能名称,以短横线形式显示(必需) 描述:技能的用途以及模型何时使用它(必需) 许可证:技能的许可证(可选) 兼容性:技能的兼容性信息(可选) allowed_tools:技能所需的工具模式(可选,实验性) 元数据:客户端特定属性的键值对(默认为空字典;空时从 to_dict() 输出中省略) """
名称:str 描述:str 许可证:可选[str] = None 兼容性:Optional[str] = None allowed_tools:可选[str] = None 元数据:dict[str, str] = 字段(default_factory=dict)
def to_dict(self) -> dict: """转换为字典,不包括 None 值。""" result = {"name": self.name, "description": self.description} 如果 self.license 不是 None: result["license"] = self.license 如果 self.compatibility 不是 None: result["compatibility"] = self.compatibility 如果 self.allowed_tools 不是 None: result["allowed-tools"] = self.allowed_tools if self.metadata: result["metadata"] = self.metadata 返回结果