# New Skill

Scaffold a new skill that follows this repo's conventions, interviews for purpose...

- Repository: https://github.com/pedrohcgs/claude-code-my-workflow (1676 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-09-27
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add pedrohcgs/claude-code-my-workflow --skill new-skill -g -a claude-code -y`
Codex: `npx skills add pedrohcgs/claude-code-my-workflow --skill new-skill -g -a codex -y`
Cursor: `npx skills add pedrohcgs/claude-code-my-workflow --skill new-skill -g -a cursor -y`
Gemini CLI: `npx skills add pedrohcgs/claude-code-my-workflow --skill new-skill -g -a gemini-cli -y`

## Description

Scaffold a new skill that follows this repo's conventions, interviews for purpose, trigger phrases, and tool needs, then writes `.claude/skills/<name>/SKILL.md` from the skill template with frontmatter and body that pass the integrity gates on first try. Use when user says "write a skill", "scaffold a skill", "create a new skill", "I keep doing X, make it a skill", "new slash command", or "turn this workflow into a skill". NOT for capturing a one-off session discovery, that is `/learn`.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# /new-skill, Author a Convention-Compliant Skill

Scaffold a new skill the way this template's gold-standard skills are written: a **deep module behind a simple interface** (Ousterhout, *A Philosophy of Software Design*, "deep modules": a small surface that hides substantial implementation). The user supplies a fuzzy intent; this skill interviews it into a tight spec, then writes `.claude/skills/<name>/SKILL.md` with frontmatter and body that are mutually consistent, so `check-skill-integrity.py` and `check-surface-sync.sh` pass without a second pass.

Adapted from the *write-a-skill* pattern in [mattpocock/skills](https://github.com/mattpocock/skills), reshaped to this repo's frontmatter, section, and gate conventions.

## When to use

- You keep re-explaining the same 3+ step workflow to Claude and want it captured as a reusable slash command.
- You need a domain-specific check or output format (citation style, replication gate, a new review lens).
- You want a new skill that is consistent with the 40+ siblings in `.claude/skills/`, same sections, same cross-reference style, same gate-passing frontmatter.

**Use `/learn` instead** when you just discovered something non-obvious *this session* and want it preserved, `/learn` captures a discovery; `/new-skill` deliberately designs an interface. With `--from-learn`, this skill upgrades a `/learn`-shaped stub into a full convention-compliant skill.

## Phases

### Phase 0, Resolve the name and check for collisions

The rest: https://github.com/pedrohcgs/claude-code-my-workflow/blob/HEAD/.claude/skills/new-skill/SKILL.md
