Skip to content
Agentmart
Submit a tool

AGENTS.md · bmaltais/kohya_ss

AGENTS.md from bmaltais/kohya_ss: 39 lines covering Purpose, Ownership, Local Contracts, Work Guidance and more.

Template by bmaltais

IndexedApache-2.0★ 12,641
Write a review

Install

Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/bmaltais/kohya_ss/master/AGENTS.md -o AGENTS.md

Read it and adapt it to your project before use.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The AGENTS.md file that bmaltais/kohya_ss (12,641 stars) keeps for coding agents. It has 39 lines in 6 sections: Purpose; Ownership; Local Contracts; Work Guidance; Verification; Child DOX Index. Use it as a model for your own project's instructions.

Use cases: code-generation

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.

For
Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
Length
39 lines
File
AGENTS.md

Sections

  1. Purpose
  2. Ownership
  3. Local Contracts
  4. Work Guidance
  5. Verification
  6. Child DOX Index

First lines (shown under the repo's Apache-2.0 license)

# kohya_ss

## Purpose

Gradio-based GUI and CLI front end for [kohya-ss/sd-scripts](https://github.com/kohya-ss/sd-scripts), used to configure and launch Stable Diffusion / SDXL / FLUX training runs (LoRA, DreamBooth, fine-tuning, TI) without hand-writing command lines.

## Ownership

- Maintainer: bmaltais
- `sd-scripts/` is a **git submodule** pointing at upstream kohya-ss/sd-scripts. Never edit files inside it — GUI-side changes only. If a fix requires a sd-scripts change, describe it as a snippet in the PR body instead of committing to the submodule.

## Local Contracts

- Python 3.10–3.11 (`pyproject.toml`), dependency management via `uv` (never bare `pip`).
- `kohya_gui.py` is the launcher entry point; it shares a name with the `kohya_gui/` package, so anything loading it dynamically (see `test/test_allowed_paths.py`) must import by file path, not `import kohya_gui`.
- Config precedence: `config.toml` (user, gitignored) vs `config example.toml` (tracked template) — copy, don't edit the example in place.
- Secrets (API tokens, HF keys) go through env vars / `config.toml`, never hardcoded.

## Work Guidance

- Black formatting on Python changes before commit.
- Keep GUI-only changes decoupled from submodule internals — call `sd-scripts` via its existing CLI/library surface, don't reach into its internals from `kohya_gui/`.
- Before a refactor touching >300 LOC, strip dead props/exports/debug logging first, as its own commit.

## Verification

- `.github/workflows/typos.yaml` runs `crate-ci/typos` on push/PR — fix flagged typos before merging.
- `tests/` holds the pytest regression suite; `test/test_allowed_paths.py` is a standalone unittest. Run both before shipping GUI changes (`pytest tests/ test/test_allowed_paths.py`).
- No `tsc`/`eslint` equivalent exists (pure Python project) — rely on the tests above plus manual GUI smoke-test via `gui.sh` / `gui.bat`.

## Child DOX Index

- `kohya_gui/AGENTS.md` — Gradio GUI package (tabs, shared widget classes, launcher helpers)
- `tools/AGENTS.md` — standalone CLI utility scripts (extraction, conversion, captioning)
- `docs/AGENTS.md` — feature guides and localized documentation
- `tests/AGENTS.md` — pytest regression suite
- `test/AGENTS.md` — manual end-to-end scratch fixtures and the allowed-paths unittest
- `sd-scripts/` — upstream submodule, out of scope for local AGENTS.md (do not create one; see Ownership above)

Signals

Stars
12,641
Forks
1,605
Open issues
529
Last commit (this folder)
Jul 9, 2026 (3 months ago)
Last release
Jul 9, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026
Cite this page

AGENTS.md · bmaltais/kohya_ss. Agent Mart. https://agentmart.dev/templates/bmaltais-kohya-ss-agents-md (last updated 2026-10-24)