Logotipo de Shellm

Shellm

OrganizaciónPopular
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

Descripción general

Editorlaude-institute
Repositorioheadlong
Nombre de la habilidadshellm
Estrellas
1.2K
Forks
127
Archivos incluidos
Solo instrucciones
LicenciaApache-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por laude-institute en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Shellm en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/laude-institute/headlong/tree/main/skills/shellm
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

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
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Shellm en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Shellm automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Shellm no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

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/

Preguntas frecuentes

¿Qué hace la habilidad de IA 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.

¿Por qué usar Shellm en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Shellm está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Shellm en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/laude-institute/headlong/tree/main/skills/shellm. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Shellm?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Shellm?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Shellm con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Shellm?

Sí. laude-institute la ha publicado en GitHub bajo la licencia Apache-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇