# Templates

> Skill Template

- Skill: `danielscholl/templates` (Agent Skill, multi-file: 6 files)
- Install (CLI): `npx skillmds@latest add danielscholl/templates`
- Raw SKILL.md: https://api.skillmd.com/api/skills/danielscholl/templates/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: danielscholl (https://skillmd.com/u/danielscholl)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/danielscholl/templates

---

# Skill Template

Copy to: `.github/skills/{skill-name}/SKILL.md`

---

```yaml
---
name: {skill-name}
description: {Brief description of what this skill does and when to use it}
license: MIT
---
```

# {Skill Display Name}

{One-paragraph description of the skill's purpose and capabilities.}

## When to Use This Skill

Use this skill when you need to:
- {Use case 1}
- {Use case 2}
- {Use case 3}

Do NOT use this skill for:
- {Anti-use case 1}
- {Anti-use case 2}

## Prerequisites

Before using this skill, ensure:
- {Prerequisite 1}
- {Prerequisite 2}

```bash
# Verify prerequisites
{verification commands}
```

## Core Workflow

### Step 1: {First Step Name}
{Description of the first step}

### Step 2: {Second Step Name}
{Description of the second step}

### Step 3: {Third Step Name}
{Description of the third step}

## Commands and Tools

### {Tool/Command Name}
```bash
{command or code}
```
{Description of what this does}

## Output Format

{Describe the expected output format}

## Examples

### Example 1: {Simple Use Case}
```
{Example input}
```
Result: {Expected output}

### Example 2: {Complex Use Case}
```
{Example input}
```
Result: {Expected output}

## Resources

- `examples/` - Reference implementations
- `scripts/` - Helper scripts
- `templates/` - Code templates

## Troubleshooting

### Common Issue 1
**Symptom:** {What the user sees}
**Cause:** {Why it happens}
**Solution:** {How to fix it}

### Common Issue 2
**Symptom:** {What the user sees}
**Cause:** {Why it happens}
**Solution:** {How to fix it}

## Related Skills

| Task | Skill | Description |
|------|-------|-------------|
| {Related task 1} | `{skill-name}` | {Brief description} |
| {Related task 2} | `{skill-name}` | {Brief description} |

---

## Directory Structure Template

```
.github/skills/{skill-name}/
├── SKILL.md              # Main skill file (this file)
├── examples/             # Reference implementations
│   ├── basic/
│   │   └── example.ts
│   └── advanced/
│       └── example.ts
├── scripts/              # Helper scripts
│   ├── setup.sh
│   └── validate.py
├── templates/            # Code templates
│   ├── component.template
│   └── test.template
└── reference/            # Additional documentation
    ├── api.md
    └── troubleshooting.md
```

## Example Skills

### API Generator Skill
```yaml
---
name: api-generator
description: Generates REST API endpoints with validation and documentation
license: MIT
---

# API Generator

Generates REST API endpoints following project conventions.

## When to Use
- Creating new API endpoints
- Adding CRUD operations
- Generating OpenAPI documentation

## Workflow
1. Analyze existing API patterns
2. Generate endpoint code with validation
3. Create corresponding tests
4. Update OpenAPI spec

## Tools
### Generate Endpoint
\`\`\`bash
./scripts/generate-endpoint.sh --name users --method GET,POST,PUT,DELETE
\`\`\`

## Examples
See `examples/user-api/` for a complete implementation.
```

### Test Generator Skill
```yaml
---
name: test-generator
description: Generates comprehensive test suites following project patterns
license: MIT
---

# Test Generator

Creates unit and integration tests following project conventions.

## When to Use
- Adding tests for new code
- Improving test coverage
- Creating test fixtures

## Workflow
1. Analyze code to be tested
2. Identify test cases and edge cases
3. Generate test files
4. Create test fixtures if needed

## Output
Tests are created in the appropriate test directory following project patterns.
```

### Migration Skill
```yaml
---
name: migration-helper
description: Assists with codebase migrations and upgrades
license: MIT
---

# Migration Helper

Guides through codebase migrations and major upgrades.

## When to Use
- Framework version upgrades
- Dependency major version bumps
- API deprecation migrations

## Workflow
1. Analyze current state
2. Identify breaking changes
3. Create migration plan
4. Execute step-by-step changes
5. Validate functionality

## Resources
- `reference/breaking-changes.md` - Known breaking changes
- `scripts/migrate.py` - Automated migration helper
```

