Shellmのロゴ

Shellm

組織人気
laude-institute
shellm

Reference for the shellm system — recursive LLM shell, identity management, memory, skills, trajectory, and all CLI tools. Use when working on shellm itself, debugging agent behavior, or understanding how the pieces fit together.

Add to TypingMind

概要

公開者laude-institute
リポジトリheadlong
スキル名shellm
スター
1.2K
フォーク
127
同梱ファイル
指示のみ
ライセンスApache-2.0
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

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

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

スキルの指示

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

shellm

This skill may be out of date. The source of truth is always the code in bin/. If you find discrepancies, use the skill-author skill to update this file and open a PR.

Architecture overview

shellm is a set of composable bash scripts that turn an LLM into an autonomous agent living in a shell. The stack, bottom to top:

llm              raw LLM calls (Anthropic, OpenAI, Gemini)
shellm           recursive execute-in-shell loop on top of llm
traj / context   step log (DAG) + message assembly for multi-turn
mem / skills     persistent memory + learnable capabilities
identity         isolated agent identities (own mem, skills, traj)
think / chat     autonomous thinking + human conversation
focus            goal tracking

An agent activates an identity (source .identities/<name>/activate), which sets env vars. All tools read from those env vars — no global config files.

bin/ reference

Core engine

ScriptPurpose
shellmRecursive LLM-in-bash loop. Sends a prompt to the LLM, executes returned bash code blocks, feeds output back, repeats until FINAL is set. The heart of the system.
llmMulti-provider LLM CLI. llm [options] prompt or stdin. Supports Anthropic, OpenAI, Gemini. Key flags: -m MODEL, -s SYSTEM, -M MESSAGES_JSON, --stream, --thinking.

Identity & activation

ScriptPurpose
identityManage isolated identities. Each has its own memories, skills, kernel, traj. Subcommands: new, list, info, switch, delete, shell, prompt.

Activate an identity to set env vars for all other tools:

bash
source .identities/myagent/activate   # activate in current shell
deactivate_identity                    # undo
identity shell myagent                 # or: start a subshell

Thinking & conversation

ScriptPurpose
thinkOne autonomous think cycle. Reads traj + memories, calls shellm with think prompt, writes thought/action to traj, dispatches thought processes. think step [--dry-run].
chatSend messages into the thought stream. chat send <msg> appends a human-msg step. chat repl gives a readline loop.
focusGoal management. focus set <goal>, focus show, focus done <query>. Stores goals as mem entries with type=goal.

Memory & skills

ScriptPurpose
memFile-based memory store (markdown + YAML frontmatter). mem add --type TYPE <text>, mem search <query>, mem list, mem show <name>, mem forget <name>, mem edit <name> <text>.
skillsSkill management. skills install <src>, skills show <name>, skills promote <name> (to kernel), skills search <query>, skills remote add <path>.

Trajectory & context

ScriptPurpose
trajTrajectory operations (single-file and tree). Uses TRAJ_DIR + TRAJ_ID. traj new, traj append, traj tail, traj cat, traj fork, traj merge, traj show, traj list, traj root. show is unified: pass any ID (trajectory or step) and it searches all files in traj_dir.
contextReads traj, outputs a JSON messages array for llm -M. Maps step types to assistant/user roles. Key flags: --traj_dir, --tail N, --head N, --max-bytes, --pin <step_id>.

File utilities

ScriptPurpose
viewRead files with line numbers. view FILE [START[:END]].
globGit-aware glob matching sorted by mtime. glob PATTERN [DIR] [--limit N].
subExact-string substitution in files. sub FILE OLD NEW [--replace-all].
putAtomic file write from stdin. echo content | put FILE [--force].

Docker sandboxing

ScriptPurpose
shellm-dockerConstrained Docker facade for sandboxed execution. run, build, ps, logs, rm.
shellm-docker-brokerHost-side broker that manages Docker containers for sandboxed shellm envs.
shellm-explore(Not covered here — run exploration tool.)

Key environment variables

These are set by source .identities/<name>/activate:

VariablePoints to
IDENTITY_NAMEIdentity name (e.g. "andy")
IDENTITY_DIRIdentity root dir (e.g. .identities/andy)
MEM_DIR$IDENTITY_DIR/memories
SKILLS_DIR$IDENTITY_DIR/skills
SKILLS_KERNEL_DIR$IDENTITY_DIR/kernel
TRAJ_DIR$IDENTITY_DIR/trajectories
TRAJ_IDUUID of root trajectory
SHELLM_TRAJ_DIRTrajectory directory (default $HOME/.shellm/trajectories)
SHELLM_ENVS_DIREnv/container state directory
SHELLM_WORKDIRS_DIRWorking directories base
SHELLM_BROKER_DIRDocker broker state directory
THINK_MODELModel for think cycles
THINK_TICK_INTERVALSeconds between autonomous ticks

Other important vars (not identity-scoped):

VariablePurpose
SHELLM_MODELDefault model for shellm
ANTHROPIC_API_KEYAnthropic API key for llm
OPENAI_API_KEYOpenAI API key for llm

Identity directory layout

.identities/<name>/
  info.txt              name=, cwd=, created=, think_model=, interval=
  activate              source-able activation script
  core_identity_prompt.md  (optional) custom system prompt
  .env                  (optional) identity-specific env vars
  memories/             mem entries (markdown files)
  skills/               installed skills
    .skillsrc           skill remotes config
  kernel/               kernel skills (always loaded)
    mem/SKILL.md        bootstrapped mem skill
  .trajectories/        trajectory files
    trajectory.jsonl          main consciousness stream
    blobs/              spilled large fields
  .shellm/              shellm working state
  workdir/              working directory for think cycles

How a think cycle works

  1. think step loads the think prompt template from $IDENTITY_DIR/prompts/think.md
  2. Replaces {{identity_name}} and {{goals}} in the template
  3. Appends recent traj context (last N steps via traj tail)
  4. Calls shellm with this prompt — shellm executes bash, loops until FINAL
  5. Writes the resulting thought or action to traj
  6. If it was an action, forks a child branch, executes via shellm, merges back
  7. Dispatches thought processes (TPs) — each TP gets recent thoughts and can write to traj/mem

Thinkers

Thinkers live in thinkers/. Each has a step script, prompt.md, and subscriptions.jsonl. They subscribe to trajectory events and run autonomously via thinkers start:

  • main — core thought generator, produces stream-of-consciousness thoughts and actions
  • intentions-goals-creator — notices emerging goals, stores via mem
  • intentions-goals-enforcer — redirects when the stream drifts from goals
  • learning — extracts lessons from action/observation pairs
  • mind-wandering — surfaces associative memories
  • system-architecture — meta-cognitive self-modification
  • values-beliefs-creator — crystallizes values and beliefs
  • values-beliefs-enforcer — flags misalignment between behavior and values

Tips

  • All tools are designed to be composed via pipes and env vars
  • shellm is the only script that calls the LLM directly (via llm); everything else builds prompts and calls shellm
  • The context script is the bridge between traj (step log) and llm (messages array)
  • Skills are loaded on-demand via skills show <name>; kernel skills are always in context
  • To understand any script's full interface, run it with --help or read the source in bin/

よくある質問

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

Reference for the shellm system — recursive LLM shell, identity management, memory, skills, trajectory, and all CLI tools. Use when working on shellm itself, debugging agent behavior, or understanding how the pieces fit together.

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

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

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

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

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

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

Shellmで使えるAIモデルの数に制限はありますか?

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

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

はい。laude-instituteがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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