Skip to content
Agentmart
Submit a tool

lms-rescue

LM Studio のローカル LLM に調査・修正を委任(Codex CLI 経由) (user)

Skill by rysk-tanaka

IndexedMIT
Write a review

Chalk Labs

Need help deploying lms-rescue?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code. Read the repository before you give any tool access to your data.

npx agentmarket install skill/rysk-tanaka-lms-rescue

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

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

LM Studio のローカル LLM に調査・修正を委任(Codex CLI 経由) (user)

Use cases: ml, agent-building

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

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Shell scripts

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/lms-rescue

Tools it pre-approves 4

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Bash(bash
  • *)
  • BashOutput
  • AskUserQuestion

What's inside

Skill name
lms-rescue
Description
LM Studio のローカル LLM に調査・修正を委任(Codex CLI 経由) (user)
License
MIT
Allowed tools
Bash(bash, *), BashOutput, AskUserQuestion
Instructions
73 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Pre-approves some shell commands

Files (2)

  • SKILL.md
  • lms-rescue.sh

SKILL.md (first lines)

# ローカル LLM への委任

LM Studio で動くローカル LLM に、調査・修正を任せる。エージェントの実行環境には Codex CLI を使い、モデルはリポジトリのファイルを読んだりコマンドを実行したりできる。

## 入力

`$ARGUMENTS` に依頼内容とオプションが渡される。依頼内容が無い場合は、何を調査・修正させるかをユーザーに尋ねる。

例

- `/lms-rescue テストが落ちる原因を調べて` → 読み取り専用で調査
- `/lms-rescue --write parse_date のタイムゾーン処理を直して` → 作業ツリー内の編集を許可
- `/lms-rescue --resume 続けて` → 直前のセッションを引き継ぐ

## オプションの解釈

- `--write`: 作業ツリー内の編集を許可する(Codex の workspace-write sandbox)
- `--read-only`: 編集させない
- どちらも無い場合は依頼内容から判断する。修正・実装を明示的に求めていれば `--write`、調査・診断・レビューだけなら読み取り専用にする
- `--resume`: この作業ディレクトリで直前の lms-rescue セッションを引き継ぐ。`--model` を付けなければ、そのセッションで使ったモデルのまま続ける
- `--fresh`: 新しいセッションで始める
- `--resume` も `--fresh` も無く、依頼が「続けて」「その修正を適用して」のような継続の指示なら `--resume` を付ける。それ以外は新しいセッションにする
- `--model <key>`: モデルを指定する(`lms ls` のキー)。指定が無ければ付けない
- `--read-only` と `--fresh` はラッパーに渡さない(既定の動作のため)

## 実行

次のコマンドを必ず `run_in_background=true` で起動する(ローカルモデルのエージェント実行は数分から数十分かかり、Bash ツールの上限 600 秒を超えうるため)。

```bash
bash ${CLAUDE_SKILL_DIR}/lms-rescue.sh [--write] [--resume] [--model <key>] -- "$(cat <<'LMS_TEXT'
<依頼内容>
LMS_TEXT
)"
```

- 依頼内容はユーザーの文面を基本的にそのまま渡す。オプションだけを取り除く
- 自由記述の文字列は、本文を展開しない quoted heredoc(`<<'LMS_TEXT'`)で渡す。ダブルクォートに直接埋め込むと、識別子を囲むバッククォートや `$(...)` をシェルがコマンドとして実行してしまうため
- `--` は依頼内容の前に必ず置く(依頼内容が `--` で始まってもオプションと解釈させないため)
- 起動したら「ローカル LLM に委任した」とだけ伝え、このターンでは待たない
- 完了通知が届いたら、stdout をそのまま提示する。要約・言い換え・独自の追加作業はしない

## 制約

- 委任に徹する。リポジトリを自分で調べたり、モデルの代わりに修正したりしない
- `--write` の実行後は、stdout 末尾の作業ツリーの状態をそのまま示す。変更の採否はユーザーに委ねる
- ローカルモデルは誤った修正をしやすい。変更をコミットする前に差分を確認するようユーザーに促す

## 失敗時

非ゼロ終了した場合は stderr の `ERROR:` 行と、続くログの末尾をそのまま伝えて終了する。主な原因。

- サーバーに接続できない(Mac mini のスリープ、LM Studio 停止、Tailscale 切断)
- `codex` CLI が無い
- 認証エラーやモデルキーの誤り
- コンテキスト長の不足(LM Studio でモデルのコンテキスト長を 64K 程度に設定する)

## 設定

接続先と認証は `lms-review` と共通の環境変数を使う。

| 変数 | 用途 | 既定値 |
| --- | --- | --- |
| `LM_API_URL` | LM Studio サーバーのルート URL(`/v1` は付けない) | `http://localhost:1234` |
| `LM_API_TOKEN` | 認証トークン | なし |
| `LM_API_TOKEN_COMMAND` | トークンを標準出力に出すコマンド(例: `op read 'op://...'`)。`LM_API_TOKEN` が空のとき、接続確認の後にだけ実行される | なし |
| `LMS_RESCUE_MODEL` | モデルキー | `qwen/qwen3.6-35b-a3b` |
| `LMS_RESCUE_CONTEXT_WINDOW` | LM Studio 側のコンテキスト長(Codex はその 75% で自動圧縮する) | 読み込み中のモデルから取得 |
| `LMS_RESCUE_HOME` | セッションとログの保存先 | `~/.local/state/lms-rescue` |

セッションは専用の `CODEX_HOME`(`$LMS_RESCUE_HOME/codex`)に保存されるため、普段の Codex の履歴や設定とは混ざらない。実行ごとの詳細ログは `$LMS_RESCUE_HOME/logs/` に残る。

From rysk-tanaka/skills, MIT.

More from rysk-tanaka/skills

Signals

Stars
0
Forks
0
Open issues
1
Last commit (this folder)
Sep 29, 2026 (1 month ago)
Last release
Oct 14, 2026 (17 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from rysk-tanaka

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get lms-rescue running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying lms-rescue?

CallGet help
Cite this page

lms-rescue skill. Agent Mart. https://agentmart.dev/skills/rysk-tanaka-lms-rescue (last updated 2026-10-24)