Agent skill

Migrate Core Code to Submodules

by tinyhumansai in tinyhumansai/openhuman

Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

GPL-3.0Auto-check passedDevelopment

Install Migrate Core Code to Submodules

skills CLI
$ npx skills add tinyhumansai/openhuman --skill migrate-to-submodule -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tinyhumansai/openhuman migrate-to-submodule --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tinyhumansai/openhuman.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/migrate-to-submodule .claude/skills/migrate-to-submodule && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
migrate-to-submodule
GitHub stars
41k
Token cost
~2.6k tokens
SKILL.md length
1,347 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
GPL-3.0

At a glance

Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

  • Works in 5 steps: Plan (freedom to decide the split) → Move the code, upstream first → Release the submodule → …
  • Moving code out of the OpenHuman core into a tiny submodule
  • SKILL.md covers How TinyBus fits, Step 1: Plan (freedom to…, Step 2: Move the code,… and Step 3: Release the submodule, plus 3 more sections
  • Calls cargo, git and gh

What it does

This is a maintainer workflow for the OpenHuman repository, where the host handles composition, config, security policy, approvals, lifecycle and adapters, and behavior that is not specific to OpenHuman belongs in the owning vendor tiny project. The skill drives one migration from start to finish: plan, move code and tests, ship the submodule release, re-pin the host. It defaults to executing and uses plan mode only for the split decision when the boundary is unclear or the move is large. Work happens in a worktree, never on main, and commits are not squashed.

The design hinges on TinyBus. A loadable module is a first-party cdylib that speaks the TinyBus module ABI, downloaded from a pinned release and attached to an in-process broker, and the core calls it through a typed contract rather than a Rust import. A migration usually has three pieces: the implementation in the module crate, new or changed methods and types in the bus crate with a bumped contract version, and a thin host adapter that forwards to the bus and keeps policy, config and credentials. Credentials never travel in tool arguments.

Not every submodule is a loadable module. Pure libraries such as tinyagents, tinytools and tinyvoice are linked through Cargo, so moving code into them needs only a gitlink bump, without a bus contract or digest re-pin. Module code must never depend on the host crate.

When your agent uses it

  • Moving code out of the OpenHuman core into a tiny submodule
  • Extracting a crate so the host keeps only composition and policy
  • Releasing a submodule and re-pinning the registry digests
  • Deciding where the boundary between host and module code falls

Example prompts

  • “Move the tokenizer helpers and their tests out of crates/openhuman-core into the matching vendor tiny library.”
  • “Upstream the retry logic into tinytools, release the submodule and re-pin the host.”
  • “Decide whether this scheduling code belongs in the host or in a module, and plan the move.”

Requirements

  • The OpenHuman repository with its vendored tiny submodules
  • Git worktree support

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Plan (freedom to decide the split)
  2. Move the code, upstream first
  3. Release the submodule
  4. Re-pin the host
  5. Open the OpenHuman PR

What it can do on your machine

Read from SKILL.md and the folder at commit 7578346. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo
    • git
    • gh
    • node
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, gh and pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Migrate Core Code to Submodules loads about 2.6k tokens when it runs. Until then it costs about 98 tokens; SKILL.md has 1,347 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~98
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from tinyhumansai/openhuman at commit 7578346, republished under its GPL-3.0 licence (© tinyhumansai). 1,347 words, ~2,597 tokens.

Download SKILL.mdSave it as .claude/skills/migrate-to-submodule/SKILL.md (or your agent's skills folder).
name
migrate-to-submodule
description
Plan and execute moving non-host-specific code (and its tests) from the OpenHuman core (crates/openhuman-core) into the vendored tiny* submodule libraries (vendor/tiny*), then release the submodule and re-pin the registry digests. Use when asked to "move X out of core", "upstream this into tinyfoo", "extract a crate", or to shrink the host to composition/policy only.

Migrate core code into a vendored submodule

OpenHuman is the host: composition, config, security policy, approvals, lifecycle, and adapters. Behavior that is not specific to OpenHuman belongs in the owning vendor/tiny* project (see "Submodule ownership" in CLAUDE.md). This skill drives one migration end to end: plan, move code + tests, ship the submodule release, re-pin the host.

Default to executing. Use plan mode only for step 1 (the split decision), and only when the boundary is genuinely ambiguous or the move is large. Work in a worktree (worktree <slug> from the repo root); never on main. Do not squash commits; the auto-commit hook checkpoints for you.

How TinyBus fits

TinyBus is the seam that makes this migration possible and shapes its design.

  • A loadable module is a first-party cdylib speaking the TinyBus module ABI, downloaded from a pinned GitHub release and attached to an in-process broker as a bus peer. The core calls it through a typed contract, not a Rust import.
  • Each module has a *-bus contract crate (names, methods, request/response types, contract version). It is synchronous and free of I/O and runtime deps. Never redeclare a contract type in OpenHuman; call members through the contract constants.
  • Because the module is a separate binary in the same process, anything you move must be reachable from the host through the bus contract. So a migration is usually three pieces: (a) implementation in the module crate, (b) new/changed methods and types in the *-bus crate (bump its contract version), (c) a thin host adapter under crates/openhuman-core/src/modules/<name>.rs (or the domain that calls it) that forwards to the bus and keeps policy/config/creds.
  • Data that cannot cross a boundary (task-local state, callbacks, secrets) is passed explicitly in the request, or served to the module as a host callback (see modules/memory_host.rs). Credentials never ride in tool arguments; they go through module init/reinit config.
  • Module code must not depend on openhuman. Host callbacks are traits/bus services the module defines and the host implements.
  • Not every submodule is a loadable module. Pure libraries (tinyagents, tinytools, tinychannels, tinyskills, tinyvoice, tinywallet, ...) are linked via Cargo; a move there needs no bus contract or digest re-pin, only a gitlink bump. Check the module's MODULE.md/README to know which kind it is.

Step 1: Plan (freedom to decide the split)

  1. Identify the code to move and read its callers. Use Explore/Grep on crates/openhuman-core/src/<domain>/.

  2. Classify every item as moves or stays:

    Moves to the submoduleStays in OpenHuman
    Algorithms, parsers, protocol/wire types, engines, generic tools, provider clients with no product identityConfig schema and loading, SecurityPolicy/approvals/sandbox decisions, credential resolution (resolve_backend_credential), Outcome<T> controllers and RPC schemas, event-bus publishing, product identity/attribution headers, Redux/Tauri glue
    Tests that exercise only the moved logicCross-module tests, host-adapter tests, JSON-RPC E2E, anything needing the mock backend or CoreContext
  3. Pick the destination using the ownership table in CLAUDE.md. Put the change in the repo that owns the behavior, not where it is easiest to land. Read the target's README.md, AGENTS.md, crate boundaries and *-bus crate first.

  4. You may create new crates in the submodule workspace when the code has no good home (e.g. a new tinyfoo-<thing> library crate, or a new *-bus if a new module needs its own contract). Prefer extending an existing crate. Only propose a brand-new submodule/repo when no existing project owns the concept; that one is a user decision, so stop and ask.

  5. Write the plan down briefly (in the PR description or docs/plans/): what moves, what stays, new crates, bus contract changes, dependency direction, and the release order. Skip a formal doc for a small, obvious move.

Dependency rules to check while planning: the core must not depend on tinyhumans-sdk (only openhuman-tinyhumans may); a module must not depend on openhuman; there is one tinytools copy (via vendor/tinyagents/); tool-call parsing/dialects/agent loop belong in tinyagents, not the host.

Step 2: Move the code, upstream first

Submodule PRs go first, raised against that repo's canonical upstream (tinyhumansai/<name>), never a fork. Follow the submodule's own AGENTS.md/ CONTRIBUTING.md (fmt, clippy -D warnings, per-file coverage gates such as 90% in tinysearch's release workflow).

  1. Branch inside the submodule at the recorded gitlink (the worktree helper already put every submodule on branch <slug>). Do not create nested worktrees.
  2. Move the implementation into the target crate with git mv-style history where practical. Keep public API minimal and documented; keep files under about 500 lines.
  3. Move tests with the code. Unit tests go beside the moved modules in the submodule. Add bus-contract tests in the *-bus crate for any new wire type. Tests that need the host stay in OpenHuman.
  4. If a bus contract changed, bump its version and update both sides in the same change set. Keep the contract synchronous and I/O-free.
  5. Replace the removed core code with the thin host adapter. Delete the old implementation and its old tests, do not leave a copy. Keep Outcome<T> controllers and RPC namespace strings (wire contracts) unchanged.
  6. Verify in the submodule: cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings, cargo test --all-features (plus the coverage gate if the repo has one).
  7. Open the submodule PR ready for review, babysit to green, merge. Unshallow submodule clones before merging upstream if needed.

If the change spans nested submodules (tinyagents/vendor/tinytools, tinymemory/vendor/tinycortex, ...), release/merge the innermost first and bump gitlinks outward.

Show full SKILL.md (486 more words)Show less

Step 3: Release the submodule

Only for loadable modules (a cdylib with a registry record). Pure Cargo libraries just need the merged commit.

  1. Trigger the submodule's Release workflow (workflow_dispatch on main, input bump: patch/minor/major/current), e.g. gh workflow run release.yml -R tinyhumansai/<name> -f bump=patch. It runs fmt/clippy/tests, builds per-platform archives, tags vX.Y.Z, and publishes a GitHub release with checksum.toml.
  2. Wait for it to finish (gh run watch). Confirm the release has one archive per host key the registry lists (macOS 15/26 arm64+x86_64, Ubuntu 22.04/24.04 x86_64+arm64, Windows) plus checksum.toml.
  3. Ask before triggering a release if the user has not already authorized it: it publishes tags and artifacts and is hard to undo.

Step 4: Re-pin the host

Modules are pinned twice, and both must describe the same release (scripts/ci/check-module-pins.mjs):

  1. Submodule gitlink: git -C vendor/<name> fetch --tags && git -C vendor/<name> checkout vX.Y.Z, then stage the gitlink in the superproject.
  2. Registry record: edit crates/openhuman-core/src/modules/registry/records_*.rs for the module: version, release_url, and every PlatformAsset archive name and sha256.
    • Copy digests verbatim from the published release's checksum.toml (gh release download vX.Y.Z -R tinyhumansai/<name> -p checksum.toml).
    • Never compute a digest from a local build. A locally recomputed hash agrees with itself no matter what was served, which defeats the pin.
    • At load time tinybus fetches the release's own checksum.toml, compares it with the host pin, hashes the archive, then extracts. A re-cut tag stops matching instead of silently replacing what runs in-process.
  3. Update anything else that names the version (for example the pinned archive version and sha256 in the CI workflows). If a module is deliberately off-tag, that needs an entry in scripts/ci/module-pin-exemptions.json with a reason. Prefer a fresh release over an exemption.
  4. Bump the OpenHuman-side contract crate reference if the *-bus version moved, and update crates/openhuman-core/src/modules/README.md and platform/about_app/ if the layout or user-visible capability changed.
  5. Verify:
    bash
    node scripts/ci/check-module-pins.mjs
    node scripts/ci/check-submodule-monotonic.mjs
    pnpm rust:layout
    cargo check --manifest-path Cargo.toml
    cargo test -p openhuman-cli --test <affected>   # or: pnpm debug rust <filter>
    Test with a feature both enabled and disabled if a gate moved. Never export CARGO_TARGET_DIR. Run long CI-style commands through scripts/ci-cancel-aware.sh.

Step 5: Open the OpenHuman PR

  • PR against upstream (tinyhumansai/openhuman), ready for review, not draft. If the submodule release is not out yet, say so and mark draft only then.
  • Body: what moved, what deliberately stayed and why, new crates, bus contract changes, links to the submodule PRs and release, and the digest source.
  • The gitlink must point at a commit that exists upstream (merged, tagged).
  • Hand off to pr-babysitter for CI and review threads.

Checklist

  • Every moved item is non-host-specific; host policy/config/creds stayed
  • Tests moved with the code; cross-module/host tests stayed
  • Bus contract updated and versioned; no redeclared contract types
  • Submodule PR merged upstream first; fmt/clippy/tests/coverage green
  • Release published with checksum.toml (loadable modules)
  • Gitlink and registry version/release_url/digests agree, digests copied from the release
  • check-module-pins and check-submodule-monotonic pass
  • Old core code and tests deleted, docs updated

© tinyhumansai, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/migrate-to-submodule of tinyhumansai/openhuman.

Open the folder on GitHubat commit 7578346

Compare with similar skills

Migrate Core Code to Submodules next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Migrate Core Code to Submodules compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Migrate Core Code to Submodules this skilltinyhumansai/openhuman41k—~2.6kAutomated safety check: PassGPL-3.0
Batch Orchestrationrohitg00/pro-workflow2.9k—~1.2kAutomated safety check: PassNone
Best Of N Solvingspencerpauly/awesome-cursor-skills841—~698Automated safety check: PassCC0-1.0
ast-grep Structural Searchcode-yeongyu/oh-my-openagent70k—~3.3kAutomated safety check: PassMIT
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT
RTK Rust Design Patternsrtk-ai/rtk83k—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • Batch Orchestration

    rohitg00/pro-workflow

    Decompose large-scale changes into independent units and spawn parallel agents in isolated worktrees.

    2.9k GitHub stars~1.2k tokensUpdated 8 days ago
    Agent WorkflowsAuto-check passed
  • Best Of N Solving

    spencerpauly/awesome-cursor-skills

    Solve a hard problem by trying multiple approaches in parallel using isolated git worktrees.

    841 GitHub stars~698 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • ast-grep Structural Search

    code-yeongyu/oh-my-openagent

    Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.

    70k GitHub stars~3.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.

    83k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Rust Path Types

    openinterpreter/openinterpreter

    Rules for choosing Rust types for filesystem paths in new Codex code, covering protocol types, internal use and model tool arguments.

    69k GitHub starsUsed in 2 repos~605 tokens
    DevelopmentAuto-check passed

Works with

Questions about Migrate Core Code to Submodules

What does Migrate Core Code to Submodules do?

Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host. This is a maintainer workflow for the OpenHuman repository, where the host handles composition, config, security policy, approvals, lifecycle and adapters, and behavior that is not specific to OpenHuman belongs in the owning vendor tiny project. The skill drives one migration from start to finish: plan, move code and tests, ship the submodule release, re-pin the host.

When should I use Migrate Core Code to Submodules?

Migrate Core Code to Submodules fits situations like: moving code out of the OpenHuman core into a tiny submodule; extracting a crate so the host keeps only composition and policy; releasing a submodule and re-pinning the registry digests; deciding where the boundary between host and module code falls.

How do I install Migrate Core Code to Submodules in Claude Code?

Run `npx skills add tinyhumansai/openhuman --skill migrate-to-submodule -a claude-code`. Or copy the skill folder (.claude/skills/migrate-to-submodule in tinyhumansai/openhuman) into .claude/skills/migrate-to-submodule in your project. Claude Code loads it when a task matches its description.

How do I install Migrate Core Code to Submodules in Codex?

Run `npx skills add tinyhumansai/openhuman --skill migrate-to-submodule -a codex`. Or copy the skill folder (.claude/skills/migrate-to-submodule in tinyhumansai/openhuman) into .agents/skills/migrate-to-submodule in your project. Codex loads it when a task matches its description.

Can I use Migrate Core Code to Submodules in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tinyhumansai/openhuman --skill migrate-to-submodule -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/migrate-to-submodule, .gemini/skills/migrate-to-submodule, .github/skills/migrate-to-submodule and .opencode/skills/migrate-to-submodule in your project.

What does Migrate Core Code to Submodules need to run?

Going by SKILL.md and its folder, Migrate Core Code to Submodules needs the command-line tools its instructions call (cargo, git, gh, node and pnpm). Our summary lists: The OpenHuman repository with its vendored tiny submodules; Git worktree support.

Does Migrate Core Code to Submodules access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Migrate Core Code to Submodules safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Migrate Core Code to Submodules use?

Migrate Core Code to Submodules is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Migrate Core Code to Submodules use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Migrate Core Code to Submodules?

Skills that share tags, products or a category with Migrate Core Code to Submodules: Batch Orchestration (rohitg00/pro-workflow, 2.9k stars), Best Of N Solving (spencerpauly/awesome-cursor-skills, 841 stars), ast-grep Structural Search (code-yeongyu/oh-my-openagent, 70k stars) and Rust Best Practices (farm-fe/farm, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Migrate Core Code to Submodules?

tinyhumansai (a GitHub organization) maintains it in tinyhumansai/openhuman, which has 41,472 GitHub stars. The repository was last updated on October 6, 2026.

Source: tinyhumansai/openhuman on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.