skills/git-cli-convention/SKILL.md
Command syntax for git operations. Heredoc format for commit messages, shell quoting and multi-line input patterns. Use when running git commit, git tag or any git command with structured input.
npx skillsauth add jitsusama/agentic-harness.pi git-cli-conventionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use -F- with a heredoc to pass multi-line commit messages:
git commit -F- <<'EOF'
type(scope): subject line
Body explaining what and why, hard-wrapped at 72 characters.
Any additional paragraphs separated by blank lines.
EOF
The single-quoted 'EOF' delimiter prevents shell variable
expansion; backticks, dollar signs and special characters
all pass through literally.
Never use an unquoted heredoc delimiter. <<EOF allows
shell variable expansion: $variables, backticks and
$(commands) are expanded inside the body, corrupting
the content. Always quote the delimiter: <<'EOF'.
Because quoted heredocs are fully literal, never put
$variable syntax in the body expecting it to resolve.
It won't — the text arrives exactly as written. If you
need a dynamic value, write the actual value directly
in the commit message.
The -m flag has limitations:
-m flags.Heredoc avoids all of these. Always prefer -F- with heredoc
for commits with a body.
When constructing git commands:
'no $expansion'"branch: $name""say \"hello\"""it's fine"Common patterns the agent should use:
# Simple commit with heredoc
git commit -F- <<'EOF'
feat(auth): add token refresh
EOF
# Amend to fix a mistake in the last commit
git commit --amend -F- <<'EOF'
fix(api): correct response parsing
EOF
# Staged commit with prefix commands
git add -A && git commit -F- <<'EOF'
chore: update dependencies
EOF
The commit-format skill covers the message format
itself (types, scopes, subject/body rules). This skill
covers the command mechanics.
Never combine git state changes with other commands in a single bash call. Guardians and interceptors rewrite commands during review, and compound commands risk losing parts that aren't part of the target command.
Bad (checkout may be dropped by the PR guardian):
git checkout feature-branch
gh pr create --title "..." --body-file - <<'EOF'
...
EOF
Good (separate calls, verified):
git checkout feature-branch
git branch --show-current # verify before depending on it
gh pr create --title "..." --body-file - <<'EOF'
...
EOF
The same applies to any git state change (checkout, pull, reset, stash) followed by a command that depends on that state. Always verify the state change took effect in a separate call before proceeding.
development
Structure of a quest README and the documents that live under it: frontmatter shape, the four core and four optional body sections, emoji glyphs, ID format, alias notation, Cast bullets and Journey entries. Use when writing or editing a quest README, a plan, research, brief or report document under a quest. Pairs with quest-convention for choices like kind, promotion and reordering. Follow the prose-standard for voice.
tools
Operational conventions for the quest system: when to use a quest versus a subquest versus a sidequest, when to scaffold a plan or research document, how to reorder priorities, when to add optional sections, when to conclude versus retire, the resuscitate pattern. Use when driving the quest tool, deciding kind, promoting or parking work, or organising a project as quests. Pairs with quest-format for the on-disk shape.
development
Markdown structure rules: Title Case headings with their exceptions, the line-width target and its legitimate exceptions, reference-style links, fenced code blocks with language tags, tables and lists. Use when writing or editing any markdown file (README, AGENTS, docs, plans, skill files), or when adding a heading, link, table or code block. Owns markdown structure; pairs with prose-standard, which owns voice, grammar, spelling and punctuation.
tools
How to measure whether convention corrections keep recurring in the pi session logs, by category and by week. Use to record a baseline before the convention gates take effect and to re-run afterwards to confirm the recurring categories bend down. Pairs with the convention gates (pr-guardian, issue-guardian, commit-guardian, slack-integration) and the convention-context extension.