skills/create-skill/SKILL.md
Create a new Claude Code skill with proper SKILL.md structure, frontmatter, and best practices. Use when user wants to create, write, build, or add a new skill.
npx skillsauth add RonanCodes/ronan-skills create-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guide the user through creating a well-structured Claude Code skill.
Gather requirements — ask the user:
.claude/skills/, personal ~/.claude/skills/)Create the skill directory and SKILL.md following the structure below.
Review with user — present the draft, ask if anything is missing or unclear.
skill-name/
├── SKILL.md # Main instructions (required, under 100 lines ideally)
├── reference.md # Detailed docs (if SKILL.md would exceed 100 lines)
├── examples.md # Usage examples (if helpful)
└── scripts/ # Utility scripts (if deterministic operations needed)
└── helper.sh
---
name: skill-name
description: What the skill does in one sentence. Use when [specific trigger phrases and contexts].
argument-hint: [expected-arguments] # optional
user-invocable: false # set false for background knowledge only
allowed-tools: Bash(git *) Read # optional, pre-approve specific tools
context: fork # optional, run in isolated subagent
agent: Explore # optional, which subagent type
---
# Skill Name
Brief description of what this does.
## Usage
\`\`\`
/skill-name <arguments>
\`\`\`
## Steps
1. First step
2. Second step
3. Third step
The description is the only thing Claude sees when deciding which skill to load. It's critical.
Good: "Extract transcript from YouTube videos as clean text. Use when user shares a youtube.com link and wants the content transcribed or summarized."
Bad: "Helps with YouTube videos."
| Field | When to use |
|-------|------------|
| name | Always. Lowercase, hyphens, max 64 chars. |
| description | Always. This is how Claude finds the skill. |
| argument-hint | When the skill takes arguments. Shows in autocomplete. |
| user-invocable | false for background knowledge Claude should auto-apply. |
| allowed-tools | Pre-approve tools to avoid permission prompts. |
| context | fork to run in isolated subagent (no conversation history). |
| agent | Which subagent to use with context: fork. |
disable-model-invocationSkip this field entirely. It exists to prevent the model from auto-invoking a skill, but in practice that just makes the model fall back to bash one-liners and miss the skill's value. If you don't trust a skill's auto-invocation, the answer is to make the description more precise (clearer triggers, sharper "use when" phrasing), not to gate it. For genuinely destructive operations, rely on the harness permission system + allowed-tools scoping, not on blocking model invocation.
Inject live data with !`command` syntax (runs before Claude sees the content):
## Current state
- Branch: !`git branch --show-current`
- Status: !`git status --short`
Scripts save tokens and improve reliability vs Claude generating code each time.
If a skill's script needs API tokens or other secrets, the location depends on whether the skill lives in a plugin or a standalone repo. Use the right pattern for the shape.
.claude/skills/)One .env at the repo root, gitignored, with .env.example committed. All skills in the repo share it. Mirrors Laravel/Next.js convention.
repo/
├── .env # gitignored, user's secrets
├── .env.example # committed template
├── .gitignore # contains `.env`
└── .claude/skills/<name>/
├── SKILL.md
└── scripts/helper.sh # sources `../../../.env`
Inside the script:
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
source "$SCRIPT_DIR/../../../.env" # walk up: scripts/ → skill/ → skills/ → .claude/ → repo root
.claude-plugin/plugin.json)Use ${CLAUDE_PLUGIN_DATA}/.env — Claude Code's documented persistent plugin-data directory. Survives plugin updates and is auto-cleaned on uninstall. For Cursor or dev mode (where the var isn't set), fall back to the explicit path.
plugin-repo/
├── .claude-plugin/plugin.json
├── .env.example # committed template with setup instructions
└── skills/<name>/scripts/helper.sh # sources $CLAUDE_PLUGIN_DATA/.env
Inside the script:
#!/usr/bin/env bash
set -euo pipefail
# One-liner: CLAUDE_PLUGIN_DATA when set by Claude Code; explicit fallback otherwise
ENV_FILE="${CLAUDE_PLUGIN_DATA:-$HOME/.claude/plugins/data/<plugin-id>}/.env"
if [ ! -f "$ENV_FILE" ]; then
echo "ERROR: credentials not found at $ENV_FILE" >&2
exit 1
fi
# shellcheck disable=SC1090
source "$ENV_FILE"
Where <plugin-id> is the plugin's canonical id (name@marketplace-name with non-alphanumerics replaced by -).
../../../.env works reliably.~/.claude/plugins/cache/... on install → relative paths break. ${CLAUDE_PLUGIN_DATA} is the documented escape hatch..env (add to .gitignore; *.env pattern is a good default).env.example with placeholder values as documentationchmod 600 the real .env after creating it.env per skill (rotation nightmare)Before saving, verify:
disable-model-invocation is NOT set (never use this flag).env for standalone, ${CLAUDE_PLUGIN_DATA}/.env for plugin) — see "Environment Variables" sectiondevelopment
--- name: worktree description: Coordinate multiple agents on one repo via a worktree-lock pool, so two agents never clobber each other's working tree. Acquire the first free slot (main, then beta/gamma… worktrees, created on demand), work there on your own branch, release when you've pushed. Use before modifying any repo that might be in use by another agent (factory, dataforce, etc.), or whenever you're told a repo is being worked on. Backed by `ro worktree`. category: development argument-hin
testing
--- name: ship description: Ship a feature branch the local-CI-first way — run the full local gate, push, open a PR, squash-merge, then deploy, without waiting on GitHub Actions. Use when a branch is ready for main and you want it merged and deployed now. Reads CI policy from `ro ci` (default skips remote CI because GitHub Actions billing keeps hitting limits). Sibling to /ro:gh-ship (waits on GitHub checks) and /ro:cf-ship (the deploy half). Triggers on "ship it", "ship this", "merge and deploy
testing
--- name: setup-logging description: Set up (or audit) the observability stack in a TanStack Start + Cloudflare Workers app so it is "diagnosable by default" — structured logging (logtape) with a request context carrying trace_id + userId + tenant/orgId, a trace_id propagated FE→BE→logs→Sentry→PostHog, Cloudflare Workers observability enabled, and Sentry + PostHog wired. Two modes: `setup` (wire it into an app) and `audit` (check an existing app + report gaps). Use when scaffolding a new app, wh
development
Manage credentials INSIDE the active ~/.claude/.env file — read which token/account to use for a given app (Simplicity vs Dataforce vs Ronan-personal), add or update a secret WITHOUT it passing through the chat (an interactive Terminal window prompts for it), and track secrets that were exposed in a transcript so they get rotated. Sibling to /ro:context (which switches WHICH env file is active). Use when the user wants to add an API key/token/secret, asks "which credential do I use for X", needs the env organized/labelled, or a secret was pasted into the chat and should be rotated.