スキル一覧に戻る
blueraai

auto-learn

by blueraai

1🍴 0📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: auto-learn description: Automatic learning from session command patterns user-invocable: false

Auto-Learn

Automatically detects recurring command patterns during sessions and suggests or applies learnings to CLAUDE.md files.

Overview

The auto-learn system observes commands run during a Claude Code session and, when patterns emerge (same command run multiple times), either suggests adding them as learnings to CLAUDE.md or automatically applies them.

Flow:

  1. Observe (PreToolUse on Bash): Tracks commands during the session
  2. Synthesize (Stop event): Analyzes patterns and generates suggestions
  3. Apply/Suggest: Writes to CLAUDE.md (auto mode) or shows suggestions (suggest mode)

Configuration

Enable and configure via /bluera-base:config:

# Enable auto-learning (opt-in, disabled by default)
/bluera-base:config enable auto-learn

# Set mode: suggest (default) or auto
/bluera-base:config set .autoLearn.mode auto

# Set occurrence threshold (default: 3)
/bluera-base:config set .autoLearn.threshold 5

# Set target file: local (default) or shared
/bluera-base:config set .autoLearn.target shared

Configuration Options

OptionPathValuesDefaultDescription
Enabled.autoLearn.enabledtrue/falsefalseOpt-in to enable tracking
Mode.autoLearn.modesuggest/autosuggestHow to handle learnings
Threshold.autoLearn.thresholdnumber3Occurrences before acting
Target.autoLearn.targetlocal/sharedlocalWhere to write learnings

Modes

ModeBehavior
suggestShows learnings as systemMessage at session end. User runs /bluera-base:claude-md learn to apply.
autoWrites learnings directly to target file. Shows confirmation message.

Targets

TargetFileSharedNotes
localCLAUDE.local.mdNoAuto-gitignored by Claude Code
sharedCLAUDE.mdYesCommitted to repo, shared with team

Pattern Detection

Commands are normalized and counted during each session:

PatternExample CommandsSuggested Learning
npm:test, bun:test, yarn:testnpm test, bun run test"Run tests frequently during development"
npm:lint, bun:lint, cargo:clippynpm run lint"Run linter before committing"
npm:build, cargo:build, go:buildnpm run build"Build verification is part of workflow"
git:status, git:diffgit status"Check git status before commits"

Commands are normalized to tool:subcommand format for consistent tracking.

File Format

Learnings are stored in a marker-delimited region:

## Auto-Learned (bluera-base)
<!-- AUTO:bluera-base:learned -->
- Run tests frequently during development
- Run linter before committing
<!-- END:bluera-base:learned -->

Marker rules:

  • Section header: ## Auto-Learned (bluera-base)
  • Start marker: <!-- AUTO:bluera-base:learned -->
  • End marker: <!-- END:bluera-base:learned -->
  • Each learning is a bullet point (-)

Safety Features

Secrets Detection

Learnings matching sensitive patterns are always rejected:

api[_-]?key|token|password|secret|-----BEGIN|AWS_|GITHUB_TOKEN|ANTHROPIC_API|OPENAI_API|private[_-]?key|credential

Deduplication

Before writing, learnings are normalized (lowercase, trimmed) and compared against existing content. Duplicates are silently skipped.

Hard Cap

Maximum 50 learnings in the auto-managed section. If exceeded, a warning is shown and no new learnings are written.

Opt-In

Auto-learn is disabled by default. Users must explicitly enable it:

/bluera-base:config enable auto-learn

State Files

FilePurpose
.bluera/bluera-base/state/session-signals.jsonTracks command counts per session

The signals file is cleared after synthesis (at session end).

Implementation Files

FilePurpose
hooks/observe-learning.shPreToolUse hook - tracks Bash commands
hooks/session-end-learn.shStop hook - synthesizes and applies learnings
hooks/lib/autolearn.shLibrary - writing functions (target resolution, dedup, secrets check)
hooks/lib/signals.shLibrary - session signals state management
hooks/lib/config.shLibrary - configuration loading
  • /bluera-base:config - Enable and configure auto-learn
  • /bluera-base:claude-md learn - Manually add a learning
  • skills/claude-md-maintainer - Full CLAUDE.md management skill

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です