Automated summary
Prepares and opens a draft pull request in the Redocly CLI repository from an existing branch or a new branch off main, handling staged files, checks, and a changeset.
Strengths
- Clearly separates staged files from files that still need staging and asks for confirmation when ownership is ambiguous.
- Defines explicit branch selection and naming rules, including never pushing main.
- Requires the relevant npm checks and a changeset before publication.
- Keeps failures visible while excluding unrelated failures from the PR body.
Limitations
- The provided text is truncated mid-changeset section, so the actual PR creation and template-filling steps are not shown.
- It is tightly coupled to the Redocly CLI repository's npm scripts, changelog, and PR template.
- It assumes local git, GitHub CLI, and project dependencies are available.
Use when a Redocly CLI contributor wants to turn local work or a branch into a draft PR ready for review.
Do not use it for another repository or when the user only wants code changes without publishing a branch or PR.
Security analysis
CautionThe skill uses legitimate but powerful tooling: git fetch/switch/add/commit/push, npm scripts, and gh API/PR creation against a public repository. These actions are intentional for opening a draft PR, and the instructions include sensible guardrails such as never pushing main, avoiding broad git add, preserving the PR template, and not hiding failures. I found no destructive commands, secret exfiltration, obfuscated payloads, or attempts to override the auditor.
- •No allowed-tools are declared, yet the skill depends on shell access, `git push`, and GitHub CLI network calls; it relies on the host agent's ambient permissions instead of an explicit tool allowlist.
- •Step 3 runs `npm run compile`, `npm run lint`, `npm run typecheck`, and `npm test`, which execute repository-controlled scripts and dependencies; normal for this repo, but it is arbitrary code execution if the skill is pointed at an untrusted checkout.
- •The workflow pushes a branch to a public remote and opens a public PR, so staged files, commits, and the PR body become public; the skill does warn about this and keeps secrets out of scope.
Examples
Open a draft PR in the Redocly CLI repo from my current branch. The changes are already staged, and I need the changeset checked.Create a draft pull request for this fix, but my current branch is main. Put the uncommitted files on a new fix/ branch from origin/main and add the changeset.Prepare my Redocly CLI change for review: run the required checks, add a changeset if needed, and open a draft PR without touching my local notes.name: pr description: Open a draft pull request in the Redocly CLI repository from a branch without a PR, or a new branch from main — commit the staged files, or the files of the change when nothing is staged, check the changeset, and fill the PR template without removing any of its sections. Use whenever the user asks to open, create, or prepare a PR or draft PR, push work for review, or ship a change, even if they do not say "draft".
Open a draft pull request
Redocly CLI is a public repository. The branch name, commits, PR title, and PR body are public, and a reviewer reads every line.
This skill publishes the user's work. It does not change code: the only file it may create is a changeset.
1. Understand the change
- Run
git fetch origin main, then readgit status --short,git diff --cached, andgit diff. The change is the uncommitted files, plus the commits of the current branch when step 2 uses that branch. - When the user staged files, they chose the files of the change, so the change is the staged files. When an unstaged or untracked file seems to belong to it, ask the user to stage it before you go on.
- When nothing is staged, list the files that belong to the change, and step 5 stages them.
Leave out everything else: untracked drafts, local notes and plans, and a
package-lock.jsonthat only a localnpm installchanged. When you are not sure that a file belongs, ask. - Find the why in the conversation, the commits, or the linked issue. If no source says why, ask the user before you write the PR body.
2. Choose the branch
Use the current branch when it is not main and has no PR yet (gh pr list --head <branch> --state all is empty).
The user created it for this change, so its commits belong to the PR: read them with git log origin/main..HEAD and git diff origin/main...HEAD.
Otherwise, create the PR branch from origin/main:
git switch -c <type>/<short-topic> origin/main
The uncommitted files come with the switch, and the commits of the current branch stay out of the PR.
Name the branch after the commit type and the topic, for example fix/bundle-ref-paths.
Never push main.
- If git refuses the switch because an uncommitted file conflicts with
origin/main, stop and ask. - Do not rebase, merge, reset, or stash without asking.
3. Check the change
Run these from the repository root:
npm run compile # tests import the compiled lib/ output
npm run lint
npm run typecheck
npm test
- For a change to docs only,
npm run lintandnpx redocly recheck <changed files> --config docs/redocly.yamlare enough. - If the diff came from an AI assistant, run
/deslopbefore you commit. When the user staged the files, ask them to review its edits and stage the edited files. - If a check fails because of the change, stop and report the failure. If it fails for an unrelated reason, such as a flaky test or a missing local tool, report it to the user with its output. Never hide a failure, but keep it out of the PR body: the pipelines show it, and every check must pass before the merge.
4. Add a changeset
Every feat or fix that changes a published package needs a changeset (see CONTRIBUTING.md and .claude/rules/workflow.md).
When the change needs a changeset and none exists, write one. It is a file of the change: when the user staged the files, ask them to stage it too, and otherwise step 5 stages it.
-
Read the package names in
.changeset/config.json, and read the top of the packageCHANGELOG.mdto match its wording. -
Write
.changeset/<three-random-words>.md:--- '@redocly/cli': minor --- Added the `skills` command that installs the Redocly CLI agent skills for AI coding agents.
- List only the packages whose behavior changed for users.
If the code is in another package, such as
@redocly/openapi-core, but it changes CLI behavior, list@redocly/clitoo. - Write one sentence in the past tense from the user's point of view: "Added …", "Fixed … so that …". Add a short Note only when the user has to change something to keep an existing flow working, and say what. A Note that repeats the sentence, such as "lint now reports …" after "Added the … rule", is noise.
- Changes to docs, tests, CI, or AI instructions need no changeset.
The PR then gets the
no changeset neededlabel (step 7).
5. Commit
- When the user staged the files, commit them and stage nothing else.
- Otherwise, stage each file of the change by its path:
git add <path> <path>. Do not usegit add .,git add -A, or a folder path. They also stage untracked drafts, and a draft stays in the public history even after you remove it. - Before you commit, compare
git diff --cached --name-onlywith the files of the change from step 1. - Write one Conventional Commits sentence, such as
feat: add the skills commandorfix(respect): keep cookies between steps. The types in use arefeat,fix,docs,chore, andtest. The scope is optional. - Do not add AI co-author or "Generated with" lines.
- The pre-commit hook lints and formats the staged files.
If it fails, fix the cause, then stage the fixed file again when you staged it, and otherwise ask the user to review and stage it.
Do not use
--no-verify.
6. Write the PR body
Copy .github/pull_request_template.md to a temporary file, for example $TMPDIR/pr-body.md, and fill it in.
Write the file with your file-writing tool instead of echo or a heredoc, so backticks and quotes stay intact.
Keep the template whole.
Keep every header, every checkbox, and every <!-- required 🔒 --> comment.
Keep ## Screenshots (optional) even when it stays empty.
CONTRIBUTING.md says: "Please do not modify the PR template."
- What/Why/How?
The reader knows Redocly CLI but has not read this code.
Describe the changes, and keep the section short:
- One sentence on why: the current limit or bug that users have.
- One sentence on what changes, at the level of commands, options, rules, and output.
- A bullet only for a major decision that the code does not show. A decision that follows the existing approach is obvious, so it stays out.
- Leave out the background that does not explain the problem, and what the reader can read in the code, such as the details of the implementation.
- Reference: public links only, such as a GitHub issue or a related PR. Leave it empty when there is none. Each related link goes in this section.
- Testing: one line that lists the kinds of tests applied, such as local, unit, e2e, smoke, or performance, for example "Locally, E2E tests.". Describe the procedure only when it is specific to the change, such as a manual check that no test covers. The section describes what was done, so it carries no results and no failures.
- Screenshots (optional): keep the header. For a change to CLI output, tell the user that a screenshot helps the reviewer. Add images only when the user gives them.
- Check yourself and Security: check a box only when it is true for this PR. A box about code, such as "All new/updated code is covered by tests" or "Code follows company security practices and guidelines", stays unchecked when the PR changes no code. Leave the other boxes unchecked. Do not delete any box.
The repository is public, so keep internal context out of the title, body, and commits. When the user tells you such context, use it to understand the why. Then write the why as the public problem that users have.
Write plain English: short sentences, active voice, no filler, and no marketing tone. Say each thing once in the whole body.
7. Push and open the draft PR
git push -u origin HEAD
gh pr create --draft --base main --title "<title>" --body-file "$TMPDIR/pr-body.md"
- Use the main commit sentence as the title.
- Add
--label "no changeset needed"when step 4 found that no changeset is needed. - When the author is a member of the Redocly organization (
gh api orgs/Redocly/members/$(gh api user --jq .login)returns204), add--assignee @me. - Add
--project "Dark Side Board"when the user asks for it. - Always open a draft PR.
- Delete the temporary body file.
- Give the user the PR URL and the list of committed files. Name anything that you left out on purpose, such as untracked files or an unrelated failing check.
Update an open PR
The user often edits the PR body on GitHub, for example to add screenshots.
Before you change the body, read the current version with gh pr view <number> --json body, and change only the part that must change, so that their edits stay.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/open-a-draft-pull-request-mwrc4xnc/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/open-a-draft-pull-request-mwrc4xnc' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/open-a-draft-pull-request-mwrc4xnc/download' --output '.skill-downloads/open-a-draft-pull-request-mwrc4xnc/SKILL.md.part' && mv '.skill-downloads/open-a-draft-pull-request-mwrc4xnc/SKILL.md.part' '.skill-downloads/open-a-draft-pull-request-mwrc4xnc/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/open-a-draft-pull-request-mwrc4xnc/SKILL.md' && test -s '.skill-downloads/open-a-draft-pull-request-mwrc4xnc/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr' && cp -R '.skill-downloads/open-a-draft-pull-request-mwrc4xnc' '.claude/skills/pr'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/open-a-draft-pull-request-mwrc4xnc'openskills read 'open-a-draft-pull-request-mwrc4xnc'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/open-a-draft-pull-request-mwrc4xnc/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.