Atomic can help you create packages. Ask it to bundle your extensions, skills, prompt templates, or themes.
Atomic Packages
Atomic packages bundle extensions, skills, prompt templates, themes, and workflow definitions so you can share them through npm or git. Declare resources inpackage.json under the atomic key, or use conventional directories.
Table of Contents
Install and Manage
Security: Atomic packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages.
atomic update can update the Atomic CLI installation. To uninstall Atomic itself, see Quickstart.
Self-update resolves an exact advertised package/version target and installs that pinned spec, so the update cannot drift to a newer registry release during installation. Any release note supplied by the update service is shown before installation. Atomic only updates installations it can verify are writable and managed by the detected global package manager; otherwise it prints a manual command. On Windows, loaded native dependencies are temporarily quarantined during replacement and stale quarantine directories are cleaned on later update attempts.
By default, install and remove write to user settings (~/.atomic/agent/settings.json). Use -l to write to project settings (.atomic/settings.json; legacy .pi/settings.json is also read) instead. Project settings can be shared with your team, and Atomic installs any missing packages automatically on startup after the project is trusted.
To try a package without installing it, use --extension or -e. This installs to a temporary directory for the current run only:
-e <dir> also borrows project-local Atomic resources under <dir>/.atomic, legacy <dir>/.pi, and <dir>/.agents/skills when present. Because borrowed extensions and workflows can execute code, Atomic resolves trust for that extension source before loading those borrowed project-local resources.
Workflows discovered through -e keep that same trusted resource set when they create child stage sessions. Stage agents get fresh resource loaders seeded from the parent snapshot, so package tools/extensions, subagents and agent definitions, skills, prompt templates, themes, workflows, and trusted borrowed project-local resources remain available in workflow stages unless the stage supplies its own explicit resourceLoader.
Package Sources
Atomic accepts three source types in settings andatomic install.
npm
- Versioned specs are pinned and skipped by package updates (
atomic update --extensions,atomic update --all). - User installs use the configured npm-compatible package-manager command (npm by default) and resolve from the managed Atomic npm area.
- Project installs go under
.atomic/npm/(legacy.pi/npm/remains a compatibility fallback). - Set
npmCommandinsettings.jsonto pin npm package lookup and install operations to a specific wrapper command such asmiseorasdf.
git
- Without
git:prefix, only protocol URLs are accepted (https://,http://,ssh://,git://). - With
git:prefix, shorthand formats are accepted, includinggithub.com/user/repoandgit@github.com:user/repo. - HTTPS and SSH URLs are both supported.
- SSH URLs use your configured SSH keys automatically (respects
~/.ssh/config). - For non-interactive runs (for example CI), you can set
GIT_TERMINAL_PROMPT=0to disable credential prompts and setGIT_SSH_COMMAND(for examplessh -o BatchMode=yes -o ConnectTimeout=5) to fail fast. - Refs are pinned tags or commits.
atomic update --extensionsandatomic update --alldo not move them to newer refs, but they do reconcile an existing clone to the configured ref. - Use
atomic install git:host/user/repo@new-refto update settings and move an existing package to a new pinned ref. - Cloned to
~/.atomic/agent/git/<host>/<path>(global) or.atomic/git/<host>/<path>(project; legacy.pi/git/remains a compatibility fallback). - When reconciliation changes the checkout, Atomic resets and cleans the clone, then runs the configured npm-compatible install command if
package.jsonexists.
Local Paths
-e may also expose .atomic/.pi project-local resources and .agents/skills after the extension source is trusted.
Creating an Atomic Package
Add an app manifest topackage.json or use conventional directories. The manifest key is the configured app name (atomic here, from atomicConfig.name; legacy piConfig.name is also read). The legacy pi key remains supported as a backwards-compatible shim. Include the atomic-package keyword for discoverability.
!exclusions.
Gallery Metadata
The package gallery currently recognizes legacypi-package metadata, while new Atomic packages should also include atomic-package. Add video or image fields to show a preview:
- video: MP4 only. On desktop, autoplays on hover. Clicking opens a fullscreen player.
- image: PNG, JPEG, GIF, or WebP. Displayed as a static preview.
Package Structure
Convention Directories
If no app manifest (atomic, or legacy pi) is present, Atomic auto-discovers resources from these directories:
extensions/loads.tsand.jsfilesskills/recursively findsSKILL.mdfolders and loads top-level.mdfiles as skillsprompts/loads.mdfilesthemes/loads.jsonfilesworkflows/loads workflow SDK files (.ts,.js,.mjs,.cjs);workflow/is also accepted as a singular alias. Workflow files shouldimport { workflow } from "@bastani/workflows", importTypefromtypebox, and export theworkflow({ ... })result. TypeScript package authors do not need a hand-authored.d.ts, adeclare moduleshim, or atsconfigpathsalias for the SDK import — the SDK types ship with@bastani/atomic. A package that also imports@bastani/atomicpicks them up automatically; a pure workflow-only package adds one opt-in line (compilerOptions.types: ["@bastani/atomic/workflows/ambient"]or a/// <reference types="@bastani/atomic/workflows/ambient" />directive). See the workflow SDK typing guidance under Programmatic Usage in the workflows guide.
atomic.workflows / legacy pi.workflows is omitted, Atomic still checks conventional workflows/ and workflow/ directories.
Dependencies
Third-party runtime dependencies belong independencies in package.json. Dependencies that do not register extensions, skills, prompt templates, themes, or workflows also belong in dependencies. When Atomic installs a package from npm or git, it runs the configured npm-compatible install command, so those dependencies are installed automatically.
Atomic bundles core packages for extensions and skills. If you import any of these, list them in peerDependencies with a "*" range and do not bundle them: @earendil-works/pi-ai, @earendil-works/pi-agent-core, @bastani/atomic, @earendil-works/pi-tui, typebox.
Workflow packages should author workflow files with import { workflow } from "@bastani/workflows", import { Type } from "typebox", and export definitions produced by workflow({ ... }). Do not use the removed runWorkflow object-form API, and do not hand-roll objects with __piWorkflow: true; discovery accepts only definitions minted by workflow({ ... }). @bastani/workflows is not a separate npm package: its types resolve through @bastani/atomic, so list @bastani/atomic and typebox in peerDependencies. A pure workflow-only package also adds the one-line ambient opt-in noted above; a package that imports @bastani/atomic elsewhere picks the types up automatically.
Package-authored workflows should follow the same guiding principles as project workflows mentioned in docs/workflows.md.
Other Atomic packages must be bundled in your tarball. Add them to dependencies and bundledDependencies, then reference their resources through node_modules/ paths. Atomic loads packages with separate module roots, so separate installs do not collide or share modules.
Example:
Package Filtering
Filter what a package loads using the object form in settings:+path and -path are exact paths relative to the package root.
- Omit a key to load all of that type.
- Use
[]to load none of that type. !patternexcludes matches.+pathforce-includes an exact path.-pathforce-excludes an exact path.- Filters layer on top of the manifest. They narrow down what is already allowed.
Enable and Disable Resources
Useatomic config to enable or disable extensions, skills, prompt templates, and themes. It starts in global settings (~/.atomic/agent/settings.json); press Tab to switch global/project scope. Use atomic config -l to start in project overrides (.atomic/settings.json) with inherited global resources dimmed. Workflow package filters can be configured with workflows patterns.
Scope and Deduplication
Packages can appear in both global and project settings. The project entry normally wins. A project entry withautoload: false instead acts as a delta over the global entry: it starts with no newly auto-discovered resources while explicit include/exclude patterns adjust the inherited package resources. Identity is determined by:
- npm: package name
- git: repository URL without ref
- local: resolved absolute path