Code Libraryのロゴ

Code Library

コミュニティ
shkodnik1917
code-library

Finds documented repositories, execution patterns, and project links in the user's Obsidian code library. Use when the user asks 'how does repo X work', 'where is the code for this project', how to run or monitor experiments, or which code skills exist.

概要

公開者shkodnik1917
リポジトリclaude-brainlab
スキル名code-library
スター
35
フォーク
5
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    shkodnik1917がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルCode LibraryをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/shkodnik1917/claude-brainlab/tree/main/skills/code-library
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/shkodnik1917/claude-brainlab.git /tmp/claude-brainlab
mkdir -p .claude/skills
cp -r /tmp/claude-brainlab/skills/code-library .claude/skills/code-library
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでCode Libraryを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にCode Libraryを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Code Libraryは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

code-library — how code work is organized here

The user wants to hand experiment execution to agents and just read the logs. For that to work, every project's code must be discoverable and its state never lost. This skill is the index to that system.

The big picture

  1. Code library (Code/<repo>/) — a durable map of how each repo works, shared across projects. Built once per repo via [[code-ingest]].
  2. Project hub card (Papers|Projects|Staff/<slug>/<slug>.md) — records which repo a project uses and what edits this project made to it (the diff from upstream).
  3. Experiment monitoring — per experiment: a log note + a results-table note + an auto-refreshed plot, kept current by a monitoring loop.

If a project has code, all three must exist. An agent picking up the project reads the project card → follows the link into the Code library → knows what to run.

1. Code library → see [[code-ingest]]

  • Location: ${OBSIDIAN_VAULT}/personal/code-library/.
  • One folder per repo; canonical overview is personal/code-library/<repo>/<repo>.md (always read this first), plus module notes.
  • It maps the upstream repo (entrypoint, modules, dispatch points, "where to edit X"). It does NOT hold project-specific edits — those live in the project card.
  • To add a repo: invoke code-ingest with the URL/path.
  • First repo in the library: [[personal/code-library/llm-baselines/llm-baselines|llm-baselines]] (EPFL; base for several optimizer/pretraining projects).

2. Project hub card — ## Код section

Every project that uses code adds this to its hub card:

markdown
## Код
- Репозиторий: [[Code/<repo>/<repo>|<repo>]] — <fork? branch?>
- Локально: `~/brainlab/<направление>/<тема>/<работа>/code/` · сервер: `~/<dir>` (<host>)
- Правки этого проекта (диф от upstream):
  - new:    <files added>
  - patched:<files changed + why>
  - flags:  <new CLI flags / configs>

This is the per-project delta. The Code library tells you how the repo works; the card tells you what this project changed and where to run it.

3. Experiment monitoring (the standard)

Per experiment series, in the project folder:

  • Experiments/<name>.md — the log: goal, fixed config, run layout (sessions/GPUs), status timeline, and a ## Progress snapshots table (one timestamped row per check).
  • Results/<name>-table.md — the results: final metric tables + an embedded loss-curve plot (![[...png]]).
  • Plot: generated by a house-style plotter (see [[handbook/tools/plot-curves]]). Rules: compact figure + large fonts (Obsidian downscales), two panels (full + zoom on the recent frontier), nothing overlaps, value labels flip left near the right edge, version the PNG filename each refresh (Obsidian caches by name) and rewrite the embed.
  • Keep these notes closed in the Obsidian app while a loop writes to them (an open note re-saves its cached copy over CLI edits = iCloud conflict).
  • Long runs: launch in tmux on the server, monitor with a /loop that reconnects the VPN on ssh timeout, appends a snapshot row, and refreshes the plot.

Your coding skills (when to reach for which)

  • daily-coding — everyday write/modify source (the QA checklist). Default for coding tasks.
  • architecture-design — new registrable components (factory/registry patterns).
  • tdd / tdd-guide — test-first feature/bugfix.
  • diagnose / bug-detective — hard bugs, perf regressions, root-cause loops.
  • code-review (/code-review) / code-review-excellence — review a diff/PR.
  • simplify (/code-review --fix), refactor-clean — dead code / consolidation.
  • build-fix / build-error-resolver — get the build green, type errors.
  • verification-loop — build+type+lint+test+security before a PR.
  • uv-package-manager — Python deps/venv with uv.
  • improve-codebase-architecture — deepen/consolidate architecture (uses CONTEXT.md, ADRs).
  • git-workflow / git-guardrails — Conventional Commits, branching, blocking dangerous git.
  • Research-side: results-analysis, results-report, analyze-results for post-run stats/figures/reports.

Coding rules in effect (from ~/.claude/CLAUDE.md + ~/.claude/rules/)

  • coding-style.md: files 200-400 lines (split at 400+), @dataclass(frozen=True) config (no globals), type hints everywhere, logging not print, specific exceptions, no mutable defaults, factory+registry for models/datasets, model __init__ takes only cfg, __all__ in __init__.py. Prohibited: files >800 lines, nesting >4, globals, unused imports, debug print.
  • agents.md: auto-invoke code-reviewer after writing code; build-error-resolver on build/type errors; dev-planner→architect for complex features; bug-analyzer on bug reports; tdd-guide for new features needing tests. Run independent agents in parallel.
  • claude-scholar-core.md: uv, Hydra+OmegaConf, Transformers Trainer when appropriate, Conventional Commits, small reviewable diffs; align on approach before multi-file work; real verification after meaningful work.
  • security.md: no hardcoded secrets/keys/IPs; secrets in env/.env; parameterized queries; no eval/exec on user input.
  • Surgical changes only; match surrounding style; don't refactor out of scope; remove orphaned imports your change caused but not pre-existing dead code.

See also

  • [[code-ingest]] — add a new repo to the library.
  • ~/.claude/rules/code-workflow.md — the always-on rule that makes agents follow this.

よくある質問

AIスキル「Code Library」では何ができますか?

Finds documented repositories, execution patterns, and project links in the user's Obsidian code library. Use when the user asks 'how does repo X work', 'where is the code for this project', how to run or monitor experiments, or which code skills exist.

TypingMindでCode Libraryを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Code Libraryはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにCode Libraryをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/shkodnik1917/claude-brainlab/tree/main/skills/code-libraryを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Code Libraryを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Code Libraryは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもCode Libraryを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Code Library」は無料ですか?

はい。shkodnik1917がGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇