publish-github-skills-exercise
Prepare a GitHub Skills exercise for publication, contribution, or rollout. Use this when the user asks for release readiness, final checklist, README/marketplace copy, PR description, validation evid
SKILL.mdskills/publish-github-skills-exercise/SKILL.md
GitHubPublish GitHub Skills exercise
Use this skill for final release preparation after an exercise has been built and reviewed.
Publication workflow
- Confirm the repository communicates the exercise clearly.
- Confirm the learner flow has been validated from a fresh start.
- Confirm workflow permissions, triggers, and reset behavior are safe.
- Confirm exercise workflows are disabled by default so nothing runs until the learner starts.
- Confirm all images, links, snippets, and badges render correctly.
- Prepare release or contribution copy.
- Identify any remaining risks and the owner of each follow-up.
If publishing a repository is requested
[!IMPORTANT] Never publish or transfer without explicit authorization that names the target owner and repository.
Confirm which path applies before running anything:
- publish to a personal account,
- publish to an organization,
- transfer an existing repository from one organization to another.
Path A: publish to a personal account or organization
Confirm target owner/repository and whether a remote already exists. Propose the repository name approved in the outline's Exercise identity section (saved in
.github/exercise-outline.md) as the default, and the outline's target owner when it names one. A default is a proposal, not authorization: the user must still explicitly confirm the exact owner and repository. If they choose a different name, update the README Copy Exercise badge (template_name,name=skills-<repository name>) and the saved outline before pushing.Confirm the intended visibility explicitly. Ask the user whether the exercise should be public or private, and use the matching flag. Never default to public: a repository meant to be private is exposed the moment it is created, and flipping the flag afterwards does not undo that exposure.
Public is the common choice for GitHub Skills exercises, because private repositories consume Actions minutes. Surface that as a recommendation, not as a silent default.
If the target repository does not exist, confirm you have permission to create repositories in the target owner. For an organization, that is the
Create repositoriespermission, plus admin on the new repository to set the template flag. If it already exists, confirm admin access to change its Actions and template settings.If the target repository does not exist, create it with Actions disabled before any content exists, so nothing runs on first push. If it already exists, do not run
gh repo create; disable Actions before pushing, and do not change the existing repository's visibility unless the user explicitly asks for that change:# Run the create command only for a new repository. # VISIBILITY is --public or --private, exactly as the user confirmed above. gh repo create ORG/REPO VISIBILITY --description "Exercise: TITLE" gh api -X PUT repos/ORG/REPO/actions/permissions -F enabled=falsePush repository content.
Apply repository settings:
gh api -X PATCH repos/ORG/REPO -F is_template=true gh api -X PUT repos/ORG/REPO/topics -f names[]=skills-exerciseRe-enable Actions, then set the workflow enablement state:
gh api -X PUT repos/ORG/REPO/actions/permissions -F enabled=true gh workflow list --all --repo ORG/REPOVerify only the start workflow (
Step 0) is enabled. Disable every later step workflow; they are enabled by the preceding step as the learner progresses.Verify the README Copy Exercise badge uses the published
template_ownerandtemplate_name, and that itsvisibilityparameter matches the visibility the user confirmed.
Path B: transfer between organizations
Pre-checks before transferring:
- You are an owner or admin of the source repository and can create repositories in the destination org.
- No repository with the same name already exists in the destination org.
- Record the current workflow enablement state so you can restore it after transfer.
- Warn the user that the old
owner/repoURL will redirect, but forks, stars, and existing copies keep pointing at the redirect.
Transfer:
gh api -X POST repos/SOURCE_ORG/REPO/transfer -f new_owner=DEST_ORG gh repo view DEST_ORG/REPO --json name,owner,isTemplate,visibility
Post-transfer fixes, all of which are commonly missed:
- Update the README Copy Exercise badge
template_ownerandtemplate_nameto the new owner. This is the single most common breakage after a transfer. - Re-verify the template flag survived the transfer; re-apply with
gh api -X PATCH repos/DEST_ORG/REPO -F is_template=trueif needed. - Re-verify Actions are enabled and that only
Step 0is enabled. - Re-check any absolute links, badges, or
uses:references that name the old owner. - Re-check repository secrets, variables, and branch protection; these do not always carry over.
- Confirm the destination org's Actions policy allows the actions this exercise uses
(
actions/checkout,skills/exercise-toolkit,skills/action-keyphrase-checkerwhen used,GrantBirki/comment,peter-evans/find-comment).
Failure handling
If permissions block any step, report the exact failing command, the permission required, and the shortest manual recovery path. Do not retry destructive operations or work around a permission failure.
Release-readiness checklist
- README includes title, Welcome block, learner audience, prerequisites, duration, start path, and support path.
- The Copy Exercise badge uses the correct
template_ownerandtemplate_namefor the published location. - The published repository name matches the approved name in
.github/exercise-outline.md, or the outline and badge were updated together when the name changed. - Exercise steps match the stated objectives.
- Every step has a Theory block with real content and at least one Activity block.
- Copilot prompts and terminal commands in activities use the standard badge blocks.
- No placeholder text remains anywhere in
README.mdor.github/: not onlyreplace-me, but bare skeleton tokens (OWNER,REPO,ORG,TITLE,FEATURE) and bracketed slots such as[Step name]. - Step content and step workflows align by number; the final workflow is
N-last-step.ymland the review content is.github/steps/x-review.md. - Every
skills/exercise-toolkitreference uses the same pinned release tag. - Workflows use least-privilege permissions and have clear trigger behavior.
- The start workflow has a real first-run trigger, or the README explicitly documents a manual start.
- Exercise workflows are disabled by default and only run as the learner progresses through the exercise.
- Validation evidence is available: tests, dry run, or documented manual checks.
- Reset/retry behavior is documented and safe for repeated learners.
- No source content contains repository-specific absolute URLs unless required.
- Exercise images are stored in
.github/imagesand referenced with relative paths. [!NOTE],[!IMPORTANT], and[!TIP]callouts are left-justified (no indentation).- License, attribution, and contribution notes are present where needed.
Expected callout formatting:
[!NOTE] This is a note
[!IMPORTANT] This is an important item to be aware of for this exercise
[!TIP] It is a good idea and recommended to do this tip
Output template
## Publish recommendation
## Release summary
## Files or areas changed
## Validation evidence
## Final checklist
## Publish or transfer plan
## Suggested PR description
## Suggested release notes
## Remaining risks
Be direct if the exercise is not publishable yet. Include the shortest concrete path to readiness.