home / skills / trentshaines / dotfiles / trent-claude-skills

trent-claude-skills skill

/dot_claude/skills/trent-claude-skills

This skill helps you create and manage Claude Code skills, including frontmatter, structure, and triggers for invocation.

npx playbooks add skill trentshaines/dotfiles --skill trent-claude-skills

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
4.4 KB
---
name: trent-claude-skills
description: Help with creating and managing Claude Code skills. Use when the user asks about creating skills, skill structure, or customizing Claude Code behavior.
---

# Claude Code Skills

## Overview

Skills are custom prompts that extend Claude Code's capabilities for specific tools, configurations, or workflows. They're project-specific or user-specific context that Claude can invoke when relevant.

## Skill Location

**User skills**: `~/.claude/skills/<skill-name>/SKILL.md`

Each skill is a directory containing a `SKILL.md` file.

## Skill Structure

```markdown
---
name: skill-name
description: Brief description of when to use this skill. Claude uses this to decide when to invoke the skill.
---

# Skill Title

## Overview
Brief explanation of what this skill helps with.

## Configuration Locations
Paths to relevant config files, if applicable.

## Key Concepts
Important information Claude should know.

## When Helping Users
Guidelines for how to approach tasks with this skill.

## Common Tasks
Examples of what users might ask for.

## Best Practices
Tips and recommendations.

## Troubleshooting
Common issues and solutions.
```

## Frontmatter Requirements

The YAML frontmatter at the top is critical:

```yaml
---
name: skill-name          # Must match directory name
description: When to use this skill. Be specific about triggers like "when user asks about X, Y, or Z"
---
```

The `description` field should:
- Be clear and specific
- Mention key terms that would trigger the skill
- Explain the scope (e.g., "configuration", "debugging", "setup")

## Creating a New Skill

1. **Create directory**:
   ```bash
   mkdir -p ~/.claude/skills/my-skill
   ```

2. **Create SKILL.md**:
   ```bash
   nvim ~/.claude/skills/my-skill/SKILL.md
   ```

3. **Add frontmatter and content**:
   - Start with YAML frontmatter
   - Include relevant paths, commands, and context
   - Reference official documentation when applicable
   - Add examples and common patterns

4. **Test the skill**:
   - Restart Claude or start a new conversation
   - Ask questions that should trigger the skill
   - Verify Claude has the right context

## Skill Examples

### aerospace skill
- **Purpose**: Help with AeroSpace window manager config
- **Includes**: Config locations, documentation links, TOML format help
- **Triggers**: "AeroSpace", "window management", "tiling"

### lazyvim skill
- **Purpose**: Help with LazyVim/Neovim configuration
- **Includes**: Plugin management, keybindings, LSP setup
- **Triggers**: "LazyVim", "Neovim", "plugins", "editor"

### tmux skill
- **Purpose**: Help with tmux/tmuxinator/sesh setup
- **Includes**: Template structure, session management, layouts
- **Triggers**: "tmux", "tmuxinator", "sessions", "terminal multiplexing"

## Best Practices

1. **Be specific in descriptions**: Help Claude know exactly when to use the skill
2. **Include file paths**: Direct paths make it easy to read/edit configs
3. **Reference documentation**: Link to official docs for authoritative info
4. **Add examples**: Show concrete examples of common patterns
5. **Keep it focused**: One skill per tool/domain
6. **Update regularly**: Keep skills current with your actual setup

## When to Create a Skill

Create a skill when:
- You have a complex tool configuration (e.g., tmux, vim, window manager)
- You want Claude to remember specific project patterns
- There are non-obvious conventions or workflows
- You frequently ask Claude about the same topic
- You have custom aliases, functions, or scripts

Don't create a skill for:
- Simple one-off tasks
- Standard tools without customization
- Information that's better in documentation

## Skill Scope

**Project skills** (if supported): Specific to a single project
**User skills**: Available across all Claude sessions for your user

User skills go in `~/.claude/skills/` and are always available.

## Invoking Skills

Claude automatically decides when to invoke skills based on:
- The skill's `description` field
- Keywords in the user's question
- Context of the conversation

You can also explicitly mention the tool/topic to trigger the skill.

## Debugging Skills

If a skill isn't being used:
1. Check the `description` field - is it specific enough?
2. Verify the YAML frontmatter is valid
3. Ensure `name:` matches the directory name
4. Try explicitly mentioning keywords from the description
5. Restart Claude or start a new conversation

Overview

This skill helps you create, structure, and troubleshoot Claude Code skills so Claude invokes the right project- or user-specific context. It explains required files, frontmatter rules, where to place skills, and how to test or debug them. Use it to make reproducible, focused skills that extend Claude's behavior for tools and workflows.

How this skill works

The skill inspects the expected skill directory layout and the YAML frontmatter that determines invocation. It validates that a SKILL.md exists under ~/.claude/skills/<skill-name>/, that name: matches the directory, and that description: includes clear trigger phrases. It also guides testing steps (restart/start new conversation) and common fixes when a skill is not triggered.

When to use it

  • You want Claude to remember project-specific patterns or config files
  • Creating a reusable helper for a tool (tmux, Neovim, window manager)
  • Documenting non-obvious workflows, aliases, or scripts for Claude to use
  • Improving Claude’s invocation accuracy for repeated tasks
  • Debugging why a skill is not being used in conversations

Best practices

  • Keep one focused skill per tool or domain to avoid overlap
  • Write precise YAML frontmatter with trigger keywords and scope (configuration, setup, debugging)
  • Include concrete file paths and example commands so Claude has actionable context
  • Add short Key Concepts and Common Tasks sections for quick matching
  • Reference official docs or examples and update the skill when configs change

Example use cases

  • Create a lazyvim skill that lists plugin locations, LSP setup, and common commands
  • Add a tmux skill with session templates, layout examples, and troubleshooting tips
  • Author a project skill that documents build steps, environment files, and CI quirks
  • Make a user-wide skill that records personal aliases, scripts, and preferences so Claude suggests them correctly
  • Troubleshoot why a skill isn’t invoked by checking frontmatter keywords and restarting Claude

FAQ

What must the frontmatter contain?

It must include name: that matches the directory name and description: with explicit trigger terms and scope. Both fields are required for correct invocation.

Where do user skills live?

Place user-wide skills under ~/.claude/skills/<skill-name>/SKILL.md so they are available across sessions for that user.

Why isn’t my skill being used?

Check YAML validity, ensure name matches the directory, make the description specific with keywords, and restart Claude or open a new conversation to reload skills.