跳到主要内容
知仓学习社ZHICANG

commit-push-pr

Commit changes, push to remote, and create a pull request. Use for completing features or fixes ready for review.

它会碰到什么

扫了多少2 个文本文件,4 KB
它会碰到什么读凭据
命中总数2 处
命中统计严重 2 · 高 0 · 中 0 · 低 0
逐条看命中(2 条严重或高危)
  • 严重 index.md:36cred-paths
    - Ensure no sensitive files are staged (.env, credentials, etc.)
  • 严重 SKILL.md:36cred-paths
    - Ensure no sensitive files are staged (.env, credentials, etc.)

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Commit, Push, and Create PR

Automate the git workflow for completing a feature or fix.

Pre-computed Context

Before proceeding, gather this information:

  • Current branch: !git branch --show-current
  • Git status: !git status --short
  • Recent commits on this branch: !git log --oneline -5
  • Diff summary: !git diff --stat

Workflow

  1. Review Changes
  • Check git status for all modified/added files
  • Review the diff to understand what's being committed
  • Ensure no sensitive files are staged (.env, credentials, etc.)
  1. Run Pre-commit Checks
  • Format code: ruff format . (if Python files changed)
  • Lint code: ruff check . (if Python files changed)
  • Run tests: pytest (if tests exist)
  1. Stage and Commit
  • Stage relevant files: git add <files>
  • Create a commit with Conventional Commits format:
  • feat: for new features
  • fix: for bug fixes
  • docs: for documentation
  • refactor: for refactoring
  • test: for tests
  • chore: for maintenance
  • Write a clear, concise commit message focusing on "why"
  1. Push to Remote
  • Push the branch: git push -u origin HEAD
  • If branch doesn't exist on remote, create it
  1. Create Pull Request
  • Use GitHub CLI: gh pr create
  • Include:
  • Clear title summarizing the change
  • Description with summary and context
  • Reference any related issues
  • Add appropriate labels if applicable

Arguments

Pass a commit message or leave empty for auto-generated message based on changes.

Usage: /commit-push-pr [optional commit message]

Example: /commit-push-pr feat: add user authentication

Output

Return the PR URL when complete.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。