nav-init
Initialize Navigator documentation structure in a project. Auto-invokes when user says "Initialize Navigator", "Set up Navigator", "Create Navigator structure", or "Bootstrap Navigator".
What this skill does
# Navigator Initialization Skill
## Purpose
Creates the Navigator documentation structure (`.agent/`) in a new project, copies templates, and sets up initial configuration.
## When This Skill Auto-Invokes
- "Initialize Navigator in this project"
- "Set up Navigator documentation structure"
- "Create .agent folder for Navigator"
- "Bootstrap Navigator for my project"
## What This Skill Does
1. **Checks if already initialized**: Prevents overwriting existing structure
2. **Creates `.agent/` directory structure**:
```
.agent/
├── DEVELOPMENT-README.md
├── .nav-config.json
├── tasks/
├── system/
├── sops/
│ ├── integrations/
│ ├── debugging/
│ ├── development/
│ └── deployment/
└── grafana/
├── docker-compose.yml
├── prometheus.yml
├── grafana-datasource.yml
├── grafana-dashboards.yml
├── navigator-dashboard.json
└── README.md
```
3. **Copies templates**: DEVELOPMENT-README.md, config, Grafana setup
5. **Auto-detects project info**: Name, tech stack (from package.json if available)
6. **Updates CLAUDE.md**: Adds Navigator-specific instructions to project
7. **Creates .gitignore entries**: Excludes temporary Navigator files
## Execution Steps
### 1. Check if Already Initialized
```bash
if [ -d ".agent" ]; then
echo "✅ Navigator already initialized in this project"
echo ""
echo "To start a session: 'Start my Navigator session'"
echo "To view documentation: Read .agent/DEVELOPMENT-README.md"
exit 0
fi
```
### 2. Detect Project Information
Read `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, or similar to extract:
- Project name
- Tech stack
- Dependencies
**Fallback**: Use current directory name if no config found.
### 3. Create Directory Structure
Use Write tool to create:
```
.agent/
.agent/tasks/
.agent/system/
.agent/sops/integrations/
.agent/sops/debugging/
.agent/sops/development/
.agent/sops/deployment/
.agent/grafana/
```
### 4. Copy Templates
Copy from plugin's `templates/` directory to `.agent/`:
**DEVELOPMENT-README.md**:
- Replace `${PROJECT_NAME}` with detected project name
- Replace `${TECH_STACK}` with detected stack
- Replace `${DATE}` with current date
**`.nav-config.json`**:
```json
{
"version": "5.5.0",
"project_name": "${PROJECT_NAME}",
"tech_stack": "${TECH_STACK}",
"project_management": "none",
"task_prefix": "TASK",
"team_chat": "none",
"auto_load_navigator": true,
"compact_strategy": "conservative",
"auto_update": {
"enabled": true,
"check_interval_hours": 1
}
}
```
**Grafana Setup**:
Copy all Grafana dashboard files to enable metrics visualization:
```bash
# Find plugin installation directory
PLUGIN_DIR="${HOME}/.claude/plugins/marketplaces/navigator-marketplace"
# Copy Grafana files if plugin has them
if [ -d "${PLUGIN_DIR}/.agent/grafana" ]; then
cp -r "${PLUGIN_DIR}/.agent/grafana/"* .agent/grafana/
echo "✓ Grafana dashboard installed"
else
echo "⚠️ Grafana files not found in plugin"
fi
```
Files copied:
- docker-compose.yml (Grafana + Prometheus stack)
- prometheus.yml (scrape config for Claude Code metrics)
- grafana-datasource.yml (Prometheus datasource config)
- grafana-dashboards.yml (dashboard provider config)
- navigator-dashboard.json (10-panel Navigator metrics dashboard)
- README.md (setup instructions)
### 5. Update Project CLAUDE.md
If `CLAUDE.md` exists:
- Append Navigator-specific sections
- Keep existing project customizations
If `CLAUDE.md` doesn't exist:
- Copy `templates/CLAUDE.md` to project root
- Customize with project info
### 6. Claude Code Hooks (Plugin Manifest)
**Navigator's lifecycle hooks ship with the plugin manifest** (`.claude-plugin/plugin.json`'s top-level `hooks` field) starting v6.13.0+. They are *not* merged into the project's `.claude/settings.json` — Claude Code only substitutes `${CLAUDE_PLUGIN_ROOT}` for hooks declared in a plugin manifest, so merging them into user settings (the prior approach) produced broken commands like `/hooks/X.py`.
The plugin registers the following hooks automatically when the plugin is installed:
1. **SessionStart** — injects Navigator context (navigator + active marker + config + graph + profile) into the session, eliminating ~6 Read tool calls at start (v6.9.0+)
2. **PreCompact** — writes a context marker before manual or silent auto-compact (v6.10.0+)
3. **PostCompact** — appends Claude Code's compact summary to the marker (v6.10.0+)
4. **Stop** — silent workflow-state writer; records whether WORKFLOW CHECK / NAVIGATOR_STATUS appeared (v6.11.0+)
5. **UserPromptSubmit** — workflow_enforcer (Loop/Task mode trigger detection + optional strict_block gate)
6. **PreToolUse(Read)** — nav_read_guard (bulk-read circuit breaker)
7. **PostToolUse(Edit|Write|Bash)** — token monitor (warns at 70% / 85% context usage)
8. **PostToolUse(Edit|Write)** — task→graph sync and profile correction sync (v6.11.0+)
**Nothing for nav-init to do here.** The skill no longer writes to `.claude/settings.json` for hooks.
```
⚠️ RESTART REQUIRED to activate hooks after plugin install/update.
Claude Code caches plugin manifest hooks at session start.
```
**Opt-out**: Users can disable any hook via `.agent/.nav-config.json`:
```json
{
"session_start_hook": { "enabled": false },
"compact_hook": { "enabled": false },
"workflow_state_hook": { "enabled": false },
"task_graph_sync_hook": { "enabled": false },
"profile_sync_hook": { "enabled": false },
"workflow_enforcer_hook":{ "enabled": false }
}
```
(The hooks themselves read this config and short-circuit when disabled, so no settings.json mutation is needed.)
### 7. Create .gitignore Entries
Add to `.gitignore` if not present:
```
# Navigator context markers
.context-markers/
# Navigator temporary files
.agent/.nav-temp/
```
### 8. Success Message
```
✅ Navigator Initialized Successfully!
Created structure:
📁 .agent/ Navigator documentation
📁 .agent/tasks/ Implementation plans
📁 .agent/system/ Architecture docs
📁 .agent/sops/ Standard procedures
📁 .agent/grafana/ Metrics dashboard
📄 .agent/.nav-config.json Configuration
📄 CLAUDE.md Updated with Navigator workflow
Next steps:
1. Start session: "Start my Navigator session"
2. Optional: Enable metrics - see .agent/sops/integrations/opentelemetry-setup.md
3. Optional: Launch Grafana - cd .agent/grafana && docker compose up -d
Token monitoring is active - you'll be warned when approaching context limits.
Documentation: Read .agent/DEVELOPMENT-README.md
```
## Error Handling
**If `.agent/` exists**:
- Don't overwrite
- Show message: "Already initialized"
**If templates not found**:
- Error: "Navigator plugin templates missing. Reinstall plugin."
**If no write permissions**:
- Error: "Cannot create .agent/ directory. Check permissions."
## Predefined Functions
### `project_detector.py`
```python
def detect_project_info(cwd: str) -> dict:
"""
Detect project name and tech stack from config files.
Checks (in order):
1. package.json (Node.js)
2. pyproject.toml (Python)
3. go.mod (Go)
4. Cargo.toml (Rust)
5. composer.json (PHP)
6. Gemfile (Ruby)
Returns:
{
"name": "project-name",
"tech_stack": "Next.js, TypeScript, Prisma",
"detected_from": "package.json"
}
"""
```
### `template_customizer.py`
```python
def customize_template(template_content: str, project_info: dict) -> str:
"""
Replace placeholders in template with project-specific values.
Placeholders:
- ${PROJECT_NAME}
- ${TECH_STACK}
- ${DATE}
- ${YEAR}
Returns customized template content.
"""
```
### `settings_merger.py`
```python
def merge(target_path: Path, fragment: dict) -> dict:
"""
Idempotent JSON merge for .claude/settings.json.
- If target doeRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.