Initial commit
This commit is contained in:
12
.claude-plugin/plugin.json
Normal file
12
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "nexus",
|
||||
"description": "Skills nexus for research, data analysis, and business workflows",
|
||||
"version": "0.1.0",
|
||||
"author": {
|
||||
"name": "Mehmet Oner Yalcin",
|
||||
"email": "oneryalcin@gmail.com"
|
||||
},
|
||||
"hooks": [
|
||||
"./hooks"
|
||||
]
|
||||
}
|
||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# nexus
|
||||
|
||||
Skills nexus for research, data analysis, and business workflows
|
||||
15
hooks/hooks.json
Normal file
15
hooks/hooks.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"hooks": {
|
||||
"SessionStart": [
|
||||
{
|
||||
"matcher": "startup|resume|clear|compact",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
53
hooks/session-start.sh
Executable file
53
hooks/session-start.sh
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env bash
|
||||
# SessionStart hook for nexus plugin
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Set NEXUS_SKILLS_ROOT environment variable
|
||||
export NEXUS_SKILLS_ROOT="${HOME}/.config/nexus/skills"
|
||||
|
||||
# Run skills initialization script (handles clone/fetch/auto-update)
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
|
||||
PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||
init_output=$("${PLUGIN_ROOT}/lib/initialize-skills.sh" 2>&1 || echo "")
|
||||
|
||||
# Extract status flags
|
||||
skills_updated=$(echo "$init_output" | grep "SKILLS_UPDATED=true" || echo "")
|
||||
skills_behind=$(echo "$init_output" | grep "SKILLS_BEHIND=true" || echo "")
|
||||
# Remove status flags from display output
|
||||
init_output=$(echo "$init_output" | grep -v "SKILLS_UPDATED=true" | grep -v "SKILLS_BEHIND=true" || true)
|
||||
|
||||
# Run find-skill to show all available skills
|
||||
find_skills_output=$("${NEXUS_SKILLS_ROOT}/getting-started/find-skill" 2>&1 || echo "Error running find-skill")
|
||||
|
||||
# Read getting-started content
|
||||
getting_started_content=$(cat "${NEXUS_SKILLS_ROOT}/getting-started/SKILL.md" 2>&1 || echo "Error reading getting-started")
|
||||
|
||||
# Escape outputs for JSON
|
||||
init_escaped=$(echo "$init_output" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | awk '{printf "%s\\n", $0}')
|
||||
find_skills_escaped=$(echo "$find_skills_output" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | awk '{printf "%s\\n", $0}')
|
||||
getting_started_escaped=$(echo "$getting_started_content" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | awk '{printf "%s\\n", $0}')
|
||||
|
||||
# Build initialization output message if present
|
||||
init_message=""
|
||||
if [ -n "$init_escaped" ]; then
|
||||
init_message="${init_escaped}\n\n"
|
||||
fi
|
||||
|
||||
# Build status messages that go at the end
|
||||
status_message=""
|
||||
if [ -n "$skills_behind" ]; then
|
||||
status_message="\n\n⚠️ New skills available from upstream. Manual merge needed."
|
||||
fi
|
||||
|
||||
# Output context injection as JSON
|
||||
cat <<EOF
|
||||
{
|
||||
"hookSpecificOutput": {
|
||||
"hookEventName": "SessionStart",
|
||||
"additionalContext": "<session-start-hook><EXTREMELY_IMPORTANT>\nYou have specialized skills for domain work.\n\n${init_message}**The content below is from getting-started/SKILL.md - your operating procedures:**\n\n${getting_started_escaped}\n\n**Tool paths:**\n- find-skill: \${NEXUS_SKILLS_ROOT}/getting-started/find-skill\n\n**Skills root:** ${NEXUS_SKILLS_ROOT}\n\n**Available skills (output of find-skill):**\n\n${find_skills_escaped}${status_message}\n</EXTREMELY_IMPORTANT></session-start-hook>"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
exit 0
|
||||
49
plugin.lock.json
Normal file
49
plugin.lock.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||
"pluginId": "gh:oneryalcin/nexus-plugin:",
|
||||
"normalized": {
|
||||
"repo": null,
|
||||
"ref": "refs/tags/v20251128.0",
|
||||
"commit": "39baed2f864d3934fe1efa064b9b624753108220",
|
||||
"treeHash": "587ae3279f393c7bc027af53ec4607d065c46eb49e39d7686cab2c035437e43c",
|
||||
"generatedAt": "2025-11-28T10:27:26.785711Z",
|
||||
"toolVersion": "publish_plugins.py@0.2.0"
|
||||
},
|
||||
"origin": {
|
||||
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||
"branch": "master",
|
||||
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||
},
|
||||
"manifest": {
|
||||
"name": "nexus",
|
||||
"description": "Skills nexus for research, data analysis, and business workflows",
|
||||
"version": "0.1.0"
|
||||
},
|
||||
"content": {
|
||||
"files": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"sha256": "811410b01256c7747abb933db75cf6cfc421a65ae76a8833c13636e4c40e761c"
|
||||
},
|
||||
{
|
||||
"path": "hooks/session-start.sh",
|
||||
"sha256": "93145ff670dd39954c3f69d0f037081d12580d17d6028a5a46354bcc8716e161"
|
||||
},
|
||||
{
|
||||
"path": "hooks/hooks.json",
|
||||
"sha256": "fa08efd0315bd20d038ad1c394f699b03e5e501a550289413d8156f7833818c4"
|
||||
},
|
||||
{
|
||||
"path": ".claude-plugin/plugin.json",
|
||||
"sha256": "fe04187cf3b1665f302278888dc70ebfe1bcf2f707aba6a75e86486f8e14595f"
|
||||
}
|
||||
],
|
||||
"dirSha256": "587ae3279f393c7bc027af53ec4607d065c46eb49e39d7686cab2c035437e43c"
|
||||
},
|
||||
"security": {
|
||||
"scannedAt": null,
|
||||
"scannerVersion": null,
|
||||
"flags": []
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user