Agent skill

Releasing Php Package

by yansongda in yansongda/pay

A skill your agent uses when preparing to publish a new version of a PHP Composer package and need to write or update CHANGELOG, upgrade guides, and documentation before tagging and releasing

MITAuto-check passedDevelopment

Install Releasing Php Package

skills CLI
$ npx skills add yansongda/pay --skill releasing-php-package -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install yansongda/pay releasing-php-package --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/yansongda/pay.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/releasing-php-package .claude/skills/releasing-php-package && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
releasing-php-package
GitHub stars
5.4k
Token cost
~1.6k tokens
SKILL.md length
425 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when preparing to publish a new version of a PHP Composer package and need to write or update CHANGELOG, upgrade guides, and documentation before tagging and releasing

  • Works in 7 steps: 分支隔离(关键) → 分析提交 → 规范化 CHANGELOG → …
  • Preparing to publish a new version of a PHP Composer package and need to write
  • SKILL.md covers 概述, 使用场景, 版本分类 and 核心模式, plus 3 more sections
  • Calls git, gh and composer

What it does

Releasing Php Package is an agent skill from yansongda/pay. Use when preparing to publish a new version of a PHP Composer package and need to write or update CHANGELOG, upgrade guides, and documentation before tagging and releasing

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Changelog and release notes and Code migrations. It works with PHP, WeChat and Git. The repository describes itself as: 可能是我用过的最优雅的 Alipay/WeChat/Douyin/Unipay/江苏银行 的支付 SDK 扩展包了. The licence is MIT.

When your agent uses it

  • Preparing to publish a new version of a PHP Composer package and need to write
  • Update CHANGELOG
  • Documentation before tagging and releasing

Example prompts

  • “/releasing-php-package”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. 分支隔离(关键)
  2. 分析提交
  3. 规范化 CHANGELOG
  4. 编写升级指南
  5. 清理过期示例
  6. 更新导航
  7. PR → Tag → Release

What it can do on your machine

Read from SKILL.md and the folder at commit 37cf0c1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • composer

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Releasing Php Package loads about 1.6k tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 425 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from yansongda/pay at commit 37cf0c1, republished under its MIT licence (© yansongda). 425 words, ~1,626 tokens.

Download SKILL.mdSave it as .claude/skills/releasing-php-package/SKILL.md (or your agent's skills folder).
name
releasing-php-package
description
Use when preparing to publish a new version of a PHP Composer package and need to write or update CHANGELOG, upgrade guides, and documentation before tagging and releasing

发布 PHP Composer 包

概述

用于发布 PHP Composer 包的结构化流程,避免 CHANGELOG 格式混乱、升级指南缺失、文档示例过期等常见问题,并强制要求在打 tag 前通过独立分支 + PR 完成文档改动。

硬性约束(违反即流程无效):

  • Agent 只负责创建 PR,严禁自行合并 PR(包括 gh pr merge、平台合并 API 等任何形式的自动合并)
  • PR 必须由人工审核后合并;在获得人工「PR 已合并」确认前,Agent 不得打 tag、不得创建 Release

使用场景

  • 准备发布新版本(patch/minor/major/beta/rc)
  • CHANGELOG 使用了非标准分类或前缀
  • 目标版本还没有对应的升级指南
  • 文档中包含已移除或已弃用功能的示例
  • 上次发布曾因文档问题被反馈

不要使用:

  • 项目已有自动化发布工具(semantic-release、release-please)
  • 仅单文件改动且对用户无可见影响

版本分类

变更类型版本号变化是否需要升级指南
仅 Bug 修复Patch(1.0.X)否
新功能,向后兼容Minor(1.X.0)是
破坏性变更Major(X.0.0)是
预发布(beta/rc/alpha)预发布版本(1.0.0-beta.1)是

核心模式

错误示例
markdown
## v1.2.0 - 2024-01-01

### BREAKING CHANGES
- change: PHP version bumped to 8.2

### Added
- feat: add new provider support (#42)
- feat: add new config system (#43)

### Changed
- fix: correct error code (#45)
- chore: update dependencies (#46)
正确示例(符合 Keep a Changelog)
markdown
## [v1.2.0] - 2024-01-01

### Added
- New payment provider support (#42)
- Typed configuration objects replacing arrays (#43)

### Changed
- Minimum PHP version from 8.0 to 8.2 (#41)
- All internal plugins migrated to trait-based architecture (#44)

### Removed
- Legacy helper functions file, migrated to static methods (#44)
- Deprecated `getOldConfig()` functions, use `getProviderConfig()` (#41)

速查表

任务命令 / 文件关键规则
查看当前分支git branch --show-current禁止在 master/main 上直接修改 CHANGELOG
创建发布分支git checkout -b docs/changelog-vX.Y.Z所有文档改动必须走 PR
列出自上一个 tag 以来的提交git log --oneline --no-merges $(git describe --tags --abbrev=0)..HEAD排除 merge commit
标准分类Added → Changed → Deprecated → Removed → Fixed → Security严格顺序,不新增分类
去除前缀移除 feat:、fix:、refactor:、chore:仅当存在时才移除;已干净的中文描述保持原样
升级指南docs/v{major}/upgrade/v{version}.md 或实际等价路径先探测真实 docs 路径
更新导航侧边栏 / 菜单配置文件若 .gitignore 忽略 docs 目录,使用 git add -f
合并 PR由人工在平台审核后执行Agent 严禁自动合并(gh pr merge 等一律禁止)
创建 annotated taggit tag -a vX.Y.Z -m "release: vX.Y.Z"必须在 PR 由人工合并后执行
创建 GitHub Releasegh release create vX.Y.Z --notes-file release-notes.md --prereleasebeta/rc/alpha 需标记为 pre-release

执行步骤

0. 分支隔离(关键)

在修改任何发布相关文件前,必须先创建独立分支。

bash
# 先确认当前分支
git branch --show-current

# 如果在 master/main 上,立即切出发布分支
git checkout -b docs/changelog-vX.Y.Z

禁止在 master/main 上直接提交 CHANGELOG 或升级指南改动。

1. 分析提交
bash
latest=$(git describe --tags --abbrev=0)
git log --oneline --no-merges ${latest}..HEAD

重点关注:PR 编号、破坏性变更、新功能、已弃用 / 已移除项。

仅文档发布判断: 如果自上一个 tag 以来的代码变更已经在目标分支上,而你只是整理文档,则按「仅文档发布」处理。流程相同,但提交范围只包含 CHANGELOG / 升级指南 / 导航。

关键验证步骤: 分析完提交后,务必验证实际代码状态,避免把「新增后又移除」的功能写进发布说明:

bash
# 验证文件增删
git diff ${latest}..HEAD --stat

# 验证 src/ 下实际代码变更
git diff ${latest}..HEAD -- src/

验证规则:

  1. 对于 commit 消息中的「新增」项:

    • 确认文件 / 类 / 方法在 HEAD 中仍然存在
    • 如果后续 commit 已移除,则从发布说明中排除
    • 示例:#1157 新增 NetworkException,但 #1161 又移除了 → 不要写进 Added
  2. 对于 commit 消息中的「移除」项:

    • 确认文件 / 类 / 方法在 HEAD 中已不存在
    • 如果仍然存在,则排除或改为「已弃用」
  3. 对于 commit 消息中的「变更」项:

    • 确认变更在 HEAD 中真实存在
    • 如果已被 revert,则从发布说明中排除

验证命令:

bash
# 确认文件存在于 HEAD
git show HEAD:path/to/file

# 确认文件变更
git diff ${latest}..HEAD -- path/to/file
2. 规范化 CHANGELOG

分类顺序(严格):Added、Changed、Deprecated、Removed、Fixed、Security。

规则:

  • 仅当存在 feat: / fix: / refactor: / chore: 等前缀时才移除
  • 不要重写已经是干净中文描述的条目
  • 将 BREAKING CHANGES 内容移入 Changed 或 Removed
  • 合并重复条目(如同一文件被删除两次)
  • 保留 PR 引用 (#1234) 以便追溯
  • 子列表缩进 2 个空格

版本标题格式:

markdown
## [v1.2.0] - 2024-01-01
Show full SKILL.md (171 more words)Show less
3. 编写升级指南

先探测真实 docs 路径。 常见位置:

  • docs/v{major}/upgrade/v{version}.md
  • web/docs/v{major}/upgrade/v{version}.md
  • src/docs/v{major}/upgrade/v{version}.md

如果目标升级指南已存在(例如后续 beta 版本),则在原有基础上追加新内容,不要整篇替换。

章节结构:

  1. ## 重点检查
    • ### 运行环境 — PHP 版本、扩展、其他运行时要求
    • ### 简单使用者 — 仅 end-user 可见变更(命名空间变化、移除的方法、配置调整)。不要罗列内部重构(内部辅助函数重组、不影响公共 API 的基类变化、代码组织调整)。
    • ### 自有插件开发者 — 影响自定义插件或扩展的内部架构变更(新基类、方法签名变化、移除的内部工具)。
  2. ## 更改版本号 — composer require vendor/package:~{version}
  3. ### BREAKING CHANGES(如有)— 完整破坏性变更列表
4. 清理过期示例

搜索文档中已移除或已弃用功能的使用:

bash
grep -rn "deprecatedMethod\|removedClass\|oldNamespace" docs/

规则: 删除已移除功能的示例。不要保留「兼容两种写法」的双示例。文档只反映当前版本。

5. 更新导航

将新升级指南链接加入文档导航配置(如侧边栏、菜单、索引文件)。

注意: 如果 .gitignore 包含 docs 目录匹配规则,新文件需用 git add -f 强制添加。

6. PR → Tag → Release

创建 PR:

bash
git add -f CHANGELOG.md docs/  # 或 web/docs/,按实际路径调整

git commit -m "docs: update CHANGELOG and upgrade guide for vX.Y.Z"

git push -u origin docs/changelog-vX.Y.Z

# 通过 GitHub / GitLab / Gitea 等平台创建 PR

⛔ 流程暂停点:创建 PR 后必须停止,等待人工审核合并

  • 告知用户 PR 链接,明确说明等待人工审核合并,然后结束当前步骤
  • 严禁执行 gh pr merge(含 --squash/--merge/--rebase)、平台合并 API 等任何自动合并操作
  • 后续步骤(push tag、创建 Release)即使已获授权,也不包含 PR 合并权;合并永远由人工执行

人工合并后(继续前必须确认 PR 已由人工合并):

bash
# 核实 PR 状态(state 应为 MERGED,mergedBy 应为人工账号)
gh pr view <PR编号> --json state,mergedAt,mergedBy
git fetch origin
git log --oneline origin/master | head -5

# 打 tag 并推送
git checkout master && git pull origin master
git tag -a vX.Y.Z -m "release: vX.Y.Z"
git push origin vX.Y.Z

创建 Release(以 GitHub 为例):

bash
# 从 CHANGELOG 提取当前版本段落
sed -n '/^## vX.Y.Z/,/^## v/p' CHANGELOG.md | sed '$d' > release-notes.md

# beta/rc/alpha 版本需添加 --prerelease
gh release create vX.Y.Z --title "vX.Y.Z" --notes-file release-notes.md --prerelease

常见错误

错误原因修正
直接在 master 提交 CHANGELOG跳过分支隔离必须先创建 docs/changelog-vX.Y.Z 分支
CHANGELOG 保留 feat:/fix: 前缀从 commit 消息复制粘贴仅在有前缀时剥离;保持已有干净描述
内部重构写入「简单使用者」未区分用户可见变更与内部变更移到「自有插件开发者」或直接删除
文档保留新旧双示例试图在文档中保持向后兼容删除旧示例;文档只反映当前版本
忘记更新导航创建升级指南后未注册立即加入侧边栏 / 菜单
PR 未合并就创建 tag急于完成发布先确认 origin/master 包含合并提交
使用 lightweight taggit tag 缺少 -a始终使用 git tag -a 并附带 message
Release notes 与 CHANGELOG 不一致单独编写 release notes从 CHANGELOG 提取或复制
预发布版本未标记 pre-release忘记 beta/rc/alpha 后缀按版本后缀在发布平台勾选 pre-release
写入「新增后又移除」的功能仅依赖 commit 消息未验证代码用 git diff 确认功能在 HEAD 中真实存在
Agent 自行合并 PR误将「发布流程授权」当作「合并授权」如需撤销:git revert <merge-commit>;此后一律仅创建 PR 并等待人工合并

© yansongda, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/releasing-php-package of yansongda/pay.

Open the folder on GitHubat commit 37cf0c1

Compare with similar skills

Releasing Php Package next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Releasing Php Package compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Releasing Php Package this skillyansongda/pay5.4k—~1.6kAutomated safety check: PassMIT
Chamilo Changelog Updaterchamilo/chamilo-lms1k—~4.2kAutomated safety check: PassGPL-3.0
Skia Analystmono/SkiaSharp5.6k—~1.6kAutomated safety check: PassMIT
Releasemarko-php/marko396—~2.9kAutomated safety check: PassMIT
Changelog Generatordidi/mpx3.9k—~640Automated safety check: PassApache-2.0
Tabler Upgrade Guide Writertabler/tabler42k—~1.7kAutomated safety check: PassMIT

Similar skills

  • Chamilo Changelog Updater

    chamilo/chamilo-lms

    Adds commits for a new Chamilo release to the changelog page, classifying them into categories and skipping those already listed for that version.

    1k GitHub stars~4.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Skia Analyst

    mono/SkiaSharp

    Analyze Skia features for SkiaSharp - produces a unified analysis of what shipped (upstream engine benefits, PR links, migration guides) and what's missing (impact/priority/effort scoring, hidden…

    5.6k GitHub stars~1.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Release

    marko-php/marko

    Cut a new Marko release. An agent skill from marko-php/marko.

    396 GitHub stars~2.9k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • 通过查看当前最新版本与上一版本间的git提交记录与代码变更,生成版本变更日志,当用户询问“创建/生成变更日志”、“创建/生成changelog”时使用。

    3.9k GitHub stars~640 tokensUpdated today
    DevelopmentAuto-check passed
  • Writes the upgrade guide page for a Tabler release by collecting removed, renamed and deprecated items from changesets and diffs, with before and after examples.

    42k GitHub stars~1.7k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    56k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed

More from yansongda/pay

  • Container Dev

    yansongda/pay

    A skill your agent uses when local PHP environment is unavailable.

    5.4k GitHub stars~968 tokensUpdated yesterday
    Auto-check passed
  • PR Review Provider

    yansongda/pay

    A skill your agent uses when reviewing PRs that add or modify a payment Provider in yansongda/pay - covers plugin pipeline, multi-tenant safety, signature verification, docs, and naming conventions.

    5.4k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Dev Guide

    yansongda/pay

    A skill your agent uses when developing, testing, or adding new providers to yansongda/pay project.

    5.4k GitHub stars~378 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Releasing Php Package

What does Releasing Php Package do?

A skill your agent uses when preparing to publish a new version of a PHP Composer package and need to write or update CHANGELOG, upgrade guides, and documentation before tagging and releasing. Releasing Php Package is an agent skill from yansongda/pay.

When should I use Releasing Php Package?

Releasing Php Package fits situations like: preparing to publish a new version of a PHP Composer package and need to write; update CHANGELOG; documentation before tagging and releasing.

How do I install Releasing Php Package in Claude Code?

Run `npx skills add yansongda/pay --skill releasing-php-package -a claude-code`. Or copy the skill folder (.agents/skills/releasing-php-package in yansongda/pay) into .claude/skills/releasing-php-package in your project. Claude Code loads it when a task matches its description.

How do I install Releasing Php Package in Codex?

Run `npx skills add yansongda/pay --skill releasing-php-package -a codex`. Or copy the skill folder (.agents/skills/releasing-php-package in yansongda/pay) into .agents/skills/releasing-php-package in your project. Codex loads it when a task matches its description.

Can I use Releasing Php Package in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yansongda/pay --skill releasing-php-package -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/releasing-php-package, .gemini/skills/releasing-php-package, .github/skills/releasing-php-package and .opencode/skills/releasing-php-package in your project.

What does Releasing Php Package need to run?

Going by SKILL.md and its folder, Releasing Php Package needs the command-line tools its instructions call (git, gh and composer).

Does Releasing Php Package access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Releasing Php Package safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Releasing Php Package use?

Releasing Php Package is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Releasing Php Package use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Releasing Php Package?

Skills that share tags, products or a category with Releasing Php Package: Chamilo Changelog Updater (chamilo/chamilo-lms, 1k stars), Skia Analyst (mono/SkiaSharp, 5.6k stars), Release (marko-php/marko, 396 stars) and Changelog Generator (didi/mpx, 3.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Releasing Php Package?

yansongda (a GitHub user) maintains it in yansongda/pay, which has 5,370 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 8, 2026.

Source: yansongda/pay on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.