obsidian-multi-env-setup
Configure multiple Obsidian environments for development, testing, and production. Use when managing separate vaults, testing plugin versions, or establishing a proper development workflow with isolated environments. Trigger with phrases like "obsidian environments", "obsidian dev vault", "obsidian testing setup", "multiple obsidian vaults".
Best use case
obsidian-multi-env-setup is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Configure multiple Obsidian environments for development, testing, and production. Use when managing separate vaults, testing plugin versions, or establishing a proper development workflow with isolated environments. Trigger with phrases like "obsidian environments", "obsidian dev vault", "obsidian testing setup", "multiple obsidian vaults".
Teams using obsidian-multi-env-setup should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/obsidian-multi-env-setup/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How obsidian-multi-env-setup Compares
| Feature / Agent | obsidian-multi-env-setup | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Configure multiple Obsidian environments for development, testing, and production. Use when managing separate vaults, testing plugin versions, or establishing a proper development workflow with isolated environments. Trigger with phrases like "obsidian environments", "obsidian dev vault", "obsidian testing setup", "multiple obsidian vaults".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Obsidian Multi-Environment Setup
## Overview
Configure separate development, testing, and production vaults for Obsidian plugin work. Covers vault templates for team onboarding, environment-specific plugin settings, sync strategies, and `.obsidian/` directory management across environments.
## Prerequisites
- Obsidian desktop app installed
- Node.js 18+ and npm/pnpm for plugin builds
- Git for version control (recommended)
- Basic understanding of symlinks and file system operations
## Instructions
### Step 1: Create the Environment Structure
Set up three isolated vaults -- dev, test, and prod:
```bash
# Base directory for all environments
mkdir -p ~/obsidian-envs/{dev,test,prod}
# Dev vault: your working vault with symlinked plugin source
mkdir -p ~/obsidian-envs/dev/.obsidian/plugins/your-plugin
mkdir -p ~/obsidian-envs/dev/sandbox # scratch notes for testing
# Test vault: clean environment for QA
mkdir -p ~/obsidian-envs/test/.obsidian/plugins/your-plugin
mkdir -p ~/obsidian-envs/test/test-data
# Prod vault: mirrors real user setup
mkdir -p ~/obsidian-envs/prod/.obsidian/plugins/your-plugin
```
### Step 2: Symlink Plugin Source for Development
In the dev vault, symlink your plugin's build output so changes appear immediately:
```bash
# Remove the empty plugin directory in dev
rm -rf ~/obsidian-envs/dev/.obsidian/plugins/your-plugin
# Symlink to your plugin's repo (contains manifest.json, main.js, styles.css)
ln -s /path/to/your-plugin ~/obsidian-envs/dev/.obsidian/plugins/your-plugin
```
For hot reload during development, use the [Hot Reload plugin](https://github.com/pjeby/hot-reload):
```bash
# Clone hot-reload into dev vault's plugins
git clone https://github.com/pjeby/hot-reload.git \
~/obsidian-envs/dev/.obsidian/plugins/hot-reload
```
Then enable both your plugin and hot-reload in `.obsidian/community-plugins.json`:
```json
["your-plugin", "hot-reload"]
```
### Step 3: Environment-Specific Plugin Settings
Each vault gets its own `data.json` for your plugin. Create a config factory:
```typescript
// config/environments.ts
interface PluginConfig {
debugMode: boolean;
logLevel: 'debug' | 'info' | 'warn' | 'error';
apiEndpoint: string;
featureFlags: Record<string, boolean>;
}
const ENV_CONFIGS: Record<string, Partial<PluginConfig>> = {
dev: {
debugMode: true,
logLevel: 'debug',
apiEndpoint: 'http://localhost:3000',
featureFlags: { experimentalEditor: true, betaSync: true },
},
test: {
debugMode: true,
logLevel: 'info',
apiEndpoint: 'https://staging.api.example.com',
featureFlags: { experimentalEditor: true, betaSync: false },
},
prod: {
debugMode: false,
logLevel: 'error',
apiEndpoint: 'https://api.example.com',
featureFlags: {},
},
};
export function detectEnvironment(vaultPath: string): string {
if (vaultPath.includes('obsidian-envs/dev')) return 'dev';
if (vaultPath.includes('obsidian-envs/test')) return 'test';
return 'prod';
}
export function getConfig(env: string): PluginConfig {
const defaults: PluginConfig = {
debugMode: false,
logLevel: 'error',
apiEndpoint: '',
featureFlags: {},
};
return { ...defaults, ...ENV_CONFIGS[env] };
}
```
Use it in your plugin's `onload()`:
```typescript
async onload() {
const vaultPath = (this.app.vault.adapter as any).basePath;
const env = detectEnvironment(vaultPath);
const config = getConfig(env);
console.log(`[your-plugin] Running in ${env} mode`);
if (config.debugMode) {
// Register debug commands only in dev/test
this.addCommand({
id: 'dump-state',
name: 'Dump Plugin State (debug)',
callback: () => console.log(JSON.stringify(this.settings, null, 2)),
});
}
}
```
### Step 4: Vault Templates for Team Onboarding
Create a template vault that new team members clone:
```
vault-template/
.obsidian/
app.json # Standard app settings
appearance.json # Theme and font settings
hotkeys.json # Team-standard keybindings
community-plugins.json # Approved plugin list
plugins/ # Pre-configured plugin data.json files
dataview/data.json
templater-obsidian/data.json
templates/ # Note templates (daily, meeting, project)
daily.md
meeting.md
project-kickoff.md
README.md # Vault orientation guide
```
Script to provision a new team member's vault:
```bash
#!/bin/bash
# provision-vault.sh <username> <role>
USERNAME=$1
ROLE=${2:-editor}
VAULT_DIR=~/obsidian-team-vaults/$USERNAME
cp -r vault-template "$VAULT_DIR"
# Inject user-specific settings
cat > "$VAULT_DIR/.obsidian/plugins/rbac-plugin/data.json" <<EOF
{
"userEmail": "${USERNAME}@company.com",
"role": "${ROLE}"
}
EOF
echo "Vault provisioned at $VAULT_DIR for $USERNAME ($ROLE)"
```
### Step 5: Sync Strategies
Choose based on your team's needs:
**Git sync** (best for plugin developers):
```bash
cd ~/obsidian-envs/prod
git init
cat > .gitignore <<'EOF'
.obsidian/workspace.json
.obsidian/workspace-mobile.json
.obsidian/cache
.trash/
EOF
git add -A && git commit -m "Initial vault state"
```
Pair with the [Obsidian Git plugin](https://github.com/denolehov/obsidian-git) for auto-commit/push on a schedule.
**Obsidian Sync** (best for non-technical teams): Configure in Settings > Sync. Selective sync lets you exclude `.obsidian/plugins/` on certain devices to prevent config conflicts.
**iCloud/Dropbox** (simplest, most fragile): Place the vault inside the sync folder. Avoid editing on multiple devices simultaneously. `.obsidian/` conflicts are common -- keep a backup.
### Step 6: Managing .obsidian/ Across Environments
The `.obsidian/` directory holds all configuration. Key files and their sync behavior:
| File | Sync across envs? | Why |
|------|--------------------|-----|
| `app.json` | Yes | Core settings should be consistent |
| `appearance.json` | Yes | Theme consistency |
| `community-plugins.json` | Per-env | Dev may have debug plugins |
| `hotkeys.json` | Yes | Muscle memory matters |
| `workspace.json` | Never | Layout is per-device |
| `plugins/*/data.json` | Per-env | Settings differ by environment |
Script to sync safe configs from prod to other environments:
```bash
#!/bin/bash
# sync-config.sh -- copy safe configs from prod to dev/test
SAFE_FILES="app.json appearance.json hotkeys.json"
SRC=~/obsidian-envs/prod/.obsidian
for env in dev test; do
DST=~/obsidian-envs/$env/.obsidian
for f in $SAFE_FILES; do
cp "$SRC/$f" "$DST/$f" 2>/dev/null && echo "Synced $f to $env"
done
done
```
## Output
- Three isolated vaults (dev/test/prod) with independent plugin configurations
- Symlinked plugin source in dev vault with hot reload
- Environment detection and config switching in plugin code
- Vault template and provisioning script for team onboarding
- Sync strategy configured (Git, Obsidian Sync, or cloud)
- `.obsidian/` management scripts for consistent cross-env config
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Symlink not working | Permission denied on Windows | Run terminal as Administrator, or use `mklink /D` |
| Plugin not appearing in dev vault | Symlink target missing `manifest.json` | Run `npm run build` first; ensure `main.js` exists |
| Wrong config loaded | Vault path detection failed | Check `basePath` matches expected pattern |
| Hot reload not triggering | `.hotreload` file missing | Create empty `.hotreload` in plugin directory |
| Sync conflict on `workspace.json` | Multiple devices open same vault | Add `workspace.json` to `.gitignore` |
| Test vault has stale data | Forgot to refresh after plugin update | Copy latest build artifacts: `manifest.json`, `main.js`, `styles.css` |
## Examples
**Solo developer workflow**: Dev vault symlinked to plugin repo with hot reload. Test vault gets `npm run build` output copied in manually for final QA. Prod vault is your daily-driver vault with the released version from BRAT or community plugins.
**Team onboarding**: Run `provision-vault.sh alice editor` to create Alice's vault from the team template. She opens it in Obsidian, and all approved plugins with team-standard settings are pre-configured.
**CI testing across Obsidian versions**: Create a headless test vault with your plugin installed. Use `obsidian-cli` or Electron automation to open the vault, run plugin commands, and verify output. Repeat for each Obsidian version in your support matrix.
## Resources
- [Obsidian URI Protocol](https://help.obsidian.md/Extending+Obsidian/Obsidian+URI)
- [BRAT for Beta Testing](https://github.com/TfTHacker/obsidian42-brat)
- [Hot Reload Plugin](https://github.com/pjeby/hot-reload)
- [Obsidian Git Plugin](https://github.com/denolehov/obsidian-git)
## Next Steps
For monitoring and logging across environments, see `obsidian-observability`. For access control on shared vaults, see `obsidian-enterprise-rbac`.Related Skills
windsurf-multi-env-setup
Configure Windsurf IDE and Cascade AI across team members and project environments. Use when onboarding teams to Windsurf, setting up per-project Cascade configuration, or managing Windsurf settings across development, staging, and production contexts. Trigger with phrases like "windsurf team setup", "windsurf environments", "windsurf multi-project", "windsurf team config", "cascade rules per env".
webflow-multi-env-setup
Configure Webflow across development, staging, and production environments with per-environment API tokens, site IDs, and secret management via Vault/AWS/GCP. Trigger with phrases like "webflow environments", "webflow staging", "webflow dev prod", "webflow environment setup", "webflow config by env".
vercel-multi-env-setup
Configure Vercel across development, preview, and production environments with scoped secrets. Use when setting up per-environment configuration, managing environment-specific variables, or implementing environment isolation on Vercel. Trigger with phrases like "vercel environments", "vercel staging", "vercel dev prod", "vercel environment setup", "vercel env scoping".
veeva-multi-env-setup
Veeva Vault multi env setup for enterprise operations. Use when implementing advanced Veeva Vault patterns. Trigger: "veeva multi env setup".
vastai-multi-env-setup
Configure Vast.ai GPU cloud across dev, staging, and production environments. Use when isolating GPU pools per team, managing API key separation by env, or implementing spending controls per deployment tier. Trigger with phrases like "vastai environments", "vastai staging", "vastai dev prod", "vastai multi-env".
supabase-multi-env-setup
Configure Supabase across development, staging, and production with separate projects, environment-specific secrets, and safe migration promotion. Use when setting up multi-environment deployments, isolating dev from prod data, configuring per-environment Supabase projects, or promoting migrations through environments. Trigger: "supabase environments", "supabase staging", "supabase dev prod", "supabase multi-project", "supabase env config", "database branching".
speak-multi-env-setup
Configure Speak across dev, staging, and production with separate API keys and mock modes. Use when implementing multi env setup, or managing Speak language learning platform operations. Trigger with phrases like "speak multi env setup", "speak multi env setup".
snowflake-multi-env-setup
Configure Snowflake across dev, staging, and production with account-level isolation, zero-copy clones, and environment-specific RBAC. Trigger with phrases like "snowflake environments", "snowflake staging", "snowflake dev prod", "snowflake clone", "snowflake environment setup".
windsurf-workspace-setup
Initialize Windsurf workspace with project-specific AI rules. Activate when users mention "create windsurfrules", "setup workspace", "configure project ai", "initialize windsurf workspace", or "migrate to windsurf". Handles workspace configuration and team standardization. Use when working with windsurf workspace setup functionality. Trigger with phrases like "windsurf workspace setup", "windsurf setup", "windsurf".
windsurf-multi-file-editing
Manage multi-file edits with Cascade coordination. Activate when users mention "multi-file edit", "edit multiple files", "cross-file changes", "refactor across files", or "batch modifications". Handles coordinated multi-file operations. Use when working with windsurf multi file editing functionality. Trigger with phrases like "windsurf multi file editing", "windsurf editing", "windsurf".
shopify-multi-env-setup
Configure Shopify apps across development, staging, and production environments with separate stores, API credentials, and app instances. Trigger with phrases like "shopify environments", "shopify staging", "shopify dev vs prod", "shopify multi-store", "shopify environment setup".
salesforce-multi-env-setup
Configure Salesforce across Developer, Sandbox, and Production environments with proper org management. Use when setting up multi-environment deployments, configuring per-environment credentials, or implementing sandbox-to-production promotion flows. Trigger with phrases like "salesforce environments", "salesforce sandbox", "salesforce dev prod", "salesforce org management", "salesforce sandbox types".