Create asset sources
An asset source is a directory that organizes coding agent assets by type. nd supports three source types: local (a directory on disk), git (a cloned repository), and builtin (embedded in the nd binary). This guide explains how to structure your own local or git source.
Directory convention
nd discovers assets by looking for directories named after asset types:
my-assets/
├── skills/
│ ├── greeting/ # Directory asset
│ └── code-review/ # Directory asset
├── agents/
│ └── researcher.md # File asset
├── commands/
│ └── deploy-all.md # File asset
├── output-styles/
│ └── concise.md # File asset
├── rules/
│ └── no-emojis.md # File asset
├── context/
│ ├── go-project-rules/ # Folder-per-asset layout
│ │ ├── CLAUDE.md # Context file
│ │ └── _meta.yaml # Optional metadata
│ └── coding-standards/
│ └── CLAUDE.md
├── plugins/
│ └── my-plugin/ # Directory asset (not symlink-deployed)
└── hooks/
└── pre-commit/ # Directory assetNot every directory needs to be present. nd only discovers assets in directories that exist.
Asset types
| Type | Format | Deployable | Description |
|---|---|---|---|
skills | Directory | Yes | Multi-file skill definitions |
agents | File | Yes | Agent configuration files |
commands | File | Yes | Custom command definitions |
output-styles | File | Yes | Output formatting styles (requires manual settings.json registration) |
rules | File | Yes | Rule files for agent behavior |
context | Folder-per-asset | Yes | Context files (special deployment rules: see below) |
plugins | Directory | No | Plugin packages (uses export workflow, not symlinks) |
hooks | Directory | Yes | Hook definitions (requires manual settings.json registration) |
Context files
Context files have special deployment rules:
- Global scope: Deployed to the agent’s global directory (e.g.,
~/.claude/CLAUDE.md) - Project scope: Deployed to the project root directly (e.g.,
./CLAUDE.md), not inside.claude/ - Local files (
*.local.md): Deploy only at project scope
_meta.yaml
Context files can include a _meta.yaml sidecar for metadata:
description: "Project coding standards and conventions"
tags: ["standards", "conventions"]Manifest file
For sources that don’t follow the convention-based directory structure, create an nd-source.yaml manifest at the source root:
# nd-source.yaml
version: 1
paths:
skills:
- custom/path/to/skills
agents:
- my-agents
exclude:
- vendor/When an nd-source.yaml manifest is present, it overrides convention-based scanning entirely. nd falls back to convention-based discovery only when no manifest exists.
Publish your source
To share your asset source, push it to git:
cd my-assets
git init
git add .
git commit -m "Initial asset collection"
git remote add origin https://github.com/you/my-assets.git
git push -u origin mainOthers can add it with:
nd source add you/my-assets
# or
nd source add https://github.com/you/my-assets.gitnd clones git sources to ~/.config/nd/sources/. Sync them with nd sync --source <id>.
Remove a source
nd source remove <source-id>If assets from the source are currently deployed, nd asks whether to remove them, keep them as orphans, or cancel. nd prevents removal of the builtin source.
Warning:
nd source remove <id> --yesskips the interactive prompt and removes all deployed assets from that source without confirmation. This is a destructive operation — use it only in scripts or when you are certain you want a clean removal.