/ skills / bundled / verify.ts
verify.ts
 1  import { parseFrontmatter } from '../../utils/frontmatterParser.js'
 2  import { registerBundledSkill } from '../bundledSkills.js'
 3  import { SKILL_FILES, SKILL_MD } from './verifyContent.js'
 4  
 5  const { frontmatter, content: SKILL_BODY } = parseFrontmatter(SKILL_MD)
 6  
 7  const DESCRIPTION =
 8    typeof frontmatter.description === 'string'
 9      ? frontmatter.description
10      : 'Verify a code change does what it should by running the app.'
11  
12  export function registerVerifySkill(): void {
13    if (process.env.USER_TYPE !== 'ant') {
14      return
15    }
16  
17    registerBundledSkill({
18      name: 'verify',
19      description: DESCRIPTION,
20      userInvocable: true,
21      files: SKILL_FILES,
22      async getPromptForCommand(args) {
23        const parts: string[] = [SKILL_BODY.trimStart()]
24        if (args) {
25          parts.push(`## User Request\n\n${args}`)
26        }
27        return [{ type: 'text', text: parts.join('\n\n') }]
28      },
29    })
30  }