Skip to content
Skills Library
Programming · Automation

cap

/cap

Smart Commit And Push (cap). Stages specified or recently modified target files along with their referenced companion assets (such as blog post images in assets/img/posts/<slug>/), validates the commit message against the Conventional Commits specification, commits, and pushes to the remote repository while keeping unrelated untracked/modified files untouched. Trigger whenever the user types "cap", "/cap", "$cap", or "cap @file".

Repository
skills ↗
Licence
MIT
Last repository change
10.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/commit-lint.sh

What it does and when to use it

Smart Commit And Push (cap). Stages specified or recently modified target files along with their referenced companion assets (such as blog post images in assets/img/posts/<slug>/), validates the commit message against the Conventional Commits specification, commits, and pushes to the remote repository while keeping unrelated untracked/modified files untouched. Trigger whenever the user types "cap", "/cap", "$cap", or "cap @file".

Triggers from the description

cap$capcap @file
Original author description

Smart Commit And Push (cap). Stages specified or recently modified target files along with their referenced companion assets (such as blog post images in assets/img/posts/<slug>/), validates the commit message against the Conventional Commits specification, commits, and pushes to the remote repository while keeping unrelated untracked/modified files untouched. Trigger whenever the user types "cap", "/cap", "$cap", or "cap @file".

How it works

  1. Agent Instructions & Strict Workflow
Original SKILL.md headings · 57 lines, 378 words
SKILL.md preview
---
name: cap
description: Smart Commit And Push (cap). Stages specified or recently modified target files along with their referenced companion assets (such as blog post images in assets/img/posts/<slug>/), validates the commit message against the Conventional Commits specification, commits, and pushes to the remote repository while keeping unrelated untracked/modified files untouched. Trigger whenever the user types "cap", "/cap", "$cap", or "cap @file".
---

# Smart Commit And Push (`cap`)

This skill performs an intelligent, context-aware **Commit And Push** workflow whenever the user invokes `cap`, `/cap`, `$cap`, or `cap @<file...>`.

---

## Agent Instructions & Strict Workflow

### Step 1: Identify Target File(s) & Auto-Discover Companion Assets

1. Inspect the working tree and recent commit history:
   ```bash
   git status -u
   git log -n 5 --oneline
   ```
2. Determine the **primary target file(s)**:
   - **Explicit target**: If the user specified `@<file...>` or file paths (e.g., `cap @_posts/2026-11-09-post.md`), use those exact files as the primary target.
   - **Implicit target**: If the user only typed `cap` (or `/cap`, `$cap`), use the file(s) created or modified during the current conversation task.
3. **Auto-discover referenced companion assets (Crucial)**:
   - Read/scan the primary target file(s) for references to local companion files or directories:
     - YAML Front Matter fields such as `image.path` or `cover` (e.g., `/assets/img/posts/<slug>/cover.jpg`).
     - Markdown image/asset links `![...](/assets/img/posts/<slug>/...)` or relative file references.
     - Companion asset directories matching the target file's slug (e.g., `assets/img/posts/<post-slug>/`).
   - Cross-check discovered paths against `git status -u`. Automatically include any untracked (`??`) or modified (`M`) companion assets that belong to the target file(s).
4. **Strictly isolate unrelated changes**:
   - Do **NOT** stage (`git add -A` or `git add .` is forbidden when unrelated changes exist) any other untracked drafts or modified files in the working tree that do not belong to the target file(s).

---

### Step 2: Draft & Lint Conventional Commit Message

1. Write a concise commit message following the **Conventional Commits** specification:
   ```text
   <type>[optional scope]: <description>
   ```
   - Match the scope and style of `git log -n 5 --oneline` in the repository (for example, `docs(post): add ...` or `docs(post): shorten ...` for blog posts).
   - State the net change relative to the prior committed state, not the intermediate process.
2. Validate the commit message using the bundled linter script before committing:
   ```bash
   bash "<skill_dir>/scripts/commit-lint.sh" "<commit-message>"
   ```

---

### Step 3: Stage, Commit, and Push

1. Stage only the primary target file(s) and their discovered companion assets, commit, and push to the remote branch:
   ```bash
   git add <primary-target-files> <companion-assets>
   git commit -m "<commit-message>"
   git push
   ```
2. Report concisely to the user:
   - The commit hash and Conventional Commit message.
   - The exact list of files/directories included in the commit.
Files in this package (2)
  • SKILL.md 3 KB
  • scripts/commit-lint.sh 1 KB

Versions

RepositoryScoreLicence
This page · hankunpeng/skills100MIT
joeseesun/capwise95MIT

Database snapshot: 13.11.2026 · package version e562235d0df5 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100conventional-commits
    Use when the user asks to commit, create a commit, write a commit message, or runs /commit or /conventional-commits in any git repository - commit, commitar, mensagem de commit, conventional commits.
  • 100git-commit
    Use this skill when the user wants to make a Git commit or split changes into more than one commit. Also use it when the user types "/commit" or asks for a conventional commit. The skill examines the diff, stages the related files, writes a Conventional Commits message, and runs…
  • 100git-commit
    Use this skill when the user wants to make a Git commit or split changes into more than one commit. Also use it when the user types "/commit" or asks for a conventional commit. The skill examines the diff, stages the related files, writes a Conventional Commits message, and runs…
  • 91commit-push
    Commit with a Conventional Commits subject, then push. Use for /commit-push, "commit and push", "commit this and push". Must push. Never force-push.
  • 100conventional-commit
    Write a Conventional Commits message for the staged changes. Use when the user asks to commit, write a commit message, or summarize staged changes for git.
  • 96commit-and-push
    Creates atomic conventional git commits using git-agent and pushes changes to the remote repository. Use when the user asks to "commit and push", "commit with git-agent", or wants an atomic AI-generated commit followed by a push.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.