alekspetrov/navigator/nav-init
Claude Code and agent skill by alekspetrov/navigator
- community
- ext:[{"type":"template","description":"Custom templates for code generation"}]
Checking that the SKILL.md file is still in the repository.
Initialize Navigator documentation structure in a project. Auto-invokes when user says "Initialize Navigator", "Set up Navigator", "Create Navigator structure", or "Bootstrap Navigator".
Install
npx vskill@latest install alekspetrov/navigator/nav-initSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
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
- Checks if already initialized: Prevents overwriting existing structure
- Creates `.agent/` directory structure:
`` .agent/ ├── DEVELOPMENT-README.md ├── .nav-config.json ├── tasks/ ├── system/ ├── sops/ │ ├── integrations/ │ ├── debugging/ │ ├── development/ │ └── deployment/ └── grafana/ ├── docker-compose.yml ├── otel-collector-config.yml ├── prometheus.yml ├── grafana-datasource.yml ├── grafana-dashboards.yml ├── navigator-dashboard.json └── README.md ``
- Copies templates: DEVELOPMENT-README.md, config, Grafana setup
- Auto-detects project info: Name, tech stack (from package.json if available)
- Updates CLAUDE.md: Adds Navigator-specific instructions to project
- Creates .gitignore entries: Excludes temporary Navigator files
Execution Steps
1. Check if Already Initialized
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:
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`:
Grafana Setup: Copy all Grafana dashboard files to enable metrics visualization:
Files copied:
- docker-compose.yml (OpenTelemetry Collector + Prometheus + Grafana stack)
- otel-collector-config.yml (OTLP in from every Claude Code session, scrape endpoint out)
- prometheus.yml (scrapes the collector; legacy direct exporter job on :9464)
- grafana-datasource.yml (Prometheus datasource config)
- grafana-dashboards.yml (dashboard provider config)
- navigator-dashboard.json (13-panel Navigator metrics dashboard)
- README.md (setup instructions, incl. the
~/.claude/settings.jsonenv block)
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.mdto 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:
- SessionStart — injects Navigator context (navigator + active marker + config + graph + profile) into the session, eliminating ~6 Read tool calls at start (v6.9.0+)
- PreCompact — writes a context marker before manual or silent auto-compact (v6.10.0+)
- PostCompact — appends Claude Code's compact summary to the marker (v6.10.0+)
- Stop — silent workflow-state writer; records whether WORKFLOW CHECK / NAVIGATOR_STATUS appeared (v6.11.0+)
- UserPromptSubmit — prompt_gate + prompt_brief ops (Loop/Task mode trigger detection + optional strict_block gate; intent-brief injection)
- PreToolUse(Read) — read_guard op (bulk-read circuit breaker)
- PostToolUse(Edit|Write|Bash) — token monitor (warns at 70% / 85% context usage)
- 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.
Opt-out: Users can disable any hook via .agent/.nav-config.json:
(The hooks themselves read this config and short-circuit when disabled, so no settings.json mutation is needed.)
7. Create .gitignore Entries
Add each of these lines to .gitignore unless it is already present (check line by line — re-running nav-init must not duplicate entries):
Idempotent append, one command:
8. Success Message
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
template_customizer.py
settings_merger.py
Status (v6.13.0+): Retained as general-purpose JSON merger for non-hook keys (permissions, mcpServers, etc.) that downstream skills may want to preserve. Navigator no longer passes a hooks fragment through it — hooks now ship with the plugin manifest (.claude-plugin/plugin.json). The hook-merging code path is dead-for-Navigator but kept intact for safety (existing call sites that already pass non-hook fragments continue to work).
Examples
Example 1: New Next.js Project
User says: "Initialize Navigator in this project"
Skill detects:
package.jsonexists- Name: "my-saas-app"
- Dependencies: next, typescript, prisma
Result:
.agent/created- DEVELOPMENT-README.md shows: "Project: My SaaS App"
- DEVELOPMENT-README.md shows: "Tech Stack: Next.js, TypeScript, Prisma"
- .nav-config.json has project_name: "my-saas-app"
Example 2: Python Project
User says: "Set up Navigator"
Skill detects:
pyproject.tomlexists- Name: "ml-pipeline"
- Dependencies: fastapi, pydantic, sqlalchemy
Result:
.agent/created- Tech stack: "FastAPI, Pydantic, SQLAlchemy"
Example 3: Already Initialized
User says: "Initialize Navigator"
Skill checks:
.agent/directory exists
Result:
Integration with Other Skills
nav-start skill:
- Checks for
.agent/DEVELOPMENT-README.md - If missing, suggests: "Initialize Navigator first"
nav-task skill:
- Creates tasks in
.agent/tasks/ - Requires initialization
nav-sop skill:
- Creates SOPs in
.agent/sops/ - Requires initialization
Version History
- 1.0.0 (2025-01-20): Initial implementation
- Auto-detection of project info
- Template customization
- Grafana setup included
- Error handling for existing installations
Notes
- This skill replaces the deleted
/nav:initcommand from v2.x - Templates are copied from plugin installation directory
- Project info detection is best-effort (falls back to directory name)
- Safe to run multiple times (won't overwrite existing structure)
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/nav-init/SKILL.md
Popularity
- Repository stars
- 158
- Repository forks
- 7
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Mar 2026, 7 months ago.
Extension points
templateCustom templates for code generation
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alekspetrov/navigator/nav-init)