Agent/Skill.swift

osaurus · Packages/OsaurusCore/Models/Agent/Skill.swift · swift · MIT
ai, tag:knn-classified

Defines a Swift model for AI skill metadata, including files, instructions, and built‑in skill list.

// Source: https://github.com/osaurus-ai/osaurus | License: MIT | Copyright 2026 Osaurus, Inc
// Provided via justclaw.it.com; keep this notice with the code.
//
//  Skill.swift
//  osaurus
//
//  Defines a Skill - markdown instructions that guide AI behavior.
//  Skills are stored as directories with SKILL.md files following the Agent Skills spec.
//  See: https://agentskills.io/specification
//

import Foundation

/// Represents a file within a skill's references or assets directory
public struct SkillFile: Codable, Identifiable, Sendable, Equatable {
    public var id: String { name }
    public let name: String
    public let relativePath: String
    public let size: Int64

    public init(name: String, relativePath: String, size: Int64 = 0) {
        self.name = name
        self.rela

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key