Code Library logo

Code Library

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

Overview

Publishershkodnik1917
Repositoryclaude-brainlab
Skill namecode-library
Stars
35
Forks
5
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by shkodnik1917 on GitHub. Read the source before you install it.

Installation

Install the Code Library AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/shkodnik1917/claude-brainlab/tree/main/skills/code-library
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Code Library in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Code Library on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Code Library is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Frequently asked questions

What does the Code Library AI skill do?

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.

Why use Code Library on TypingMind?

Because you install it once and use it with any model. Code Library is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Code Library in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/shkodnik1917/claude-brainlab/tree/main/skills/code-library. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Code Library?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Code Library?

As many as you like. As long as a model supports skills, you can use Code Library with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Code Library AI skill free?

Yes. It is published on GitHub by shkodnik1917 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇