Files
oh-my-pi/packages/coding-agent/src/capability/skill.ts
T
can1357 0438f01fd5 feat(coding-agent): added multi-tool config discovery across 8 AI IDEs
- Added unified capability-based discovery system for loading configuration from 8 AI coding tools (Cursor, Windsurf, Cline, GitHub Copilot, Gemini, Codex, Claude, VS Code).
- Added Discovery settings tab in interactive mode for enabling/disabling configuration providers.
- Added provider source attribution showing which tool contributed each configuration item.
- Added support for tool-specific rule formats including Cursor MDC, Windsurf global_rules, and Cline .clinerules.
- Changed MCP tool name parsing to use last underscore separator for improved server name handling.
- Refactored core loaders (skills, hooks, custom tools, slash commands) to use capability API instead of manual directory scanning.
2026-01-03 18:26:07 +01:00

50 lines
1.2 KiB
TypeScript

/**
* Skills Capability
*
* Skills provide specialized knowledge or workflows that extend agent capabilities.
*/
import { defineCapability } from "./index";
import type { SourceMeta } from "./types";
/**
* Parsed frontmatter from a skill file.
*/
export interface SkillFrontmatter {
name?: string;
description?: string;
globs?: string[];
alwaysApply?: boolean;
[key: string]: unknown;
}
/**
* A skill that provides specialized knowledge or workflows.
*/
export interface Skill {
/** Skill name (unique key, derived from filename or frontmatter) */
name: string;
/** Absolute path to skill file */
path: string;
/** Skill content (markdown) */
content: string;
/** Parsed frontmatter */
frontmatter?: SkillFrontmatter;
/** Source level */
level: "user" | "project";
/** Source metadata */
_source: SourceMeta;
}
export const skillCapability = defineCapability<Skill>({
id: "skills",
displayName: "Skills",
description: "Specialized knowledge and workflow files that extend agent capabilities",
key: (skill) => skill.name,
validate: (skill) => {
if (!skill.name) return "Missing skill name";
if (!skill.path) return "Missing skill path";
return undefined;
},
});