From 200a6605ff27e79e7486c37eed8dd18ccd45158f Mon Sep 17 00:00:00 2001 From: Stanislav Zhuk Date: Thu, 29 Oct 2026 14:35:19 +0200 Subject: [PATCH] chore(claude): replace the ddev-commit skill with /ddev:commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Short Summary (TL;DR) Removes this repository's `ddev-commit` skill. Commits and PRs now use `/ddev:commit` from ddev/agent-skills, and the Cloudflare preview steps move to AGENTS.md. ## The Issue ddev/ddev and ddev.com each kept a copy of the commit skill, and the copies drifted apart. ddev/agent-skills#5 merged them into `/ddev:commit`, which add-on repositories can use too. ## How This PR Solves The Issue - AGENTS.md points to `/ddev:commit` and gives its install command. Without the plugin, agents follow the organization patterns that AGENTS.md already links. - The Cloudflare preview URL is the only part specific to ddev.com, so it moves unchanged to a "PR preview" section in AGENTS.md. `/ddev:commit` reads AGENTS.md before it writes Manual Testing Instructions. - The `add-sponsor` and `bump-deps` skills point to `/ddev:commit`, and to AGENTS.md for the preview URL. ## Manual Testing Instructions ```bash claude plugin install ddev --marketplace ddev/agent-skills gh pr checkout 769 claude ``` Make a small content change, then ask "make a branch and commit". Expect `/ddev:commit` to load and to put the Cloudflare preview URL in Manual Testing Instructions. ## Automated Testing Overview `ddev npm run prettier` and `ddev npm run textlint` pass. Nobody has made a commit through `/ddev:commit` in this repository yet. 🤖 Developed with assistance from [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 5.5 --- .claude/skills/add-sponsor/SKILL.md | 2 +- .claude/skills/bump-deps/SKILL.md | 6 +- .claude/skills/ddev-commit/SKILL.md | 135 ---------------------------- AGENTS.md | 31 ++++++- 4 files changed, 32 insertions(+), 142 deletions(-) delete mode 100644 .claude/skills/ddev-commit/SKILL.md diff --git a/.claude/skills/add-sponsor/SKILL.md b/.claude/skills/add-sponsor/SKILL.md index 8af5e4d1..915bae05 100644 --- a/.claude/skills/add-sponsor/SKILL.md +++ b/.claude/skills/add-sponsor/SKILL.md @@ -161,6 +161,6 @@ phones and one from `sm` up, such as `h-10 sm:h-15`. ## 6. Commit -Title `chore(sponsor): add `. Follow the `ddev-commit` skill. Manual +Title `chore(sponsor): add `. Follow `/ddev:commit`. Manual Testing Instructions compare the preview's `/#supporters` and both badge URLs against https://ddev.com/, and the PR should include the two badge renders. diff --git a/.claude/skills/bump-deps/SKILL.md b/.claude/skills/bump-deps/SKILL.md index 3d8ae7ca..a95eb907 100644 --- a/.claude/skills/bump-deps/SKILL.md +++ b/.claude/skills/bump-deps/SKILL.md @@ -103,7 +103,7 @@ ddev prettier ## 6. Pull request -Write the commit and PR with the `ddev-commit` skill. Title: +Write the commit and PR with `/ddev:commit`. Title: `build(deps): bump astro from v to v`, plus any other notable major. - **Short Summary (TL;DR):** which packages moved to a new major, and whether @@ -126,8 +126,8 @@ Write the commit and PR with the `ddev-commit` skill. Title: mobile views: `/blog/markdown-features-demo/`, `/get-started/`, `/usage-stats/`, site search, the theme toggle, and anything a major touched (for example `#featured-sponsors` on the demo post after an image library - change). Take the preview URL from the Cloudflare comment, as the - `ddev-commit` skill describes, because Dependabot aliases always collide and + change). Take the preview URL from the Cloudflare comment, as + `AGENTS.md` describes under PR preview, because Dependabot aliases always collide and get a random suffix. - **Release/Deployment Notes:** the majors to watch in the Cloudflare build. diff --git a/.claude/skills/ddev-commit/SKILL.md b/.claude/skills/ddev-commit/SKILL.md deleted file mode 100644 index e680d58d..00000000 --- a/.claude/skills/ddev-commit/SKILL.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -name: ddev-commit -description: Write a ddev.com commit message or pull request description. Covers the title format, the PR template sections, the Cloudflare preview URL for Manual Testing Instructions, the trailers, the plain register DDEV uses, and how to pass a body to git and gh without hard line breaks. Use before writing any commit message, PR, or issue for this repository. -when_to_use: > - Triggered by "commit this", "write a commit message", "open a PR", - "update the PR description", "update the PR body", or any request to - prepare work for review in the ddev.com repo. ---- - -# Writing commits and PRs for ddev.com - -The commit body is reused as the pull request description, so write it once, -for the reviewer. - -## Title - -[Conventional Commits](https://www.conventionalcommits.org/), per the -[PR title guidelines](https://docs.ddev.com/en/stable/developers/building-contributing/#pull-request-title-guidelines): -`[(scope)]: [, fixes #]`, for example -`docs(blog): add DDEV v1.25.4 release post` or -`build(deps): bump astro from v7.1.3 to v7.2.10`. - -## Body - -Follow `.github/PULL_REQUEST_TEMPLATE.md`, which matches the ddev/ddev -template, with its HTML comments removed. Sections, in this order: - -```markdown -## Short Summary (TL;DR) - -## The Issue - -- Fixes #REPLACE_ME_WITH_RELATED_ISSUE_NUMBER - -## How This PR Solves The Issue - -## Manual Testing Instructions - -## Automated Testing Overview - -## Release/Deployment Notes -``` - -- **Short Summary (TL;DR):** required. One or two plain sentences: what - changed and why. Write it last. -- **The Issue / How This PR Solves The Issue:** the decision, not the - investigation behind it. Keep the `- Fixes #` line when there is an - issue, and drop it when there is none. -- **Manual Testing Instructions:** see below. -- Drop any other section, heading included, that has nothing to say, instead - of writing `None` under it. - -### Manual Testing Instructions - -Link the PR's Cloudflare preview, not a local dev server, and compare it -against the same path on https://ddev.com/. Name the exact pages and what to -look for, not the general area. Ask where the branch will be pushed, since the -URL differs, and use a `REPLACE_ME`-style placeholder for anything not known -yet: - -- `ddev/ddev.com`: `https://.ddev-com-front-end.pages.dev/`, - with the subdomain cut to 28 characters -- A fork: `https://pr-.ddev-com-fork-previews.pages.dev/` - -Once the PR exists, take the real URL from the Cloudflare comment. It differs -from the computed one when the cut alias collides with an earlier branch's, -which gets a random suffix such as `-kgcv`: - -```bash -gh pr view --json comments --jq '.comments[].body' \ - | grep -oE 'https://[a-z0-9-]+\.ddev-com-(front-end|fork-previews)\.pages\.dev' \ - | grep -vE '^https://[0-9a-f]{8}\.' | sort -u -``` - -### Trailers - -End the body with two trailers, separated by an empty line: - -```text -🤖 Developed with assistance from [Claude Code](https://claude.ai/code) - -Co-Authored-By: Claude -``` - -`` is the model actually in use, for example `Opus 5.5`. Leave the -`Co-Authored-By` line out of a PR description. - -## Keep it short - -A reviewer reads the diff anyway, so the message earns its place only by -saying what the diff cannot: why, and what to check by hand. A finished -message should read in under a minute. State each fact once, in the section -it belongs to; a section growing past a handful of lines is narrating the -diff. - -## Register - -Plain, direct sentences, each with the connective that ties its clauses -together (so, which, before, instead of, because). Not none, which reads -choppy, and not several stacked with parentheticals, which reads as dense -engineering prose. Read it aloud as if to a teammate. When a parenthetical -explains why something was done, give the why its own clause. The banned -words in `AGENTS.md` apply. - -## No hard line breaks - -GitHub renders issue, PR, and comment bodies with GFM hard line breaks: a lone -`\n` inside a paragraph becomes a `
`. - -**Write each paragraph of a commit body or `--body-file` as one continuous -line**, with empty lines only between paragraphs, headings, and list items. -Code blocks and tables are unaffected. - -## Passing the body - -Write the message to a file, then `git commit -F `. Never use -`git commit -m "$(cat <<'EOF' ... EOF)"`, which mangles the message. The same -holds for `gh`: - -```bash -gh pr create --title "" --body-file ~/tmp/pr_body.md -gh pr edit <number> --title "<title>" --body-file ~/tmp/pr_body.md -``` - -## Before committing - -1. Run the checks in `AGENTS.md`, including `ddev npm run build` when code, - config, or dependencies changed. -2. Read `git diff --cached` for comments that break - `.claude/rules/comments.md`, and cut them. -3. When amending, re-check every claim already in the body against the - current diff. - -Then commit and stop: pushing is forbidden, per `AGENTS.md`. Report the branch -and which commits are unpushed. diff --git a/AGENTS.md b/AGENTS.md index 00785cc6..bcddb630 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,7 +17,7 @@ its own. | Adding or updating a featured sponsor | `.claude/skills/add-sponsor/SKILL.md` | | Bumping npm dependencies | `.claude/skills/bump-deps/SKILL.md` | | Accessibility checks with axe-core and Lighthouse | `.claude/skills/a11y-check/SKILL.md` | -| A commit or PR | `.claude/skills/ddev-commit/SKILL.md` | +| A commit or PR | `/ddev:commit`, see Git workflow | | A comment, in any code file | `.claude/rules/comments.md` | Fetch files from GitHub through `raw.githubusercontent.com`; a @@ -121,5 +121,30 @@ pushes to a remote, even when asked. The maintainer pushes. Branch names are `YYYYMMDD_<username>_<short_description>`, for example `20250919_rfay_update_quickstart`. Commit titles follow Conventional Commits, -and the commit body is reused as the PR description; see -`.claude/skills/ddev-commit/SKILL.md` before writing either. +and the commit body is reused as the PR description. Write both with the +`/ddev:commit` skill from [ddev/agent-skills](https://github.com/ddev/agent-skills). +Install it in Claude Code with +`claude plugin install ddev --marketplace ddev/agent-skills`. Without it, +follow the organization patterns linked above. + +### PR preview + +Manual Testing Instructions link the PR's Cloudflare preview, not a local dev +server, and compare it against the same path on https://ddev.com/. Name the +exact pages and what to look for. Ask where the branch will be pushed, since +the URL differs, and use a `REPLACE_ME`-style placeholder for anything not +known yet: + +- `ddev/ddev.com`: `https://<branch-with-dashes>.ddev-com-front-end.pages.dev/`, + with the subdomain cut to 28 characters +- A fork: `https://pr-<number>.ddev-com-fork-previews.pages.dev/` + +Once the PR exists, take the real URL from the Cloudflare comment. It differs +from the computed one when the cut alias collides with an earlier branch's, +which gets a random suffix such as `-kgcv`: + +```bash +gh pr view <number> --json comments --jq '.comments[].body' \ + | grep -oE 'https://[a-z0-9-]+\.ddev-com-(front-end|fork-previews)\.pages\.dev' \ + | grep -vE '^https://[0-9a-f]{8}\.' | sort -u +```