Skip to content
Back to skills

Skill Creator

ASecurity

Use when creating a new Agent skill in this repository. Generates a SKILL.md that follows project conventions, passes skill-check validation, and updates the changelog and readme.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 26, 2026
ai-agentsgophpshellbashsqlgitsecurity

Works with

  • claude code

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add pekral/ai-olympus --skill skill-creator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Skill Creator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Skill Creator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pekral-skill-creator/badge)](https://www.skillsdirectory.com/skills/pekral-skill-creator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: skill-creator
description: "Use when creating a new Agent skill in this repository. Generates a SKILL.md that follows project conventions, passes skill-check validation, and updates the changelog and readme."
license: MIT
metadata:
  author: "Petr Král (pekral.cz)"
---

## Constraints
- Apply `@rules/php/core-standards.md` **only once it is established that the skill being created targets PHP code work in a PHP project** — skip it for a stack-agnostic or non-PHP skill; do not load the PHP standards when the new skill does not touch PHP.
- Apply `@rules/git/general.md`
- Output must be in English
- Do not modify other skills, rules, or production code
- Do not duplicate an existing skill — extend or refactor instead
- Never add behavior beyond what the requested skill needs
- Keep a skill role-neutral: it names no roster member, selects no specialist, and contains no
  dispatch or lifecycle-coordination protocol. A skill returns its bounded result to its caller.
  Put a user-facing lifecycle or specialist-selection change in `commands/`, whose shared support
  is a non-Markdown file below `commands/_shared/` so plugin discovery cannot expose it as a
  public command.

---

## Scope
Author a new Agent skill that fits this repository's conventions and ships ready for review.

Focus on:
- consistent frontmatter and section layout
- behavior aligned with `skill-check.config.json` limits
- clear Use when, Execution, and Done when sections
- no duplication with existing skills

---

## Use when
- A new Agent skill must be added to `skills/` for an AI agent workflow
- An existing workflow that lives only in chat history should be promoted to a reusable skill
- The user asks to "create a skill", "add a skill", or "scaffold a skill"

---

## Inputs the agent must collect
Before generating any file, gather:
- **Skill name** — kebab-case, ≤ 64 chars, unique under `skills/`
- **Purpose** — one sentence describing what the skill does
- **Trigger phrase** — the "Use when …" wording for the description
- **Scope** — read-only review, code change, refactor, delivery, or other
- **Required rules** — which `rules/**/*.md*` files the skill must apply
- **Integrations** — issue tracker, GitHub, MySQL, Telescope, etc. (or none)
- **Shell steps** — the deterministic shell steps the skill's workflow runs (or none)
- **Output expectations** — markdown report, code change, PR comment, etc.

If running interactively, confirm the inputs with the user. If running autonomously (e.g. invoked by `resolve-issue` or a scheduled workflow), take the inputs from the triggering issue / PR description, cite where each one came from, and list every input the source does not settle as not verified in the final summary.

---

## Execution

### 1. Discover existing skills
- List `skills/` and read any skill whose name overlaps semantically with the request.
- If an existing skill already covers the workflow, stop and propose an update to that skill instead of creating a new one.

### 2. Choose the slug and location
- Slug must be kebab-case, ≤ 64 chars, and not collide with an existing folder under `skills/`.
- Create `skills/<slug>/SKILL.md`. Add a subfolder only when the skill genuinely needs one — see the layout below.

**Directory layout (Anthropic's recommended structure).** A skill is a directory whose entrypoint is `SKILL.md`; every other file is optional and exists so `SKILL.md` stays the overview rather than the whole payload ([skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices), [Claude Code skills](https://code.claude.com/docs/en/skills)):

```text
<slug>/
├── SKILL.md          # required — instructions and navigation
├── references/       # detailed material Claude reads on demand
├── scripts/          # utilities Claude executes, never loads into context
└── templates/        # output shapes and examples Claude fills in
```

The rules that make the split work, each one load-bearing:

- **Progressive disclosure.** Keep the `SKILL.md` body under 500 lines (this repo's `skill-check.config.json` enforces the same limit) and move detail into a sibling file rather than growing the body. A referenced file costs nothing until it is read.
- **References stay one level deep.** Every supporting file links directly from `SKILL.md`. A file that is only reachable through another file gets partially read (`head -100`) instead of read whole.
- **Say whether a script is executed or read.** *"Run `skills/<slug>/scripts/validate.sh`"* and *"see `skills/<slug>/scripts/validate.sh` for the algorithm"* are different instructions; execution is the default because it is cheaper and more reliable than regenerating the logic.
- **Ship the scripts the workflow needs.** For each shell step collected above, reuse a `skills/_shared/*.sh` helper or a script of another skill first. Write `skills/<slug>/scripts/<name>.sh` only for a step that is deterministic and is multi-command, parsed by the agent, or repeated. A single short command stays inline in `SKILL.md`. The script is executable (git mode `100755`) and starts with `#!/usr/bin/env bash`, a header comment that states its purpose and usage, and `set -euo pipefail`, as in `<skills>/_shared/assert-current-repo.sh`. Add a test that runs it under `tests/Contract/**` or `tests/Installer/**`, as `tests/Contract/Shared/ReadManifestUnreadableTest.php` does for `<commands>/_shared/read-manifest.sh`.
- **Reference a script by its repository path.** Write `skills/<slug>/scripts/<name>.sh` and say that it is executed. The installer copies `skills/**` to `.claude/skills/` and `.agents/skills/`, and `AGENTS.md` maps the bare path to `.agents/skills/` on Codex, so one form works on both platforms.
- **Name files for their content and forward-slash every path.** `references/finance.md`, never `docs/file2.md`; `scripts/helper.sh`, never `scripts\helper.sh`.
- **A reference file over 100 lines opens with a table of contents**, so a partial read still shows the full scope.

Keep the folder names above rather than inventing synonyms — `references/`, `scripts/`, `templates/` are what the existing skills in this repo already use, and a consistent tree is what makes a skill portable to another Agent Skills host.

### 3. Write the frontmatter
Required keys:

```yaml
---
name: <slug>
description: "Use when <trigger phrase>. <one sentence on scope>."
license: MIT
metadata:
  author: "Petr Král (pekral.cz)"
---
```

Rules from `skill-check.config.json`:
- `description`: 50–1024 chars; should start with "Use when"
- `name`: ≤ 64 chars
- Body: ≤ 500 lines and ≤ 5000 tokens

Portability rules from the Agent Skills spec — a skill that breaks one of these stops loading on another host even though `skill-check` passes:
- `name`: lowercase letters, numbers, and hyphens only; no XML tags; never the reserved words `anthropic` or `claude`. It must match the directory name, which is what the `/<slug>` invocation resolves from.
- `description`: non-empty, ≤ 1024 chars, no XML tags, written in the **third person** ("Resolves…", never "I can help you…"). It is injected into the system prompt and is the only thing a host sees before deciding to load the skill, so it states both *what the skill does* and *when to use it*. The repo's "Use when …" opening satisfies the *when* half — keep the *what* in the same sentence.

### 4. Compose the body
Use Layout A for a new skill. Layout B appears in some existing skills; keep it only when editing such a skill.

**Layout A — Constraints-first:**

1. `## Constraints` — applied rules and hard limits (one bullet per item)
2. `## Scope` *(optional)* — what the skill covers, what it deliberately leaves to another skill, and the focus areas it works through. Write it only when the skill carries scope the `description:` field does not already state; never restate the frontmatter here.
3. `## Use when` — concrete triggers
4. `## Required approach` or `## Execution` — numbered steps the agent must follow
5. `## Output` or `## Output Format` — structure of what the skill returns
6. `## Done when` — verifiable completion criteria

Examples in the repo: `refactor-entry-point-to-action`, `smartest-project-addition`, `test-driven-development`, `tester-cookbook`, `security-review`.

**Layout B — Title + Purpose (existing skills):**

1. `# <Title Case Name>`
2. `## Purpose` — one short paragraph plus a bullet list of focus areas
3. `## Constraints`
4. `## Execution`
5. `## Output` or `## Output Format`
6. `## Principles` — short guiding rules (optional)
7. `## Done when`

Layout B is documented only so a skill imported from elsewhere in this shape is still recognized; never pick it for a new skill.

Omit a section only when it does not apply.

### 5. Reference rules and other skills
- Reference rule files as `@rules/<area>/<file>.md` exactly as they exist on disk.
- Reference other skills as `@skills/<slug>/SKILL.md`.
- Never invent paths. Verify every reference, script paths included, points to a real file before saving.

### 6. Keep behavior minimal
- One skill, one workflow. Split into separate skills if the scope grows.
- Do not paste rule content into the skill — link to it.
- Do not add humanizer, marketing, or third-party links unless the user requests them.

### 7. Prune the draft
Read the finished SKILL.md once more, sentence by sentence, before the quality gates. Write it in the style of `@rules/writing/general.md`.
- **No-ops.** Delete every sentence that does not change what the agent does compared to its default behavior. A sentence that restates the frontmatter, a rule the agent already follows, or a general good practice is a no-op.
- **Negations.** State each instruction as the target behavior: *"Keep each skill narrow"*, not *"Do not let a skill grow"*. Keep a `never` / `do not` form only for a hard safety guard, such as a security boundary or a merge gate.
- **Completion criteria.** End every numbered step with a check that the agent can observe, such as a file that exists, a command that exits `0`, or a count that matches. Rewrite a step that ends with "make sure it is good" until it names that check.

The step is done when the summary lists every sentence the step deleted or rewrote, and names the safety guard behind every `never` / `do not` it kept.

---

## Quality Gates
Run before declaring the skill done:
- `composer skill-check` — must report `PASS` with no warnings on the new file
- If `skill-check` flags an auto-fixable warning, run `npx skill-check check skills/<slug> --fix --no-security-scan` (path-scoped) instead of `composer skill-check-fix`, which rewrites every skill in the tree and can pollute the diff with unrelated formatting changes
- The full build is **not** run here — the project's gate runs once at the end of the work (`@skills/resolve-issue/references/quality-gates.md` *Gate placement — deferred to the merge boundary*), and `composer skill-check` above is a diff-scoped check, not that gate

Do not silence checks; fix the SKILL.md content until the report is clean.

---

## Repository updates
After the new SKILL.md passes validation:
- Add a `CHANGELOG.md` entry under `[Unreleased]` describing the new skill and referencing the issue (e.g. `(#432)`).
- Update `README.md`:
  - bump the skill count in the "Why This Package" bullet

Skip the README update only when the skill is intentionally internal and not part of the public catalog — state this explicitly in the PR description.

---

## Output

- New file: `skills/<slug>/SKILL.md`
- New files, when the skill ships a script: `skills/<slug>/scripts/<name>.sh` and its test
- Updated `CHANGELOG.md` and `README.md`
- Short summary covering:
  - chosen slug and scope
  - rules and skills referenced
  - skill-check result
  - follow-up tasks (e.g. tests for code that the skill orchestrates) if any

---

## Principles

- Reuse existing skills before adding new ones
- Keep each skill narrow and composable
- Prefer explicit steps over vague guidance
- Verify every `@rules/*` and `@skills/*` reference exists
- Let `skill-check` be the source of truth for SKILL.md quality

---

## Done when
- `skills/<slug>/SKILL.md` exists with valid frontmatter and required sections
- Each script the skill ships is executable, is referenced by its `skills/<slug>/scripts/<name>.sh` path, and has a passing test (or the skill ships no script)
- The summary lists the sentences the pruning step deleted or rewrote, and the guard behind every kept `never` / `do not`
- `composer skill-check` passes with no warnings on the new file
- `CHANGELOG.md` and `README.md` reflect the new skill (or the omission is justified)
- The summary lists the slug, references, and validation result

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.