Skip to content

Creating Skills

Learn how to build custom Claude Code skills for the RQF-ML system.

Quick Start

Use the /skill-create meta-skill:

/skill-create my-skill "Description of what it does"

Or create manually:

mkdir -p .claude/skills/my-skill
# Create SKILL.md with frontmatter and instructions

Skill Structure

Minimal (Single File)

.claude/skills/my-skill/
└── SKILL.md

Standard (With Templates)

.claude/skills/my-skill/
├── SKILL.md
└── templates/
    └── output.md

Complex (Full Suite)

.claude/skills/my-skill/
├── SKILL.md
├── templates/
│   ├── report.md
│   └── checklist.md
├── examples/
│   └── example_usage.md
└── scripts/
    └── helper.py

SKILL.md Format

---
name: my-skill
description: "USE FOR: X when Y. NOT FOR: Z"
disable-model-invocation: true  # Manual only
argument-hint: [file] [--flag]
allowed-tools: Read, Grep, Glob, Write
---

# My Skill

One sentence describing what this skill does.

## Usage
/my-skill example-arg /my-skill another-example --flag
## Arguments
| Arg | Required | Description |
|-----|----------|-------------|
| `$0` | Yes | First argument |
| `--flag` | No | Optional flag |

## Workflow

### Step 1: Do Something
Instructions for step 1.

**Check:** How to verify this step.

### Step 2: Do More
Instructions for step 2.

## Output
- **Location:** Where results go
- **Format:** What format

## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| Error 1 | Why | How to fix |

Frontmatter Reference

Required

Field Description
name Skill name (lowercase-with-hyphens)
Field Description
description When to use (Claude reads this)
argument-hint Autocomplete hint

Optional

Field Values Description
disable-model-invocation true Manual trigger only
user-invocable false Hide from / menu
allowed-tools Read, Grep, Write, Bash(*) Restrict tools
context fork Isolated subagent
agent Explore, Plan Subagent type
model sonnet, opus Force model

Skill Types

Action Skill (Side Effects)

---
name: deploy
description: "USE FOR: Deploying to production"
disable-model-invocation: true  # IMPORTANT!
allowed-tools: Read, Grep, Bash(*)
---

Analysis Skill (Read-Only)

---
name: analyze-code
description: "USE FOR: Code analysis when asked"
allowed-tools: Read, Grep, Glob
---

Generator Skill (Creates Files)

---
name: generate-report
description: "USE FOR: Creating reports"
allowed-tools: Read, Grep, Glob, Write
---

Research Skill (Isolated)

---
name: deep-research
description: "USE FOR: Deep codebase exploration"
context: fork
agent: Explore
---

Reference Skill (Background)

---
name: coding-standards
description: "Reference for coding standards"
user-invocable: false  # Claude uses internally
---

Arguments

Basic Substitution

---
argument-hint: [filename]
---

Analyze the file at $ARGUMENTS

Individual Arguments

---
argument-hint: [source] [target]
---

Copy from $0 to $1

Dynamic Context

---
name: pr-review
---

## PR Context
- Diff: !`gh pr diff`
- Comments: !`gh pr view --comments`

Review the above...

Quality Checklist

Before deploying a skill:

  • Description starts with "USE FOR:"
  • Includes "NOT FOR:" anti-patterns
  • Every step has verification
  • Error handling for top 3 failures
  • At least 2 usage examples
  • Tool restrictions are minimal
  • No assumed knowledge

Quality Scoring

Category Points Criteria
Clarity /15 Purpose obvious?
Completeness /15 All steps covered?
Usability /15 Easy to follow?
Safety /15 Side effects controlled?
Edge Cases /10 Failures handled?
Examples /10 Examples helpful?
Discoverability /10 Claude knows when to use?
Maintainability /10 Easy to update?

Grades:

  • 90-100: Production ready
  • 70-89: Good, minor improvements
  • 50-69: Needs work
  • <50: Major revision needed

Examples

Example 1: Data Refresh Skill

---
name: data-refresh
description: "USE FOR: Refreshing market data from FirstRate"
disable-model-invocation: true
argument-hint: [symbol]
allowed-tools: Read, Write, Bash(python *)
---

# Data Refresh

Fetch latest market data and validate quality.

## Usage
/data-refresh MNQ /data-refresh MNQ --start 2024-01-01
## Workflow

### Step 1: Fetch Data
```bash
python scripts/fetch_data.py --symbol $0

Step 2: Validate

python scripts/validate_data.py data/raw/$0_*.csv

Step 3: Archive

Move validated data to data/processed/

Output

  • data/raw/$0_[date].csv
  • data/processed/$0_validated.csv
    ### Example 2: Code Review Skill
    
    ```yaml
    ---
    name: review-pine
    description: "USE FOR: Reviewing Pine changes before commit"
    allowed-tools: Read, Grep, Glob
    ---
    
    # Pine Code Review
    
    Review PineScript changes for quality and compliance.
    
    ## Checklist
    
    ### Non-Repaint
    - [ ] All signals use `barstate.isconfirmed`
    - [ ] No `request.security` with lookahead
    - [ ] No `barstate.isrealtime` for signals
    
    ### State Machine
    - [ ] All transitions defined
    - [ ] Timeout handling present
    - [ ] Reset conditions clear
    
    ### Memory
    - [ ] Array cleanup exists
    - [ ] Drawing limits respected
    

Testing Skills

  1. Manual Test: /my-skill test-args
  2. Edge Cases: Test with invalid input
  3. Auto-Invocation: Verify Claude triggers appropriately

Debugging

# Check skill is loaded
/skills-list

# Verify file exists
ls -la .claude/skills/my-skill/SKILL.md

# Check frontmatter syntax
cat .claude/skills/my-skill/SKILL.md | head -20