CLIConcepts

Resources

The atomic unit HarnessTap scans, stores, composes, and re-emits.

A resource is the atomic unit HarnessTap scans, stores, composes, and re-emits. Skills, instructions, rules, MCP servers, hooks, agents, commands, and plugin pins are all resources in the canonical library.

Context vs environment resources

HarnessTap separates what the model sees from how it runs.

Context-side material resources

These are scanned from project and home harness files, curated in layers, and written back during apply:

TypeExamples on disk
instructionsAGENTS.md, CLAUDE.md, .windsurfrules, .github/copilot-instructions.md
skillsSKILL.md trees under harness-native skill directories
rules.cursor/rules/*.mdc, .claude/rules/, .kiro/steering/, …
mcpMCP server definitions from harness MCP config files
permissionsAllow/deny patterns (Claude Code and Codex settings)
hooksHook event definitions from settings or hooks.json
agentsAgent manifest files under harness agents/ directories
commandsStatic command definitions (markdown, TOML, or manifest pointers)

Layer composition attachments

On top of material resources, layers can reference:

AttachmentRole
plugin_pinLazy link to a host marketplace or local plugin; materializes after resource sync or layer apply --sync-plugins
layerNested layer reference expanded depth-first at apply time

Environment resources

Environments carry how values that override matching layer resources during apply:

TypeRole
env_varPlain environment variable key/value pairs
model_configDefault model and provider selection
permissionsRuntime permission overrides
secret_refIndirection to secrets (exported as refs, not plaintext)

See the full harness matrix — which types each harness supports — in Supported harnesses. For env vars, secret refs, MCP token switching, and OAuth limits, see Environments.

Scan and import

scan detects supported harness files in a repository and imports them into the canonical library. init also scans registered platform default folders in your home directory (e.g. ~/.claude/, ~/.codex/).

ht init --main codex --aliases claude-code,cursor
ht scan .
ht resource list
ht resource list --search helper          # non-interactive filter
ht resource show skill:research-helper

scan automatically merges repo-root plugin trees (.claude-plugin/, .cursor-plugin/, .codex-plugin/, .github/plugin/) with harness project files when a recognized manifest is present.

Install skills from a remote package without a prior scan:

ht add owner/repo --skill my-skill

Canonical SQLite library

Imported resources live in ~/.harnesstap/harnesstap.db alongside plugins, environments, layers, tracked projects, and snapshots. The database is the single source of truth for composition — on-disk harness files are materialized views produced by apply, mirror, or profile use.

Key resource commands:

ht resource list [--format json]
ht resource show <selector>
ht resource sync <plugin-pin-selector> [--force]
ht resource delete <selector>

Use --format json for scripting. Interactive resource list opens a filter overlay; see Interactive UX. Human list tables show bare names in the NAME column and plugin or package paths in NAMESPACE; compose with name@namespace selectors as documented in the command reference.

From resources to layers

Resources alone are not applied to projects. You group them into plugins and layers, then apply the layer:

ht layer create my-setup
ht layer edit my-setup --add research-helper --type skill
ht layer edit my-setup --add shared-rules --type rule
ht layer apply my-setup --project . --harness claude-code,cursor

layer from-project is a shortcut that scans a repository and promotes imported resources into a new layer in one step.

Plugin resources

Marketplace plugins import as plugin_pin resources. Sync resolves the plugin tree into child resources:

ht layer edit my-setup --add plugin_pin:formatter@my-marketplace --version "^2.1.0"
ht resource sync plugin_pin:formatter@my-marketplace
ht resource show plugin_pin:formatter@my-marketplace

Claude Code and Cursor have native plugin install/sync providers. Other harnesses may import plugin manifest metadata without full install-tree fidelity — see Portability limits.

Portability notes

Most static, file-based resources round-trip faithfully across harnesses. Some surfaces are runtime-only or host-specific (hooks with ${*_PLUGIN_ROOT}, OpenCode server plugins, instruction-only skill emission). HarnessTap imports metadata where possible but does not claim full fidelity for every case.

Before relying on cross-harness apply, review Portability limits and the per-harness matrix in Supported harnesses.