Tiamat
OrganizationComposeGears
Learn how to use Tiamat — a Compose Multiplatform navigation library. Covers destination basics, arguments and results, advanced navigation actions, generated graphs, ViewModel and retained state, custom layouts and transitions, and extensions.
Overview
- Repository
- ComposeGears/Tiamat
- Publisher
- ComposeGears
- Stars
- 263
- Forks
- 11
- Bundled files
- 35
- License
- Apache-2.0
- Updated
- Nov 13, 2026
Installation
tmp=$(mktemp -d)
git clone --depth 1 https://github.com/ComposeGears/Tiamat.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/.agents/skills/tiamat" ~/.claude/skills/tiamat
rm -rf "$tmp"tmp=$(mktemp -d)
git clone --depth 1 https://github.com/ComposeGears/Tiamat.git "$tmp"
mkdir -p ~/.codex/skills
cp -R "$tmp/.agents/skills/tiamat" ~/.codex/skills/tiamat
rm -rf "$tmp"Install the Tiamat agent skill from https://github.com/ComposeGears/Tiamat/tree/main/.agents/skills/tiamat into this project's skills folder.Instructions
Developer documentation
- Tiamat overview: Overview of the Tiamat navigation library — core concepts, API surface, and how to get started.
Recipes
Code examples showcasing common patterns.
Destination basics
- Simple screen: Create a screen with
navDestinationand wire it into aNavigationhost. - Navigate between screens: Perform forward and back navigation between destinations.
- Preview destinations: Render any destination inside a Compose
@PreviewwithTiamatPreview. - Global transition style: Override the default animation for an entire
Navigationhost.
Arguments and results
- Typed arguments: Declare a destination with required or optional typed args.
- Free args: Pass lightweight transient data with
freeArgs. - Serializable args: Use
NavData+@Serializablefor args that survive process death. - Back results: Pass typed results back to the previous destination.
Common UI
- Tab navigation: Tab navigation where each tab has its own independent back stack.
Advanced navigation actions
- Replace and pop-to-top: Use
replace,back(to=…), andpopToTopfor tab-style and flow navigation. - Per-call transitions: Override animations for a single navigation call.
- Route API: Build a multi-step back stack in one call or navigate by destination name.
- Edit nav stack: Arbitrary stack manipulation with
editNavStack. - Observe NavController state: Drive UI from reactive NavController state.
- NavController configuration: Apply a configuration callback at NavController creation time.
- Nested NavControllers: Navigate across nested NavController hierarchies.
Generated graph
- Graph setup and usage: Configure
TiamatGraph,@InstallIn, install in multiple graphs, and merge graphs.
ViewModel and state
- Screen-scoped ViewModel: Scope a ViewModel to a single screen.
- Shared ViewModel: Share a ViewModel across all destinations under a NavController.
- Retain: Retain objects across backward navigation with
retain {}. - Produce retained state: Coroutine-driven retained state with
produceRetainedState. - SavedStateHandle ViewModel: ViewModel with
SavedStateHandlefor process-death survival. - Custom save and restore state: Manually save and restore a NavController's state with
saveToSavedState().
Architecture
- Koin ViewModel: Use Koin's
koinViewModelwith Tiamat for dependency-injected ViewModels. - Hilt ViewModel: Use Hilt's
hiltViewModelwith Tiamat for dependency-injected ViewModels on Android.
Custom layouts and transitions
- NavigationScene basics: Full layout control with
NavigationScene. - Overlay destinations: Host dialogs, bottom sheets, and nested modal flows in a dedicated local overlay stack.
- Two-pane layout: List-detail / two-pane adaptive layout.
- Adaptive list-detail: Responsive layout that switches between single-pane and two-pane based on window size.
- Gesture transitions: Gesture-driven / seekable transitions with
TransitionController. - Shared-element transitions: Shared-element transitions with
LocalNavAnimatedVisibilityScope.
Deep links
- Deep link: Parse deep-link URIs into routes using pattern-based matching with
DeepLink.
Extensions
- Marker extensions: Attach metadata to destinations with
NavExtension. - Content extensions: Wrap destination content with
ContentExtensionand callentryContent()to render the screen.
Bundled files
references/guide/index.md4 KBreferences/guide/recipes/01-simple-screen.md867 Breferences/guide/recipes/02-navigate-between-screens.md769 Breferences/guide/recipes/03-preview-destinations.md976 Breferences/guide/recipes/04-global-transition-style.md750 Breferences/guide/recipes/05-typed-arguments.md2 KBreferences/guide/recipes/06-free-args.md858 Breferences/guide/recipes/07-serializable-args.md927 Breferences/guide/recipes/08-back-results.md864 Breferences/guide/recipes/09-tab-navigation.md3 KBreferences/guide/recipes/10-replace-and-pop-to-top.md2 KBreferences/guide/recipes/11-per-call-transitions.md973 Breferences/guide/recipes/12-route-api.md2 KBreferences/guide/recipes/13-edit-nav-stack.md778 Breferences/guide/recipes/14-observe-navcontroller-state.md2 KBreferences/guide/recipes/15-navcontroller-configuration.md2 KBreferences/guide/recipes/16-nested-navcontrollers.md543 Breferences/guide/recipes/17-graph-setup-and-usage.md3 KBreferences/guide/recipes/18-screen-scoped-viewmodel.md609 Breferences/guide/recipes/19-shared-viewmodel.md754 Breferences/guide/recipes/20-retain.md854 Breferences/guide/recipes/21-produce-retained-state.md960 Breferences/guide/recipes/22-savedstatehandle-viewmodel.md863 Breferences/guide/recipes/23-custom-save-restore-state.md2 KBreferences/guide/recipes/24-koin-viewmodel.md2 KBreferences/guide/recipes/25-hilt-viewmodel.md2 KBreferences/guide/recipes/26-navigationscene-basics.md2 KBreferences/guide/recipes/27-overlay-destinations.md4 KBreferences/guide/recipes/28-two-pane-layout.md2 KBreferences/guide/recipes/29-adaptive-list-detail.md5 KBreferences/guide/recipes/30-gesture-transitions.md923 Breferences/guide/recipes/31-shared-element-transitions.md2 KBreferences/guide/recipes/32-marker-extensions.md2 KBreferences/guide/recipes/33-content-extensions.md3 KBreferences/guide/recipes/34-deep-link.md4 KB
FAQ
What does Tiamat do?
Learn how to use Tiamat — a Compose Multiplatform navigation library. Covers destination basics, arguments and results, advanced navigation actions, generated graphs, ViewModel and retained state, custom layouts and transitions, and extensions.
Who made Tiamat?
ComposeGears (an organization) publishes it in the ComposeGears/Tiamat repository on GitHub.
Is Tiamat free?
Yes. Tiamat is open source, published by ComposeGears under the Apache-2.0 license.
What comes with Tiamat?
Its instructions and 35 files the agent reads only when a task needs them, such as references, examples or scripts.
Which agents can use Tiamat?
Any coding agent that reads SKILL.md files, including Claude Code, Codex, Cursor, GitHub Copilot and Gemini CLI. The agent loads the skill when a task matches its description.
What are agent skills?
An agent skill is a folder with a SKILL.md file: instructions that teach a coding agent how to do one kind of task, and optionally files it can read while it works. The agent keeps only the skill's name and description in mind and reads the rest when a task calls for it.
How are agent skills different from MCP servers?
An MCP server gives an agent new tools to call, code that runs somewhere and returns results. A skill gives it knowledge: how to approach a task with the tools it already has. Many agents use both.
How can my agent test my Android app?
Robomori lets coding agents create, start and control Android emulators and devices from one command, so they can install your app, take screenshots and check dark mode, font sizes and languages.