This page is generated from skills/apex-new-skill/SKILL.md. Edit the source, not this page.
Add a skill or a class change to the APEX repo
Reader: an agent helping a contributor, in any agent harness (Claude Code, Kiro, Codex or another). Every step below is a shell command or a file edit; no step needs a harness-specific tool. Run commands from the repo root of the contributor's fork.
This skill covers the repo's obligations around a new skill or a class change. For the skill's content (what it teaches, how its description triggers), use skills/skill-creator/SKILL.md: it is vendored from anthropics/skills, so read it, follow it, never edit it.
Rules that apply to every step
| # | Rule | Why |
|---|---|---|
| 1 | Stage files by explicit path only: git add skills/<name>/SKILL.md, never git add -A or git add .. | Blanket staging sweeps unrelated files (local notes, reports, .skill packages) into a public pull request. |
| 2 | No internal or customer content: no customer names, account IDs, internal URLs, ticket numbers, credentials or private notes. | The repo is public (aws-samples), and a merged content skill ships to every install (see references/repo-checks.md). |
| 3 | description is at most 1024 characters, third person, says what the skill does, when to use it and when not to. No < or > in it. | misc/validate-frontmatter.py enforces the 1024 cap; skill-creator's quick_validate.py also rejects angle brackets. |
| 4 | Do not add a license: field to an in-house skill. | CONTRIBUTING.md, "Per-skill license: frontmatter": in-house skills "MUST NOT declare a license: field in their SKILL.md frontmatter"; the repo LICENSE (MIT-0) governs. |
| 5 | Never edit a vendored skill: a folder that holds UPSTREAM.md or .vendor-sha (today skill-creator and terraform-skill, among others). | The vendored-guard CI job fails a pull request that edits one outside a vendor sync, and the next sync overwrites local edits (.github/scripts/vendored-guard.sh). |
| 6 | Never hand-edit generated files (README marker blocks, the skills/README.md detail block, misc/website/docs/skills/**, skills.json, llms.txt). Run the generators. | The docs-sync CI job regenerates them and fails the pull request on any diff. |
| 7 | Read the repo's classes and generators from the files named in "Read the repo first", never from memory or from this skill. | The classes and the generator list change; this skill reads them each run so it stays right. |
Stop and ask the contributor before any push, and never push to main: CONTRIBUTING.md, "Releasing to npm", says main "takes changes only through pull requests".
Read the repo first
Before step 1, read these and keep what they say for the rest of the run:
- The classes. Each
classes/*/class.yaml: itsname, itsparents, and anychecks(each with astatus). A class lists no members: a skill joins a class through its own front matter,metadata.apex-classes, a space-separated list of class names. - The class tree.
docs/design/skill-design.md, section "The class tree", and the class table under "The classes": what each class is for. - The Steward class (
classes/steward/class.yaml):generators(eachrun, then eachcheck),hand_kept(files edited by hand, not generated) andadd_a_skill(the CONTRIBUTING.md steps this skill walks). - The README groups.
README_GROUPSinmisc/update-skills-references.sh: the headings a skill can be listed under.
A status: planned generator or check is not built yet: name it to the contributor as not run, and do not run it.
Mode
skills/<name>/SKILL.mddoes not exist: greenfield. Run every step.- It exists but has no
misc/evals/<name>/: retrofit. Skip step 3 and treat the existing skill as the spec; do not rewrite it unless the contributor asks. Skip step 1's classes question and write nometadata.apex-classes: an existing skill joins its classes later, in a pull request of its own. In step 5 a retrofit only re-runs the generators: itsSKILL_METAline and catalogue entries already exist. - The change is to a file under
classes/and adds no skill: class change. Run step 2's survey only for the class's members (if no skill declares the class yet, say so; where its class.yaml comment names intended members, survey those, else say none are named), then step 5's generators (no staging, no wrapper check) and steps 6 to 8; while the class sync's status isplanned, name it as not run. - Only an eval scaffold asked for: point at
cd misc/evals && make init-evals SKILL=<name>(misc/evals/README.md) and stop.
Say which mode applies in one line; in greenfield and retrofit modes, then ask the step 1 questions in a single turn.
Step 1: Scope
Ask for whatever the contributor has not already said:
- Name (
<name>): lowercase, hyphenated, at most 64 characters, equal to the folder name. CONTRIBUTING.md: "Prefix skill names with the target service (eks-,ecs-) for auto-grouping in docs and README. Non-service skills use a descriptive name without prefix." Content skills (for examplegraviton-migration) take no prefix; repo maintenance skills that create or update APEX skills keepapex-(apex-new-skill). A skill for an AWS service with no skills here yet needs maintainer changes: CONTRIBUTING.md says to open an issue first, so draft the issue's title and body, hand them to the contributor to open, and stop until a maintainer answers. - One-sentence scope: what it covers and for whom. This seeds
description. - Five prompts it should trigger on, phrased the way a real user types them.
- Kind: knowledge (reference material), solution (a guided procedure plus its knowledge), setup (one-time configuration) or discovery (reads live state, reports facts).
- Target service: EKS, ECS, another AWS service, or repo meta-tooling.
- Classes: offer only classes with a
classes/<name>/class.yaml; from those, offer the ones that fit the kind and the target service, each with its one-line purpose from the class table. Each class brings its parents; list them in the restate, not the front matter.
Restate the answers and the mode, and get a yes before writing files. Push back on a fuzzy scope ("a security skill"): a narrow scope gives a sharp description and a clean eval set.
Step 2: Survey sibling skills
Read the description of every skills/*/SKILL.md (front matter only: that is what triggering sees). List the skills a prompt for <name> could plausibly land on, one line of rationale each (a service-scoped knowledge skill typically has 1 to 3; a discovery or setup skill 0 to 2; a meta-skill for authoring, linting or cross-service work may have 0), and name any skill a reader might expect on the list but which is not a sibling. Zero siblings is a valid answer. Skip skill-creator, terraform-skill and the apex router: CONTRIBUTING.md, Creating a New Skill, step 5, excludes them.
The confirmed list drives the description's "when not" clause, the near-miss negatives in step 4 and the sibling-map updates.
Step 3: Write the skill (greenfield only)
Follow skills/skill-creator/SKILL.md (sections "Capture Intent" to "Writing Patterns") to draft. Lay it out as CONTRIBUTING.md's "Structure" block shows:
skills/<name>/
├── SKILL.md # required: front matter (name, description) + body
├── references/ # optional: detail loaded on demand