oh-my-opencode/src/features/opencode-skill-loader/skill-definition-record.ts
YeonGyu-Kim 51ced65b5f refactor(opencode-skill-loader): split loader and merger into focused modules
Extract skill loading pipeline into single-responsibility modules:
- skill-discovery.ts, skill-directory-loader.ts, skill-deduplication.ts
- loaded-skill-from-path.ts, loaded-skill-template-extractor.ts
- skill-template-resolver.ts, skill-definition-record.ts
- git-master-template-injection.ts, allowed-tools-parser.ts
- skill-mcp-config.ts, skill-resolution-options.ts
- merger/ directory for skill merging logic
2026-02-08 16:21:19 +09:00

12 lines
500 B
TypeScript

import type { CommandDefinition } from "../claude-code-command-loader/types"
import type { LoadedSkill } from "./types"
export function skillsToCommandDefinitionRecord(skills: LoadedSkill[]): Record<string, CommandDefinition> {
const result: Record<string, CommandDefinition> = {}
for (const skill of skills) {
const { name: _name, argumentHint: _argumentHint, ...openCodeCompatible } = skill.definition
result[skill.name] = openCodeCompatible as CommandDefinition
}
return result
}