一键导入
dg-publish
Pre-merge checks, version bump, create PR/MR. Version bump happens BEFORE merge (on the feature branch) because master requires PRs. Usage: dg-publish
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Pre-merge checks, version bump, create PR/MR. Version bump happens BEFORE merge (on the feature branch) because master requires PRs. Usage: dg-publish
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Assess an existing doppelganger issue (explore codebase, identify scope/risks/ambiguities, post assessment) or create a new structured issue. Usage: dg-issue 42 (assess) or dg-issue (create) or dg-issue <description> (create with context)
Explore codebase, create implementation plan, create feature branch, create doppelganger(dg) branch, post plan as dg branch comment. Everything lives on the dg branch from this point forward. Usage: dg-plan 42
Commit changes, and post a progress comment in doppelganger(dg). Stages files by name (never git add -A), matches existing commit style. Usage: dg-commit [optional commit message]
Run specialized review agents in parallel on a doppelganger(dg) branch (code-reviewer, error-auditor, test-reviewer, completeness-checker, simplifier), write findings, then independently assess each finding to separate genuine issues from nitpicks and false positives. Usage: dg-review [aspects]
Implement a plan from a doppelganger(dg) branch, or fix review findings. Usage: dg-implement [finding-numbers]
| name | dg-publish |
| description | Pre-merge checks, version bump, create PR/MR. Version bump happens BEFORE merge (on the feature branch) because master requires PRs. Usage: dg-publish |
User input: $ARGUMENTS
git add -A or git add .. Stage files by name. Never stage secrets.update_task tool to show progress.gh/glab — Set GH_PAGER=cat and GH_EDITOR=cat before all gh commands to prevent interactive prompts from hanging the agent. Use --body-file instead of inline --body for all gh pr comment, gh pr create, and gh issue create calls to avoid shell interpretation of backticks.This step is mandatory for projects with versioning. The version bump MUST happen on the feature branch and be pushed as part of the PR, because the default branch requires PRs for all changes — you cannot push commits directly to it.
Detect versioning:
# Check for version files: package.json, Cargo.toml, pyproject.toml, version.txt, etc.
Determine the current version and what the new version should be. If the bump level isn't obvious from the PR context, ask the user:
Apply the version bump. Check AGENTS.md / CONTRIBUTING.md for project-specific version bump procedures (e.g., sync scripts, build steps that embed the version).
Commit on the feature branch:
git add <version-files>
git commit -m "chore: bump version to <new-version>"
If the project doesn't use versioning, skip this step.
Update task: version → completed, docs → in_progress.
Proactively review and update ALL documentation affected by the branch's changes. Check everything in the repo.
Identify changed features by reading the PR diff:
git diff $(git symbolic-ref --short refs/remotes/origin/HEAD)
Scan all documentation for references to changed features:
For each doc, verify:
Fix all inaccuracies found. Commit and push:
git add <doc-files>
git commit -m "docs: update documentation for <version>"
If no documentation changes are needed (rare), skip this step.
Update task: docs → completed, post → in_progress.
Use glab in place of gh here if the repo is hosted on GitLab.
<remote_issue_id> here is the issue ID from the remote issue. This can be found in the output of dg issue read <N>. If the remote issue in null, then you can omit Closes #<remote_issue_id>. Don't put the local dg issue ID (N) in it's place.
git push -u origin feature/issue-<N>-<slug>
# Open PR
cat > /tmp/gh-body.md << 'DG_EOF'
Closes #<remote_issue_id>
# What
<list of changes made>
# Why
<description of _why_ these changes matter for the project>
# Local Testing Instructions
<list of instructions for a _human_ reviewer to take to _reproduce_ the behavior locally. *Do not include instructions for running the test suite*.>
MACH6_EOF
gh pr create --title "<title>" --body-file /tmp/gh-body.md
Update task: post → completed, checks → in_progress.
gh pr checks <pr-number>
Note: gh pr checks returns exit code 8 while checks are still pending — this is expected, not a failure. Wait and re-run if needed.
Verify:
If there are blocking issues, report them and suggest fixes:
/dg-implementCheck for contributing guidelines first:
# Read first found: CONTRIBUTING.md, DEVELOPMENT.md, .github/CONTRIBUTING.md, AGENTS.md, CLAUDE.md
Then check if these need attention:
Present the checklist to the user. If items need attention, address them before proceeding.
Update task: checks → completed.
Report: what was done throughout. Link to the PR.