> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentium.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Skills

> Public skills signatures and configuration in @agentium/core 4.0.0.

Import these **12 exports** from `@agentium/core`. Read the [skills guide](/skills/overview) for setup and behavior, or return to the [package reference](/api-reference/core).

A `?` marks an optional field. These are declarations for lookup; run the examples in the linked guide. Follow related-type links for Agentium types and source links for imported dependency types.

## GitSkillLoader

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/skills/loaders/git.ts)

```typescript theme={null}
/**
 * Loader for git-installable skills.
 *
 * Accepted source formats:
 *   git+https://github.com/me/my-skill.git
 *   git+https://github.com/me/my-skill.git#v1.2.3       (tag)
 *   git+https://github.com/me/my-skill.git#main          (branch / ref)
 *   git+ssh://git@github.com/me/my-skill.git
 *
 * The repository must contain a `skill.json` manifest at the root (or in a
 * subdir specified via `?subdir=path/in/repo`).
 */
export declare class GitSkillLoader implements SkillLoader {
    constructor(config?: GitSkillLoaderConfig);
    canLoad(source: string): boolean;
    load(source: string): Promise<Skill>;
}
```

Related: [`GitSkillLoaderConfig`](/api-reference/core/skills#gitskillloaderconfig), [`Skill`](/api-reference/core/skills#skill), [`SkillLoader`](/api-reference/core/skills#skillloader).

## GitSkillLoaderConfig

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/skills/loaders/git.ts)

```typescript theme={null}
export interface GitSkillLoaderConfig {
    /**
     * Local directory where cloned skills are cached. Defaults to a tempdir per process.
     * Setting an explicit path lets you cache skills across runs.
     */
    cacheDir?: string;
    /** Default ref to checkout when none is specified in the URL. */
    defaultRef?: string;
}
```

## loadSkill

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/skills/skill-manager.ts)

```typescript theme={null}
/** Convenience function — loads a skill from any source type. */
export declare function loadSkill(source: SkillSource): Promise<Skill>;
```

Related: [`Skill`](/api-reference/core/skills#skill), [`SkillSource`](/api-reference/core/skills#skillsource).

## parseSkillMd

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/skills/skill-md.ts)

```typescript theme={null}
export declare function parseSkillMd(text: string, fallbackName?: string): Omit<SkillMd, "dir"> | null;
```

Related: [`SkillMd`](/api-reference/core/skills#skillmd).

## Skill

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/skills/types.ts)

```typescript theme={null}
/**
 * A Skill is a pre-packaged bundle of tools and optional instructions.
 * It encapsulates domain expertise that can be loaded from various sources.
 */
export interface Skill {
    /** Unique name for this skill. */
    name: string;
    /** Human-readable description. */
    description: string;
    /** Semver version string. */
    version: string;
    /** Tools provided by this skill. */
    tools: ToolDef[];
    /** Optional instructions fragment injected into the system prompt when this skill is active. */
    instructions?: string;
    /** Metadata — author, license, tags, etc. */
    metadata?: Record<string, unknown>;
}
```

Related: [`ToolDef`](/api-reference/core/tools#tooldef).

## SkillLoader

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/skills/types.ts)

```typescript theme={null}
/**
 * Interface for skill loaders. Each loader knows how to load skills from a
 * specific source type (filesystem, npm, remote URL).
 */
export interface SkillLoader {
    /** Returns true if this loader can handle the given source string. */
    canLoad(source: string): boolean;
    /** Load a skill from the source. */
    load(source: string): Promise<Skill>;
}
```

Related: [`Skill`](/api-reference/core/skills#skill).

## SkillManager

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/skills/skill-manager.ts)

```typescript theme={null}
/**
 * Orchestrates skill loading from multiple sources.
 * Skills are loaded lazily on first access.
 */
export declare class SkillManager {
    constructor(sources: Array<Skill | SkillSource>);
    /** Get all tools from all loaded skills. Triggers lazy loading. */
    getTools(): Promise<ToolDef[]>;
    /** Get combined instruction fragments from all loaded skills. */
    getInstructions(): Promise<string>;
    /** Get all loaded skills. Triggers lazy loading. */
    getSkills(): Promise<Skill[]>;
    /** Add a skill or source dynamically after construction. */
    addSkill(source: Skill | SkillSource): Promise<Skill>;
}
```

Related: [`Skill`](/api-reference/core/skills#skill), [`SkillSource`](/api-reference/core/skills#skillsource), [`ToolDef`](/api-reference/core/tools#tooldef).

## SkillManifest

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/skills/types.ts)

```typescript theme={null}
/**
 * Manifest file (skill.json) loaded from a skill directory.
 */
export interface SkillManifest {
    name: string;
    description: string;
    version: string;
    /** Relative path to the main module that exports tools. */
    main: string;
    /** Optional instructions text or path to an instructions file. */
    instructions?: string;
    metadata?: Record<string, unknown>;
}
```

## SkillMd

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/skills/skill-md.ts)

```typescript theme={null}
export interface SkillMd {
    name: string;
    description: string;
    body: string;
    dir: string;
    version?: string;
}
```

## SkillMdManager

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/skills/skill-md.ts)

```typescript theme={null}
/**
 * Loads Agent Skills (`SKILL.md`) with progressive disclosure:
 * the prompt only gets name + description until the agent asks for the body.
 */
export declare class SkillMdManager {
    constructor(config: SkillMdManagerConfig);
    ensureLoaded(): Promise<void>;
    list(): Promise<Array<Pick<SkillMd, "name" | "description">>>;
    get(name: string): Promise<SkillMd | null>;
    /** ~100-token index injected into the system prompt. */
    getIndexPrompt(): Promise<string>;
    getTools(): ToolDef[];
}
```

Related: [`SkillMd`](/api-reference/core/skills#skillmd), [`SkillMdManagerConfig`](/api-reference/core/skills#skillmdmanagerconfig), [`ToolDef`](/api-reference/core/tools#tooldef).

## SkillMdManagerConfig

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/skills/skill-md.ts)

```typescript theme={null}
export interface SkillMdManagerConfig {
    /** Directories to scan for skill folders that contain SKILL.md */
    dirs: string[];
}
```

## SkillSource

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/skills/types.ts)

```typescript theme={null}
/** Input type for loadSkill — a source string (path, package name, or URL). */
export type SkillSource = string;
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.