mirror of
https://github.com/supabase/agent-skills.git
synced 2026-01-26 19:09:51 +08:00
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { dirname, join } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import type { SkillConfig } from "./types.js";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
const BUILD_DIR = join(__dirname, "..");
|
|
|
|
export const SKILLS: Record<string, SkillConfig> = {
|
|
"postgres-best-practices": {
|
|
name: "postgres-best-practices",
|
|
type: "rule-based",
|
|
skillDir: join(BUILD_DIR, "../skills/postgres-best-practices"),
|
|
agentsOutput: join(
|
|
BUILD_DIR,
|
|
"../skills/postgres-best-practices/AGENTS.md",
|
|
),
|
|
metadataFile: join(
|
|
BUILD_DIR,
|
|
"../skills/postgres-best-practices/metadata.json",
|
|
),
|
|
},
|
|
supabase: {
|
|
name: "supabase",
|
|
type: "reference-based",
|
|
skillDir: join(BUILD_DIR, "../skills/supabase"),
|
|
agentsOutput: join(BUILD_DIR, "../skills/supabase/AGENTS.md"),
|
|
metadataFile: join(BUILD_DIR, "../skills/supabase/metadata.json"),
|
|
},
|
|
};
|
|
|
|
// Get skill config by name
|
|
export function getSkillConfig(name: string): SkillConfig | undefined {
|
|
return SKILLS[name];
|
|
}
|
|
|
|
// Get all skill names
|
|
export function getAllSkillNames(): string[] {
|
|
return Object.keys(SKILLS);
|
|
}
|