Skip to content
Development
Skill

/brain-learn

Auto-learn project conventions from git history — zero manual setup. Trigger: /brain-learn

From plugin
claude-teams-brain
2618 skills16 commands
Install
$ npx -y skills add Gr122lyBr/claude-teams-brain --skill brain-learn --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/brain-learn

Context preview

The summary Claude sees to decide when to auto-load this skill.

Auto-learn project conventions from git history — zero manual setup. Trigger: /brain-learn

SKILL.md

brain-learn.SKILL.md
name: brain-learn
description: |
  Auto-learn project conventions from git history — zero manual setup.
  Trigger: /brain-learn
user_invocable: true

brain-learn

Scan the repo's git history and automatically extract conventions, architecture signals, file coupling patterns, and code hotspots. The brain teaches itself from your repo — no manual `/brain-remember` needed.

Instructions

Run:

python3 ${CLAUDE_PLUGIN_ROOT}/scripts/brain_engine.py learn "$CLAUDE_PROJECT_DIR"

Parse the JSON response which contains:

  • `status` — "ok" or "error"
  • `commits_analyzed` — number of commits scanned (up to 200)
  • `conventions_found` — total conventions detected
  • `conventions_added` — new conventions stored (excludes duplicates)
  • `conventions_skipped` — conventions already in the brain
  • `file_couplings` — number of file coupling patterns found
  • `hotspots` — number of hotspot entries (files + directories)
  • `conventions` — list of convention strings that were added
  • `message` — human-readable summary

Display results grouped by category:

## Learned from Git History

**Commits analyzed**: 187

### Conventions Added (6 new, 2 already known)
- Convention: commit messages use Conventional Commits — common scopes: api, auth, db
- Convention: branches use prefix naming (feature/, fix/, chore/)
- Architecture: primary stack is TypeScript (Node.js)
- Architecture: CI/CD uses GitHub Actions
- Architecture: uses Docker for containerization
- Convention: tests use *.test.ts naming

### Also Indexed
- 12 file coupling patterns (searchable via `/brain-search coupling`)
- 23 code hotspots (searchable via `/brain-search hotspots`)

After displaying results, suggest: > **Next steps:** > - `/brain-search coupling` — see which files change together > - `/brain-search hotspots` — see the most active files > - `/brain-status` — verify the brain state > - `/brain-forget <text>` — remove any convention that doesn't apply

The command is idempotent — running it again only adds net-new findings.

**Important**: Only use the exact command shown above. Do not invent or guess other command names.

Read more
Ships withclaude-teams-brain

Give your Claude Code Agent Teams a memory. Auto-injects role-specific context into every new teammate — your team never starts blind again.

Get the whole plugin

Other skills on claude-teams-brain.