Initialize Navigator documentation structure in a project. Auto-invokes when user says "Initialize Navigator", "Set up Navigator", "Create Navigator structure", or "Bootstrap Navigator".
Creates Navigator documentation structure (.agent/) with templates, config, and Grafana dashboards. Auto-invokes when user says "Initialize Navigator" or "Set up Navigator".
/plugin marketplace add alekspetrov/navigator/plugin install navigator@navigator-marketplaceThis skill is limited to using the following tools:
functions/project_detector.pyfunctions/template_customizer.pyCreates the Navigator documentation structure (.agent/) in a new project, copies templates, and sets up initial configuration.
.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
.claude/ directory with hooks:
.claude/
└── settings.json # Token monitoring hook configuration
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
Read package.json, pyproject.toml, go.mod, Cargo.toml, or similar to extract:
Fallback: Use current directory name if no config found.
Use Write tool to create:
.agent/
.agent/tasks/
.agent/system/
.agent/sops/integrations/
.agent/sops/debugging/
.agent/sops/development/
.agent/sops/deployment/
.agent/grafana/
Copy from plugin's templates/ directory to .agent/:
DEVELOPMENT-README.md:
${PROJECT_NAME} with detected project name${TECH_STACK} with detected stack${DATE} with current date.nav-config.json:
{
"version": "4.6.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"
}
Grafana Setup: Copy all Grafana dashboard files to enable metrics visualization:
# Find plugin installation directory
PLUGIN_DIR="${HOME}/.claude/plugins/marketplaces/jitd-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:
If CLAUDE.md exists:
If CLAUDE.md doesn't exist:
templates/CLAUDE.md to project rootCreate .claude/settings.json for token budget monitoring:
mkdir -p .claude
cat > .claude/settings.json << 'EOF'
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit|Bash|Task",
"hooks": [
{
"type": "command",
"command": "python3 \"${CLAUDE_PLUGIN_DIR}/hooks/monitor-tokens.py\"",
"timeout": 5
}
]
}
]
}
}
EOF
echo "✓ Token monitoring hook configured"
What this does:
/nav:compact when approaching limitsAdd to .gitignore if not present:
# Navigator context markers
.context-markers/
# Navigator temporary files
.agent/.nav-temp/
✅ 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/ Claude Code hooks
📄 .claude/settings.json Token monitoring config
📄 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
If .agent/ exists:
If templates not found:
If no write permissions:
project_detector.pydef 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.pydef 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.
"""
User says: "Initialize Navigator in this project"
Skill detects:
package.json existsResult:
.agent/ createdUser says: "Set up Navigator"
Skill detects:
pyproject.toml existsResult:
.agent/ createdUser says: "Initialize Navigator"
Skill checks:
.agent/ directory existsResult:
✅ Navigator already initialized in this project
To start a session: 'Start my Navigator session'
nav-start skill:
.agent/DEVELOPMENT-README.mdnav-task skill:
.agent/tasks/nav-sop skill:
.agent/sops//nav:init command from v2.xThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.