779ca4872b
- Removed Prettier configuration files (.prettierignore and .prettierrc) and migrated formatting to Biome. - Updated Biome configuration from version 2.3.11 to 2.3.12 and changed arrowParentheses rule from 'always' to 'asNeeded'. - Pinned @biomejs/biome dependency to exact version 2.3.12 in package.json and bun.lock. - Applied consistent arrow function formatting across 489 files by removing unnecessary parentheses around single parameters. - Removed blank lines after comment blocks and reorganized imports for consistency across the codebase.
44 lines
1.3 KiB
TypeScript
44 lines
1.3 KiB
TypeScript
/**
|
|
* Skills Configuration
|
|
*
|
|
* Skills provide specialized instructions loaded into the system prompt.
|
|
* Discover, filter, merge, or replace them.
|
|
*/
|
|
import { createAgentSession, discoverSkills, SessionManager, type Skill } from "@oh-my-pi/pi-coding-agent";
|
|
|
|
// Discover all skills from cwd/.omp/skills, ~/.omp/agent/skills, etc.
|
|
const { skills: allSkills } = await discoverSkills();
|
|
console.log(
|
|
"Discovered skills:",
|
|
allSkills.map(s => s.name),
|
|
);
|
|
|
|
// Filter to specific skills
|
|
const filteredSkills = allSkills.filter(s => s.name.includes("browser") || s.name.includes("search"));
|
|
|
|
// Or define custom skills inline
|
|
const customSkill: Skill = {
|
|
name: "my-skill",
|
|
description: "Custom project instructions",
|
|
filePath: "/virtual/SKILL.md",
|
|
baseDir: "/virtual",
|
|
source: "custom",
|
|
};
|
|
|
|
// Use filtered + custom skills
|
|
await createAgentSession({
|
|
skills: [...filteredSkills, customSkill],
|
|
sessionManager: SessionManager.inMemory(),
|
|
});
|
|
|
|
console.log(`Session created with ${filteredSkills.length + 1} skills`);
|
|
|
|
// To disable all skills:
|
|
// skills: []
|
|
|
|
// To use discovery with filtering via settings:
|
|
// discoverSkills(process.cwd(), undefined, {
|
|
// ignoredSkills: ["browser-tools"], // glob patterns to exclude
|
|
// includeSkills: ["brave-*"], // glob patterns to include (empty = all)
|
|
// })
|