Index of every page on this site: llms.txt
All skills
akdevsaha-dev avatar

/smart-push

@ce26f0a
Run it yourself

Turn local Git changes into clean atomic commits, verify them, push the branch to the user's fork, and open or update a GitHub pull request. Explicit invocation only; supports --dry-run, --draft, --no-pr, --no-push, and --skip-checks.

Use this Skill: https://skilld.dev/gh/akdevsaha-dev/factory-skills/smart-push

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencescommits.md

≈1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Commit planning

Grouping

A commit is one reason to change. A reviewer should be able to read it alone and revert it alone.

  • Keep together: an implementation plus its tests, a type change plus its call sites, a migration plus the code that uses it, a dependency bump plus the code that needs it.
  • Separate: independent features, a bug fix found while working on a feature, a pure refactor that the feature builds on (commit it first), formatting-only churn, and documentation that stands on its own.
  • Don't split: a single coherent change into per-file commits, and a rename plus its fallout into separate commits.
  • Order: commit so that every commit builds, with refactors and dependencies first.
  • Exclude: anything you can't explain from the diff. Leave it uncommitted and ask about it.

Changes that were already staged

When you start, compare git diff --cached with git diff. Treat content the user already staged as a deliberate grouping.

  • It fits the plan: Commit it as staged, either on its own or with closely matching changes.
  • It cuts across the plan: This includes staged changes that are unrelated to what you're pushing, or a file partially staged in a way that splits your groups. Show the conflict and ask.
  • Never unstage it silently. If you must change the index temporarily, save git diff --cached --binary to a file first, and restore it afterwards with git apply --cached.

Partial staging

Interactive git add -p isn't available. Stage hunks from a patch instead:

git diff -- path/to/file > /tmp/sp-full.patch
# copy only the wanted hunks (keep the diff headers) into /tmp/sp-part.patch
git apply --cached --check --recount /tmp/sp-part.patch
git apply --cached --recount /tmp/sp-part.patch
git diff --cached -- path/to/file   # confirm only the intended hunks are staged
  • A single hunk mixes two concerns: Split it by editing the patch's + and - lines, and keep the context lines exact.
  • Mixed content in an untracked file: Run git add -N <file> first, so that its contents appear in git diff.
  • Never edit the working tree to make staging easier.

Messages

  • Detect the convention: Look at the recent subjects in the context output, plus any commitlint, commitizen, or .gitmessage configuration. Use Conventional Commits (type(scope): subject) when the repository uses them, or when it has no clear convention. Otherwise match the style it has.
  • Types: feat, fix, refactor, perf, test, docs, build, ci, chore, style, revert. Use a scope only where the history uses scopes. Mark a breaking change with ! and add a BREAKING CHANGE: footer.
  • Subject: Use the imperative mood. Keep it to 72 characters or fewer, with no trailing period. Name the behavior, for example fix(auth): refresh session before expiry check, not update auth.ts.
  • Body: Add one only when the reason for the change isn't obvious from the diff. Explain the reason and any constraints, and wrap lines at 72 characters.
  • Trailers: Add Signed-off-by (use git commit -s) or issue references only when the repository requires them. Never add a co-author trailer for an AI or agent.

File hygiene

Never commit these unless the user insists after a warning:

  • Secrets and credentials: .env* (except *.example and *.sample), keys, certificates, credentials*, *.tfstate, .npmrc or .pypirc files that contain tokens.
  • Generated output: node_modules/, dist/, build/, .next/, coverage/, target/, __pycache__/, and similar. The exception is a generated file the repository already tracks; regenerate it with the repository's own command.
  • Editor and OS files, logs, *.orig, *.rej, temporary or scratch files, and large binaries.
  • Lockfile changes that don't match a manifest change, or a manifest change without its lockfile update. Also unexpected major version bumps, and registry URL changes.

When an ignorable file keeps showing up, suggest adding it to .gitignore as a separate change. Don't do that silently.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2d3 checks · Risk SAFE
  • Gen Agent Trust Hub2d

    The 'smart-push' skill is a robust, security-conscious development tool designed to automate atomic Git commits and GitHub pull requests. It implements strict 'assume-malicious' safeguards, including automated secret scanning, hygiene checks, and mandatory approval gates before any network operation. The tool explicitly prevents credential leaks, AI attribution, and accidental modification of protected branches.

  • Socket2d

    No alerts

  • Snyk2d

    Risk: MEDIUM · 1 issue

Signed by skilld at ce26f0a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 3 days ago
disable-model-invocation
true

README badge

README badge for akdevsaha-dev/factory-skills/smart-push