Skip to content

SkillParser ​

Category: Skills

Source: skill_parser.dart

Enums ​

SkillSource ​

Where a skill was discovered.

ValueDescription
project
projectAgents
projectClaude
global
userAgents
userClaude
custom
bundled

SkillDiagnosticSeverity ​

ValueDescription
warning
error

SkillResourceKind ​

ValueDescription
script
reference
asset
other

Classes ​

SkillDiagnostic ​

Constructor ​

dart
const SkillDiagnostic({
    required this.severity,
    required this.code,
    required this.message,
    this.path,
    this.skillName,
  })

Properties ​

PropertyTypeDescription
severitySkillDiagnosticSeverity
codeString
messageString
pathString?
skillNameString?

SkillResource ​

Constructor ​

dart
const SkillResource({
    required this.relativePath,
    required this.absolutePath,
    required this.kind,
    this.sizeBytes,
  })

Properties ​

PropertyTypeDescription
relativePathString
absolutePathString
kindSkillResourceKind
sizeBytesint?

SkillParseError ​

An error thrown when a SKILL.md file cannot be parsed.

Constructor ​

dart
SkillParseError(this.message)

Properties ​

PropertyTypeDescription
messageString

Methods ​

String toString() ​

SkillMeta ​

Parsed metadata from a skill's YAML frontmatter.

Constructor ​

dart
SkillMeta({
    required this.name,
    required this.description,
    this.license,
    this.compatibility,
    this.allowedTools = const [],
    this.metadata = const {},
    this.resources = const [],
    required this.skillDir,
    required this.skillMdPath,
    required this.source,
  })

Properties ​

PropertyTypeDescription
nameString
descriptionString
licenseString?
compatibilityString?
allowedToolsList<String>
metadataMap<String, String>
resourcesList<SkillResource>
skillDirString
skillMdPathString
sourceSkillSource

Methods ​

SkillMeta copyWith({List<SkillResource>? resources}) ​

Functions ​

`SkillMeta parseSkillFrontmatter( ​

String content, String skillDir, String skillMdPath, SkillSource source, )`

Parses YAML frontmatter from a SKILL.md file into a [SkillMeta].

String loadSkillBody(String skillMdPath) ​

Loads the body content of a SKILL.md file (everything after the frontmatter).

Released under the MIT License.