Back to skills
SkillHub ClubShip Full StackFull Stack

braingit

Imported from https://github.com/openclaw/skills.

Packaged view

This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.

Stars
3,087
Hot score
99
Updated
March 20, 2026
Overall rating
C4.0
Composite score
4.0
Best-practice grade
F36.0

Install command

npx @skill-hub/cli install openclaw-skills-braingit

Repository

openclaw/skills

Skill path: skills/gleb-urvanov/braingit

Imported from https://github.com/openclaw/skills.

Open repository

Best for

Primary workflow: Ship Full Stack.

Technical facets: Full Stack.

Target audience: everyone.

License: Unknown.

Original source

Catalog source: SkillHub Club.

Repository owner: openclaw.

This is still a mirrored public skill entry. Review the repository before installing into production workflows.

What it helps with

  • Install braingit into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
  • Review https://github.com/openclaw/skills before adding braingit to shared team environments
  • Use braingit for development workflows

Works across

Claude CodeCodex CLIGemini CLIOpenCode

Favorites: 0.

Sub-skills: 0.

Aggregator: No.

Original source / Raw SKILL.md

---
name: braingit
description: Markdown-only git snapshot commits (stage+commit *.md only). Article: https://github.com/gleb-urvanov/braingit/blob/master/braingit-article.md
---

# Braingit

Commit Markdown-only deltas in a git repository (typically a notes/workspace repo) using a deterministic script.

Article: https://github.com/gleb-urvanov/braingit/blob/master/braingit-article.md

## Quick start

### Commit Markdown changes (default: `*.md`)
From inside the target git repo:

```bash
./scripts/commit_md_changes.sh "md: snapshot"
```

Or specify a repo path:

```bash
BRAINGIT_REPO=/path/to/repo ./scripts/commit_md_changes.sh "md: snapshot"
```

### Change what files are included

```bash
BRAINGIT_PATTERN='*.md' ./scripts/commit_md_changes.sh
```

## Behavior
- Reads `git status --porcelain -z`
- Stages **only** matching files (default `*.md`)
- Commits only if something is staged
- Exits `0` when there is nothing to do

## Scripts
- `scripts/commit_md_changes.sh`
  - Env:
    - `BRAINGIT_REPO` (default: cwd)
    - `BRAINGIT_PATTERN` (default: `*.md`)
    - `BRAINGIT_DRY_RUN=1`

## References
- `references/protocol.md` — conventions + an OpenClaw cron example


---

## Referenced Files

> The following files are referenced in this skill and included for context.

### scripts/commit_md_changes.sh

```bash
#!/usr/bin/env bash
set -euo pipefail

# Commit ONLY Markdown changes in a git repo.
#
# Usage:
#   commit_md_changes.sh [commit-message]
#
# Environment:
#   BRAINGIT_REPO     Repo path (default: current directory)
#   BRAINGIT_PATTERN  Glob pattern for files to include (default: *.md)
#   BRAINGIT_DRY_RUN  If set to 1, do not commit; print what would happen

REPO_DIR="${BRAINGIT_REPO:-$(pwd)}"
PATTERN="${BRAINGIT_PATTERN:-*.md}"
MSG="${1:-md: snapshot}"
DRY_RUN="${BRAINGIT_DRY_RUN:-0}"

cd "$REPO_DIR"

if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
  echo "braingit: not a git repo: $REPO_DIR" >&2
  exit 2
fi

# Find modified/added/deleted paths.
CHANGED=()
while IFS= read -r -d '' entry; do
  xy="${entry:0:2}"
  path="${entry:3}"

  # Renames/copies are followed by a second NUL token with the new path.
  if [[ "$xy" == R* || "$xy" == C* ]]; then
    IFS= read -r -d '' newpath || true
    path="$newpath"
  fi

  case "$path" in
    $PATTERN) CHANGED+=("$path") ;;
    *) ;;
  esac

done < <(git status --porcelain -z)

if (( ${#CHANGED[@]} == 0 )); then
  exit 0
fi

if [[ "$DRY_RUN" == "1" ]]; then
  echo "braingit: would stage+commit ${#CHANGED[@]} file(s):"
  printf ' - %s\n' "${CHANGED[@]}"
  echo "braingit: message: $MSG"
  exit 0
fi

# Stage only included files
for p in "${CHANGED[@]}"; do
  git add -- "$p" || true
done

# Commit if anything staged
if git diff --cached --quiet; then
  exit 0
fi

git commit -m "$MSG" >/dev/null

```

### references/protocol.md

```markdown
# Braingit protocol (Markdown-only snapshots)

Goal: keep a git commit history of Markdown changes (notes, specs, research, plans) without touching code.

## Recommended conventions
- Commit message default: `md: snapshot`.
- Keep `.gitignore` tight (exclude logs, caches, downloaded media).
- Avoid storing secrets in Markdown; if unavoidable, exclude specific paths.

## Suggested automation patterns
- Run on a schedule (cron/launchd) to create periodic snapshots.
- Or run after a pipeline step that updates `.md` files.

## OpenClaw cron example
(If OpenClaw CLI is available on the host)

```bash
openclaw cron add \
  --name braingit-md-midnight \
  --description "Midnight: commit markdown changes snapshot" \
  --cron "0 0 0 * * *" --tz Europe/Madrid \
  --session isolated \
  --timeout-seconds 120 \
  --message "Run <PATH_TO_SKILL>/scripts/commit_md_changes.sh \"md(midnight): snapshot\"" \
  --no-deliver
```

Replace `<PATH_TO_SKILL>` with the installed skill folder.

```



---

## Skill Companion Files

> Additional files collected from the skill directory layout.

### _meta.json

```json
{
  "owner": "gleb-urvanov",
  "slug": "braingit",
  "displayName": "Braingit",
  "latest": {
    "version": "0.1.2",
    "publishedAt": 1772659575581,
    "commit": "https://github.com/openclaw/skills/commit/52afec12d89b86166ce6d78cb45fbf5edde9eb16"
  },
  "history": []
}

```

braingit | SkillHub