---
name: skill-authoring
description: Create, revise, or import an agent skill in the open Agent Skills format (a folder with a SKILL.md plus optional scripts, references, and assets) so it triggers reliably and works across Claude Code, Claude.ai, Codex, and other compatible agents. Use when the user says "make this a skill", "write a skill for", "turn this workflow into a skill", "why isn't my skill triggering", "clean up this skill before I share it", or wants to publish skills publicly. Covers frontmatter rules, trigger-oriented descriptions, progressive disclosure, testing with realistic prompts, and a secret and privacy scan before publishing. It does not design the underlying business process; use workflow-designer for that first.
license: MIT
metadata:
  title: Skill Authoring
  summary: Write portable SKILL.md files that trigger on the right requests, stay short, and are safe to publish.
  category: agent-ops
  tags: [skills, agents, prompts, documentation]
  version: "1.0.0"
  author: Austin Christensen
  publisher: Christensen Equity
  related: [workflow-designer, secrets-hygiene, agent-task-brief, sop-writer]
---

# Skill Authoring

A skill is a folder of instructions an agent loads only when a request matches it. The description decides when it loads; the body decides whether the work comes out right. Write both for an agent that has never met the user.

## When to use

- The user repeats the same instructions across sessions and wants them captured.
- An existing skill triggers too often, too rarely, or produces inconsistent work.
- A private skill needs cleaning up before it is shared or published.

## Skill shape

```text
<skill-name>/
  SKILL.md        # required: frontmatter + core workflow
  scripts/        # optional: deterministic helpers the agent runs
  references/     # optional: bulky detail loaded only when needed
  assets/         # optional: templates, images, static files
```

Frontmatter rules:

- `name`: lowercase letters, digits, and single hyphens; at most 64 characters; must match the folder name.
- `description`: at most 1024 characters. Say what the skill does, when to use it (including the phrases users actually type), and where its boundaries are. Write in the third person.
- Optional: `license`, `allowed-tools`, `compatibility`, and a `metadata` map for anything else. Keep other custom keys under `metadata` so strict validators accept the file.

## Workflow

1. **Check for an existing skill** that covers the job. Revising beats duplicating.
2. **Collect three to five real example requests** the skill should handle, and two it should not. These drive the description and the tests.
3. **Write the description first.** Lead with the task, list trigger phrases, then state boundaries ("not for X; use Y"). If two skills could match the same request, sharpen both descriptions.
4. **Write the body** in this order:
   - Purpose (two or three sentences)
   - When to use
   - Inputs
   - Workflow (numbered, with decision points)
   - Output (exact format or template)
   - Guardrails (approvals, privacy, safety, what never to do)
5. **Keep it short by default.** Put only what the agent needs on every run in `SKILL.md`. Move long reference tables, API details, and examples into `references/` and say exactly when to read each file. That is progressive disclosure: the agent pays for detail only when it needs it.
6. **Add scripts only where determinism wins** (parsing, API calls, file transforms). Keep them small, non-interactive, and free of hardcoded paths and credentials. Document their inputs and outputs in the body.
7. **Make it portable.** Describe actions tool-neutrally ("search the web", "read the file") and put agent-specific notes in a short final section if they are needed at all.
8. **Test with realistic prompts.** In a fresh session, run each example request and each should-not request. Check that the skill loads when it should, stays out when it should not, and that the output matches the contract. Fix the description for trigger problems and the body for quality problems.
9. **Scan before sharing** (see Guardrails). Search the folder for secrets, personal names, emails, phone numbers, private paths, internal hostnames, and client details.
10. **Version it.** Bump a version in `metadata` on meaningful changes and note what changed.

## Revising a skill

Read the current file and only the references the change touches. Keep the edit scoped; rewrite the whole skill only if the structure is the problem. Re-run the trigger tests and the scan afterward.

## Importing a skill from elsewhere

Copy it into its own folder, delete runtime artifacts (virtualenvs, `node_modules`, caches, logs, local state, `.env` files), rewrite machine-specific paths, keep environment variable names but never their values, then test and scan as above.

## Output

- A skill folder that passes the frontmatter rules above.
- A short note listing the test prompts used, which triggered correctly, and anything left uncertain.

## Quality bar

Good skills are triggerable, short, portable, operational (exact commands where precision matters), explicit about approvals, and verifiable. Avoid background essays, generic advice the model already knows, personal context unrelated to the task, and copies of the same workflow in several places.

## Guardrails

- Never put credentials, tokens, or private keys in a skill, its scripts, or its examples. Reference environment variable names only. A quick check before publishing:
  `git grep -nIiE "(api[_-]?key|secret|token|password|bearer|private[_-]?key)" -- <skill-folder>`
- Remove personal data (names of family or clients, contact details, home paths, account IDs) before a skill leaves the user's machine.
- Do not claim a skill was tested unless the test prompts were actually run.
- Do not copy third-party copyrighted text into a skill; describe frameworks in your own words and credit the source.
