workspace-git-setup

workspace-git-setup is a skill for Claude Code, Codex from Songhonglei/better-agent-skills. It costs 396 tokens per session (1,588 once invoked), scanned A, original, MIT.

A Bash script that starts Git tracking in a working directory and prepares common safety checks. Git is a tool that records file changes so you can review or restore versions.

In plain words
What is it for?
Use it to initialize or align a project repository, create a security-focused .gitignore, check for sensitive or untracked files, detect files over 10 MB, or preview the setup with a dry run.
Why use it?
It reduces setup work and helps prevent credentials, private keys, tokens, caches, build files, and oversized files from entering the repository. Its audit mode can inspect an existing repository without changing it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to initialize or align a project repository, create a security-focused .gitignore, check for sensitive or untracked files, detect files over 10 MB, or preview the setup with a dry run.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/songhonglei/better-agent-skills/workspace-git-setup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Songhonglei/better-agent-skills --skill workspace-git-setup
Clone the repo
git clone --depth 1 https://github.com/Songhonglei/better-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for workspace-git-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/songhonglei/better-agent-skills/workspace-git-setup/github.svg)](https://agentmods.dev/skills/songhonglei/better-agent-skills/workspace-git-setup)
Your own site
<a href="https://agentmods.dev/skills/songhonglei/better-agent-skills/workspace-git-setup"><img src="https://agentmods.dev/badge/skills/songhonglei/better-agent-skills/workspace-git-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for workspace-git-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/songhonglei/better-agent-skills/workspace-git-setup"><img src="https://agentmods.dev/badge/skills/songhonglei/better-agent-skills/workspace-git-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 396 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,588 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00396 $0.01588
Opus 5 $0.00198 $0.00794
Sonnet 5 $0.00079 $0.00318
Haiku 4.5 $0.00040 $0.00159

Measured 9d ago against content hash 0fa8d8a373d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

workspace-git-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/setup.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/workspace-git-setup/SKILL.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.

workspace-git-setup

One command to set up safe, sensible Git tracking for any working directory — with a built-in security audit.

A zero-dependency Bash script that initializes Git version control for a project, ships a battle-tested security .gitignore, warns about large files before your first commit, and can audit an existing repo for leaked secrets and untracked files.

Pure bash + git. No Python, no npm, no third-party packages.

Usage

# Initialize / align config (defaults to current directory; auto-uses dir name as project name)
bash scripts/setup.sh

# Specify workspace path and project name
bash scripts/setup.sh /path/to/project "MyProject"

# Audit mode (read-only): detects sensitive files / untracked files / config
bash scripts/setup.sh --audit

# Dry-run mode: preview every action without applying anything
bash scripts/setup.sh --dry-run

Path & identity resolution

Item Priority
Workspace path CLI argument > WORKSPACE_DIR env var > current directory
Git identity GIT_AUTHOR_NAME / GIT_AUTHOR_EMAIL env vars > existing git config > interactive prompt

When only an email is provided, the email prefix is used as the username (you can change it later with git config).

Three modes

Mode What it does Mutates?
(default) init / align git init + writes safe .gitignore + large-file warning + first commit ✏️ yes
--audit read-only health check: tracked secrets / untracked files / core.autocrlf 👀 no
--dry-run preview every change without applying 👀 no

Default flow (init mode)

  1. Resolve path — CLI arg > WORKSPACE_DIR > current directory
  2. Infer project name — workspace basename (override with the 2nd argument)
  3. Read identity — env vars → existing git config → interactive prompt
  4. git init — skipped if a repo already exists (idempotent); sets core.autocrlf=input to unify line endings; default branch main
  5. Write .gitignore — if one exists, shows a diff and asks before overwriting
  6. Large-file warning — scans files >10MB to be tracked and asks for confirmation
  7. First commit — auto-stages and commits
  8. Summary — shows project name, path, git identity, and audit usage

Read the full file on GitHub · 102 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 102 lines · 396 tokens per session scan A 0fa8d8a373d1

Subscribe to this mod's changes

workspace-git-setup is a skill published in the GitHub repository Songhonglei/better-agent-skills (3 stars, last pushed yesterday), licensed MIT. It adds 396 tokens to every session and 1,588 once invoked, about $0.0020 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.