v1.4.0: Major Skills Expansion - 75 Total Skills

This commit is contained in:
admin
2026-02-26 12:19:22 +04:00
Unverified
parent 029bad83b6
commit e2a7099273
392 changed files with 55962 additions and 2 deletions

View File

@@ -0,0 +1,53 @@
#!/usr/bin/env python3
"""Intercept mcp__tavily__tavily-extract to upgrade extract_depth and suggest gh CLI for GitHub URLs."""
import json
import sys
try:
data = json.load(sys.stdin)
tool_input = data["tool_input"]
urls = tool_input.get("urls", [])
# Always ensure extract_depth="advanced"
tool_input["extract_depth"] = "advanced"
# Check for GitHub URLs and add soft suggestion
github_domains = ("github.com", "raw.githubusercontent.com", "gist.github.com")
github_urls = [url for url in urls if any(domain in url for domain in github_domains)]
if github_urls:
# Allow but suggest GitHub MCP/gh CLI for next time
print(
json.dumps(
{
"systemMessage": "Tip: For GitHub URLs, use gh CLI: `gh api repos/{owner}/{repo}/contents/{path} --jq '.content' | base64 -d` for files, `gh pr view` for PRs, `gh issue view` for issues.",
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "allow",
"updatedInput": tool_input,
},
},
separators=(",", ":"),
)
)
sys.exit(0)
# Allow the call to proceed
print(
json.dumps(
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "allow",
"updatedInput": tool_input,
}
},
separators=(",", ":"),
)
)
sys.exit(0)
except (KeyError, json.JSONDecodeError) as err:
print(f"hook-error: {err}", file=sys.stderr)
sys.exit(1)

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env python3
"""
PreToolUse hook: intercept WebFetch → suggest using tavily-extract instead
"""
import json
import sys
try:
data = json.load(sys.stdin)
url = data["tool_input"]["url"]
except (KeyError, json.JSONDecodeError) as err:
print(f"hook-error: {err}", file=sys.stderr)
sys.exit(1)
print(json.dumps({
"systemMessage": "WebFetch detected. AI is directed to use Tavily extract instead.",
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "deny",
"permissionDecisionReason": f"Please use mcp__tavily__tavily-extract with urls: ['{url}'] and extract_depth: 'advanced'"
}
}, separators=(',', ':')))
sys.exit(0)

View File

@@ -0,0 +1,24 @@
#!/usr/bin/env python3
"""
PreToolUse hook: intercept WebSearch → suggest using Tavily search instead
"""
import json
import sys
try:
data = json.load(sys.stdin)
tool_input = data["tool_input"]
query = tool_input["query"]
except (KeyError, json.JSONDecodeError) as err:
print(f"hook-error: {err}", file=sys.stderr)
sys.exit(1)
print(json.dumps({
"systemMessage": "WebSearch detected. AI is directed to use Tavily search instead.",
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "deny",
"permissionDecisionReason": f"Please use mcp__tavily__tavily_search with query: '{query}'"
}
}, separators=(',', ':')))
sys.exit(0)