git

A set of guidelines for using Git, a tool that records code changes and supports collaboration. It covers commits, branches, and shared development workflows.

In plain words
What is it for?
Use it to choose commit practices, organize feature branches, write useful commit messages, and coordinate code changes with other developers.
Why use it?
It helps keep changes understandable, reversible, and easier to review. It also reduces confusion when several people work on the same codebase.

Cursor rule

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 rules/synmux/myriad/git
Clone the repo
git clone --depth 1 https://github.com/synmux/myriad
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,452 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.01452
Opus 5 $0.00000 $0.00726
Sonnet 5 $0.00000 $0.00290
Haiku 4.5 $0.00000 $0.00145

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

Security

Grade A, and why

git 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 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.

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.

configuration/cursor/rules/git.mdc · 85 lines

How it starts

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

  • Commit Strategies:

    • Atomic Commits: Keep commits small and focused. Each commit should address a single, logical change. This makes it easier to understand the history and revert changes if needed.
    • Descriptive Commit Messages: Write clear, concise, and informative commit messages. Explain the why behind the change, not just what was changed. Use a consistent format (e.g., imperative mood: "Fix bug", "Add feature").
    • Commit Frequently: Commit early and often. This helps avoid losing work and makes it easier to track progress.
    • Avoid Committing Broken Code: Ensure your code compiles and passes basic tests before committing.
    • Sign Your Commits (Optional but Recommended): Use GPG signing to verify the authenticity of your commits.
  • Branching Model:

    • Use Feature Branches: Create branches for each new feature or bug fix. This isolates changes and allows for easier code review.
    • Gitflow or Similar: Consider adopting a branching model like Gitflow for managing releases, hotfixes, and feature development.
    • Short-Lived Branches: Keep branches short-lived. The longer a branch exists, the harder it becomes to merge.
    • Regularly Rebase or Merge: Keep your feature branches up-to-date with the main branch (e.g., main, develop) by rebasing or merging regularly.
    • Avoid Direct Commits to Main Branch: Protect your main branch from direct commits. Use pull requests for all changes.
  • Code Organization:

    • Consistent Formatting: Use a consistent coding style guide (e.g., PEP 8 for Python, Google Style Guide for other languages) and enforce it with linters and formatters (e.g., flake8, pylint, prettier).
    • Modular Code: Break down your codebase into smaller, manageable modules or components. This improves readability, maintainability, and testability.
    • Well-Defined Interfaces: Define clear interfaces between modules and components to promote loose coupling.
    • Avoid Global State: Minimize the use of global variables and state to reduce complexity and potential conflicts.
    • Documentation: Document your code with comments and docstrings. Explain the purpose of functions, classes, and modules.
  • Collaboration and Code Review:

    • Pull Requests: Use pull requests for all code changes. This provides an opportunity for code review and discussion.
    • Code Review Checklist: Create a code review checklist to ensure consistency and thoroughness.
    • Constructive Feedback: Provide constructive feedback during code reviews. Focus on improving the code, not criticizing the author.
    • Address Feedback: Respond to and address feedback from code reviews promptly.
    • Pair Programming: Consider pair programming for complex or critical tasks.
  • Ignoring Files and Directories:

    • .gitignore: Use a .gitignore file to exclude files and directories that should not be tracked by Git (e.g., build artifacts, temporary files, secrets).
    • Global .gitignore: Configure a global .gitignore file to exclude files that you never want to track in any Git repository.
  • Handling Secrets and Sensitive Information:

    • Never Commit Secrets: Never commit secrets, passwords, API keys, or other sensitive information to your Git repository.
    • Environment Variables: Store secrets in environment variables and access them at runtime.
    • Secret Management Tools: Use secret management tools like HashiCorp Vault or AWS Secrets Manager to store and manage secrets securely.
    • git-secret or similar: If secrets must exist in the repo (strongly discouraged), encrypt them.
  • Submodules and Subtrees:

    • Use Sparingly: Use Git submodules and subtrees sparingly, as they can add complexity.
    • Understand the Implications: Understand the implications of using submodules and subtrees before adopting them.
    • Consider Alternatives: Consider alternatives to submodules and subtrees, such as package managers or build systems.

Read the full file on GitHub · 85 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 · 85 lines · 1,452 tokens per session scan A f6c8c3610b80

Subscribe to this mod's changes

git is a cursor rule published in the GitHub repository synmux/myriad (2 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,452 tokens. 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.