git.init

A command that starts Git version control for a project and creates a suitable .gitignore file, which lists files Git should not track.

In plain words
What is it for?
Use it when starting version control for Node.js, Python, Rust, or another detected project type.
Why use it?
It saves you from choosing ignored files by hand and helps keep build output and installed dependencies out of the repository while retaining lock files.

Command

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.

agentmods
npx agentmods add commands/prmichaelsen/gcloud-mcp/git.init
Clone the repo
git clone --depth 1 https://github.com/prmichaelsen/gcloud-mcp
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,297 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00000 $0.03297
Opus 5 $0.00000 $0.01648
Sonnet 5 $0.00000 $0.00659
Haiku 4.5 $0.00000 $0.00330

Measured yesterday against content hash b7942de5258e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

git.init scanned grade C with 1 finding 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 yesterday.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

**Solution**: This is usually fine - git will reinitialize without losing history. If you want a fresh start, delete `.git` directory first: `rm -rf .git`
agent/commands/git.init.md · 514 lines

How it starts

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

Command: init

🤖 Agent Directive: If you are reading this file, the command @git.init has been invoked. Follow the steps below to execute this command.

Namespace: git Version: 1.0.0 Created: 2026-02-16 Last Updated: 2026-02-16 Status: Active


Purpose: Initialize a git repository with intelligent .gitignore based on project type Category: Creation Frequency: Once


What This Command Does

This command intelligently initializes a git repository for your project by:

  1. Analyzing the project structure to detect the project type (Node.js, Python, Rust, etc.)
  2. Running git init to create the repository
  3. Creating or updating .gitignore with sensible defaults based on the detected project type
  4. Ensuring dependency lock files are NOT ignored (they should be committed)
  5. Ignoring build directories, distribution directories, and dependency installation directories

The command is smart about .gitignore - it evaluates your project to determine what should be ignored rather than using a generic template. This ensures your repository follows best practices for your specific technology stack.

Example: "For a Node.js project, this command will detect package.json, initialize git, and create a .gitignore that ignores node_modules/, dist/, *.tgz, but keeps package-lock.json committed."


Prerequisites

  • Project directory exists and contains project files
  • Git is installed on the system
  • No existing .git directory (or you want to reinitialize)

Steps

1. Evaluate Project Type

Analyze the project structure to determine the technology stack and project type.

Actions:

  • Check for package.json (Node.js/npm)
  • Check for pyproject.toml, setup.py, requirements.txt (Python)
  • Check for Cargo.toml (Rust)
  • Check for pom.xml, build.gradle (Java)
  • Check for go.mod (Go)
  • Check for composer.json (PHP)
  • Check for .csproj, .sln (C#/.NET)
  • Check for Gemfile (Ruby)
  • Identify any other project-specific files

Read the full file on GitHub · 514 lines

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. yesterday First seen · 514 lines · 0 tokens per session scan C b7942de5258e

Subscribe to this mod's changes

git.init is a command published in the GitHub repository prmichaelsen/gcloud-mcp (0 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,297 tokens. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.