/**
 * Skill templates for auto-creation
 *
 * Purpose: provide canonical SKILL.md templates for common skill types
 * so auto-skill creation produces consistent, valid frontmatter.
 *
 * Consumer: auto-skill creation flow and CLI skill scaffolding.
 */

/**
 * Template for a user+model invocable skill with code edits.
 */
export function codeSkillTemplate(name, description) {
	return `---
name: ${name}
description: ${description}
user-invocable: true
model-invocable: true
side-effects: code-edits
permission-profile: normal
triggers:
  - build
  - code
  - "*"
---

# ${name}

## When to Use

Describe when this skill should be invoked.

## Instructions

1. Step one
2. Step two
3. Step three

## Verification

- [ ] Check A
- [ ] Check B

## Examples

\`\`\`typescript
// Example code
\`\`\`
`;
}

/**
 * Template for a dangerous skill (model never invokes by default).
 */
export function dangerousSkillTemplate(name, description) {
	return `---
name: ${name}
description: ${description}
user-invocable: true
model-invocable: false
side-effects: production-mutation
permission-profile: trusted
triggers: []
---

# ${name}

## ⚠️ Dangerous Operation

This skill performs high-risk actions. Model invocation is disabled by default.

## Prerequisites

- [ ] Gate A passes
- [ ] Gate B passes

## Procedure

1. Step one
2. Step two

## Rollback

How to undo if something goes wrong.
`;
}

/**
 * Template for background knowledge (model only, no side effects).
 */
export function knowledgeSkillTemplate(name, description) {
	return `---
name: ${name}
description: ${description}
user-invocable: false
model-invocable: true
side-effects: none
permission-profile: restricted
triggers:
  - "*"
---

# ${name}

## Context

Background information the model should know.

## Rules

1. Rule one
2. Rule two

## Anti-Patterns

- Don't do X
- Don't do Y
`;
}

/**
 * Template for review/verification skills.
 */
export function reviewSkillTemplate(name, description) {
	return `---
name: ${name}
description: ${description}
user-invocable: true
model-invocable: true
side-effects: review-comments
permission-profile: restricted
triggers:
  - review
  - verify
---

# ${name}

## Checklist

- [ ] Item A
- [ ] Item B
- [ ] Item C

## Common Issues

1. Issue one
2. Issue two
`;
}
