Timesharing logo

Timesharing

Community
roerohan
timesharing

Multiplexes one agent's attention across independent long-running external processes while preserving one reasoning context. Use for concurrent tests, builds, servers, watchers, REPLs, benchmarks, downloads, and other latency-bearing shell work; never use it to spawn or substitute subagents.

Overview

Publisherroerohan
Repositoryskills
Skill nametimesharing
Stars
29
Forks
1
Bundled files
3
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.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

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

Installation

Install the Timesharing 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/roerohan/skills/tree/main/timesharing
  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/roerohan/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/timesharing .claude/skills/timesharing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Timesharing 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 Timesharing 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 Timesharing 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.

Timesharing

Timesharing lets one agent preserve one coherent reasoning context while opportunistically multiplexing its attention across independent external work.

The AI's reasoning stays serial. Only ordinary OS processes run concurrently. Never spawn a subagent, delegate interpretation, or create another AI context for this workflow.

Central Rule

Never block on an independent long-running process when useful independent work exists.

Treat yourself as a cooperative scheduler:

  1. Identify a command whose result is not immediately required.
  2. Start it asynchronously and record its purpose, provenance, dependency, and revisit point.
  3. Continue concrete independent work immediately.
  4. Revisit at a natural boundary, not through busy polling.
  5. Interpret the result in the same context that launched it.

Use a small number of jobs, usually 2-4. The goal is to hide external latency without losing cognitive coherence, not to maximize concurrency.

Decide

Timeshare when judgment says all of these are true:

  • The command may take meaningful time or must remain alive.
  • Its result is not required for the next reasoning step.
  • Useful independent work exists, or later interaction/incremental output matters.
  • Its inputs are stable enough that the run will remain useful.

Typical jobs include test suites, builds, installs, Docker builds, servers, watchers, long scripts, migrations, data/model processing, downloads, benchmarks, integration tests, REPLs, and debuggers.

Run trivial or immediately blocking commands normally: pwd, git status, small reads, quick searches, and commands whose answer determines the very next step. Use judgment, not a hard timing threshold.

Schedule

Before launch, form a tiny dependency graph. Only overlap genuinely independent work. Do not start a run whose inputs are likely to be invalidated immediately.

Maintain a lightweight in-context ledger:

text
JOB       PURPOSE             LOCATION                 STATE    DEPENDS/REVISIT
ts-tests  validate parser     tmux:ts-repo-tests-...   running  after serializer edit
ts-api    integration target  tmux:ts-repo-api-...     persistent before requests

Know for each job: what and why, location, state, expected result, dependents, revisit point, and code/input provenance. The helper persists operational metadata; the purpose and dependency graph remain in this agent's unified mental model.

Natural scheduling points include after an edit, before a dependent decision, after another job completes, when no independent work remains, before final response, or when input may be needed. Do not repeatedly check a job without useful work between checks. If nothing useful remains, bounded waiting or inspection is honest and appropriate.

Use The Interface

The bundled script prefers isolated tmux sessions and falls back to background processes when tmux is unavailable. Run it by absolute path when necessary:

bash
timesharing/scripts/timeshare.sh start tests \
  --purpose 'validate parser fix' --dependency 'review after serializer edit' \
  --provenance 'parser change A' -- npm test
timesharing/scripts/timeshare.sh start api --persistent \
  --purpose 'serve integration target' -- npm run dev
timesharing/scripts/timeshare.sh list
timesharing/scripts/timeshare.sh status tests
timesharing/scripts/timeshare.sh inspect tests --lines 80
timesharing/scripts/timeshare.sh send repl --literal 'value.inspect' --enter
timesharing/scripts/timeshare.sh interrupt api
timesharing/scripts/timeshare.sh stop api
timesharing/scripts/timeshare.sh cleanup

Names become lowercase ts-* job IDs. The tmux session also includes a repository name and workspace hash, preventing cross-repository collisions. Existing live jobs are never silently replaced. Resolve and inspect exact registered IDs before sending input, interrupting, or stopping anything.

For detailed operations, states, fallback behavior, and failures, read references/operations.md. For scheduling examples, read references/examples.md. Load the lower-level tmux skill only when pane layout or tmux-specific mechanics beyond this interface are needed.

Interpret State And Output

The lifecycle is:

text
planned -> running -> completed | failed | waiting | persistent
        -> consumed -> cleaned up

The helper detects running, completed, failed, persistent, and unexpectedly terminated. For interactive jobs, infer waiting versus computing from the recent tail and prompt. Infer a stall only from elapsed time, unchanged output, expected behavior, and process state; do not guess from silence alone.

Inspect recent output first. Increase --lines only when the error needs earlier context. Never flood this context with whole logs by default. Treat a missing completion marker as unknown/unexpected termination, not success.

Before consuming a result, compare its launch provenance with current files/configuration. A run against state A does not validate later state B. Rerun relevant validation after material edits.

Interactive And Persistent Jobs

Mark servers/watchers with --persistent; continued execution is expected, not failure. Mark REPLs/debuggers with --interactive; tmux is required. Inspect the exact job before send, and send the least powerful input needed. Never send destructive keys to an uncertain target.

The shell fallback supports finite and persistent non-interactive commands, but not interactive input or durable terminal attachment. Report that limitation when fallback is used.

Finish

Before answering the user:

  • Inspect every important outstanding finite job.
  • Never claim success without a verified zero exit status.
  • Check that results still match the current code/input state.
  • State which requested services intentionally remain persistent.
  • Stop and clean disposable jobs you own; never kill uncertain or unrelated processes.
  • Preserve services the user explicitly asked to leave running.

Communicate only meaningful transitions: "Tests are running while I inspect the serializer" or "The build passed; integration tests are still running." Do not narrate every tmux command or status check.

Anti-Patterns

  • Subagent substitution: same agent launches a process; never spawn another AI to run or interpret it.
  • Fake concurrency: do useful work after launch; do not launch and immediately poll in a loop.
  • Context flooding: read a relevant tail, not 50,000 repeated log lines.
  • Excessive concurrency: prefer 2-4 purposeful jobs, not 14 vague experiments.
  • Stale validation: record what state ran and never apply an old result to newer changes.
  • Speculative overlap: do not run work whose inputs are still being rewritten.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Timesharing AI skill do?

Multiplexes one agent's attention across independent long-running external processes while preserving one reasoning context. Use for concurrent tests, builds, servers, watchers, REPLs, benchmarks, downloads, and other latency-bearing shell work; never use it to spawn or substitute subagents.

Why use Timesharing on TypingMind?

Because you install it once and use it with any model. Timesharing 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 Timesharing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/roerohan/skills/tree/main/timesharing. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Timesharing?

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 Timesharing?

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

Is the Timesharing AI skill free?

Yes. It is published on GitHub by roerohan 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 👇