chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Configure Claude Code to use Amazon Bedrock for AI model access. Enables enterprise-grade deployment with AWS billing and compliance features, ideal for organizations already using AWS infrastructure.",
|
||||
"env": {
|
||||
"CLAUDE_CODE_USE_BEDROCK": "1",
|
||||
"AWS_BEARER_TOKEN_BEDROCK": "your-bedrock-api-key"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Configure proxy settings for corporate network environments. Allows Claude Code to work behind corporate firewalls and proxy servers while maintaining security compliance with enterprise network policies.",
|
||||
"env": {
|
||||
"HTTP_PROXY": "http://proxy.company.com:8080",
|
||||
"HTTPS_PROXY": "https://proxy.company.com:8080"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"description": "Add custom headers to API requests for specialized authentication or routing requirements. Useful for enterprise deployments with custom authentication systems or API gateways that require additional metadata.",
|
||||
"env": {
|
||||
"ANTHROPIC_CUSTOM_HEADERS": "X-Company-ID: your-company-id\\nX-Environment: production\\nX-API-Version: v1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"description": "Connect Claude Code with Google Vertex AI to access Anthropic's Claude models through Google Cloud Platform. Automatically configures all available Claude models (Sonnet, Haiku, Opus) with enterprise-grade infrastructure, billing, and security. Requires: GCP project with Vertex AI API enabled, authenticated gcloud CLI, and model access approval in Model Garden.",
|
||||
"env": {
|
||||
"CLAUDE_CODE_USE_VERTEX": "1",
|
||||
"CLOUD_ML_REGION": "global",
|
||||
"ANTHROPIC_VERTEX_PROJECT_ID": "your-gcp-project-id",
|
||||
"VERTEX_REGION_CLAUDE_3_5_SONNET": "global",
|
||||
"VERTEX_REGION_CLAUDE_3_5_HAIKU": "global",
|
||||
"VERTEX_REGION_CLAUDE_3_7_SONNET": "global",
|
||||
"VERTEX_REGION_CLAUDE_4_0_OPUS": "global",
|
||||
"VERTEX_REGION_CLAUDE_4_0_SONNET": "global",
|
||||
"VERTEX_REGION_CLAUDE_4_1_OPUS": "global",
|
||||
"VERTEX_REGION_CLAUDE_4_5_SONNET": "global",
|
||||
"ANTHROPIC_MODEL": "claude-sonnet-4-5@20250929",
|
||||
"ANTHROPIC_SMALL_FAST_MODEL": "claude-3-5-haiku@20241022"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Configure a custom script to dynamically generate authentication tokens. The script will be executed to obtain fresh API keys, useful for environments with rotating credentials or temporary access tokens. TTL is set to 1 hour (3600000ms).",
|
||||
"apiKeyHelper": "/bin/generate_temp_api_key.sh",
|
||||
"env": {
|
||||
"CLAUDE_CODE_API_KEY_HELPER_TTL_MS": "3600000"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"description": "Restrict authentication to Claude.ai accounts only. This prevents users from logging in with Anthropic Console accounts, ensuring all access goes through the Claude.ai platform for consistent user experience and billing.",
|
||||
"forceLoginMethod": "claudeai"
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"description": "Restrict authentication to Anthropic Console accounts only. This ensures all usage is billed through the API billing system and prevents access via Claude.ai accounts, ideal for enterprise environments with centralized billing.",
|
||||
"forceLoginMethod": "console"
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"description": "Set chat transcript retention to 7 days for privacy.",
|
||||
"cleanupPeriodDays": 7
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"description": "Set chat transcript retention to 90 days for extended history.",
|
||||
"cleanupPeriodDays": 90
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"description": "Configure timeout settings for bash command execution. Prevents long-running commands from hanging indefinitely while allowing sufficient time for complex operations like builds and deployments.",
|
||||
"env": {
|
||||
"BASH_DEFAULT_TIMEOUT_MS": "120000",
|
||||
"BASH_MAX_TIMEOUT_MS": "600000",
|
||||
"BASH_MAX_OUTPUT_LENGTH": "100000"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"description": "Enhanced development environment configuration with useful utilities and debugging features. Includes built-in ripgrep usage, terminal title updates, and directory maintenance for improved developer experience.",
|
||||
"env": {
|
||||
"USE_BUILTIN_RIPGREP": "1",
|
||||
"CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR": "1",
|
||||
"CLAUDE_CODE_DISABLE_TERMINAL_TITLE": "0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"description": "Replaces the default spinner verbs with a humorous 'Don't Deploy On Fridays' reminder. Every time Claude is thinking, the spinner will display this message as a lighthearted warning against risky end-of-week deployments.",
|
||||
"spinnerVerbs": {
|
||||
"mode": "replace",
|
||||
"verbs": [
|
||||
"Don't Deploy On Fridays"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"description": "Optimize Claude Code performance by adjusting token limits and disabling non-essential features. Reduces API costs and improves response times for development workflows focused on code quality over conversational features.",
|
||||
"env": {
|
||||
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "8000",
|
||||
"DISABLE_NON_ESSENTIAL_MODEL_CALLS": "1",
|
||||
"DISABLE_COST_WARNINGS": "1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"description": "Maximize privacy by disabling all telemetry, error reporting, and non-essential network traffic. Ideal for sensitive development environments or organizations with strict data privacy requirements.",
|
||||
"env": {
|
||||
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
|
||||
"DISABLE_TELEMETRY": "1",
|
||||
"DISABLE_ERROR_REPORTING": "1",
|
||||
"DISABLE_BUG_COMMAND": "1",
|
||||
"DISABLE_AUTOUPDATER": "1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"description": "Complete Git Flow configuration with statusline, permissions, environment variables, and workflow enforcement. Displays real-time Git Flow status, prevents direct pushes to main/develop, allows feature/release/hotfix operations, and configures Git Flow branch naming conventions. Perfect for teams following Git Flow branching strategy.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'if ! git rev-parse --git-dir >/dev/null 2>&1; then echo \"Not a git repository\"; exit 0; fi; BRANCH=$(git branch --show-current 2>/dev/null); if [ -z \"$BRANCH\" ]; then echo \"Detached HEAD\"; exit 0; fi; ICON=\"📁\"; TARGET=\"\"; if [[ $BRANCH == feature/* ]]; then ICON=\"🌿\"; TARGET=\"→ develop\"; elif [[ $BRANCH == release/* ]]; then ICON=\"🚀\"; TARGET=\"→ main\"; elif [[ $BRANCH == hotfix/* ]]; then ICON=\"🔥\"; TARGET=\"→ main+develop\"; elif [[ $BRANCH == \"develop\" ]]; then ICON=\"🔀\"; elif [[ $BRANCH == \"main\" ]]; then ICON=\"🏠\"; fi; AHEAD=$(git rev-list --count @{u}..HEAD 2>/dev/null || echo \"0\"); BEHIND=$(git rev-list --count HEAD..@{u} 2>/dev/null || echo \"0\"); SYNC=\"\"; if [ \"$AHEAD\" -gt 0 ]; then SYNC=\" ↑$AHEAD\"; fi; if [ \"$BEHIND\" -gt 0 ]; then SYNC=\"$SYNC ↓$BEHIND\"; fi; MODIFIED=$(git status --porcelain 2>/dev/null | grep \"^ M\" | wc -l | tr -d \" \"); ADDED=$(git status --porcelain 2>/dev/null | grep \"^??\" | wc -l | tr -d \" \"); DELETED=$(git status --porcelain 2>/dev/null | grep \"^ D\" | wc -l | tr -d \" \"); CHANGES=\"\"; if [ \"$MODIFIED\" -gt 0 ]; then CHANGES=\" ●$MODIFIED\"; fi; if [ \"$ADDED\" -gt 0 ]; then CHANGES=\"$CHANGES ✚$ADDED\"; fi; if [ \"$DELETED\" -gt 0 ]; then CHANGES=\"$CHANGES ✖$DELETED\"; fi; if [ -n \"$TARGET\" ]; then echo \"$ICON $BRANCH$SYNC$CHANGES | 🎯 $TARGET\"; else echo \"$ICON $BRANCH$SYNC$CHANGES\"; fi'"
|
||||
},
|
||||
"permissions": {
|
||||
"deny": [
|
||||
"Bash(git push origin main:*)",
|
||||
"Bash(git push origin develop:*)",
|
||||
"Bash(git push --force:*)",
|
||||
"Bash(git push -f:*)",
|
||||
"Bash(git reset --hard:*)",
|
||||
"Bash(git rebase -i:*)"
|
||||
],
|
||||
"allow": [
|
||||
"Bash(git status:*)",
|
||||
"Bash(git diff:*)",
|
||||
"Bash(git add:*)",
|
||||
"Bash(git commit:*)",
|
||||
"Bash(git log:*)",
|
||||
"Bash(git branch:*)",
|
||||
"Bash(git checkout:*)",
|
||||
"Bash(git pull:*)",
|
||||
"Bash(git fetch:*)",
|
||||
"Bash(git merge:*)",
|
||||
"Bash(git tag:*)",
|
||||
"Bash(git push origin feature/*:*)",
|
||||
"Bash(git push origin release/*:*)",
|
||||
"Bash(git push origin hotfix/*:*)",
|
||||
"Bash(git push --tags:*)",
|
||||
"Bash(git push -u:*)",
|
||||
"Bash(git flow:*)",
|
||||
"Bash(gh pr:*)",
|
||||
"Bash(gh issue:*)",
|
||||
"Bash(npm test:*)",
|
||||
"Bash(npm run:*)"
|
||||
]
|
||||
},
|
||||
"env": {
|
||||
"GIT_FLOW_MAIN_BRANCH": "main",
|
||||
"GIT_FLOW_DEVELOP_BRANCH": "develop",
|
||||
"GIT_FLOW_PREFIX_FEATURE": "feature/",
|
||||
"GIT_FLOW_PREFIX_RELEASE": "release/",
|
||||
"GIT_FLOW_PREFIX_HOTFIX": "hotfix/",
|
||||
"GIT_FLOW_VERSION_TAG_PREFIX": "v"
|
||||
},
|
||||
"hooks": {
|
||||
"PreToolUse": [
|
||||
{
|
||||
"matcher": "Bash",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "if echo \"$CLAUDE_TOOL_COMMAND\" | grep -q 'git checkout -b'; then BRANCH_NAME=$(echo \"$CLAUDE_TOOL_COMMAND\" | sed -n 's/.*git checkout -b \\([^ ]*\\).*/\\1/p'); if [[ -n \"$BRANCH_NAME\" ]] && [[ \"$BRANCH_NAME\" != \"main\" ]] && [[ \"$BRANCH_NAME\" != \"develop\" ]]; then if [[ ! \"$BRANCH_NAME\" =~ ^(feature|release|hotfix)/ ]]; then echo \"❌ Invalid Git Flow branch name: $BRANCH_NAME\"; echo \"\"; echo \"Git Flow branches must follow these patterns:\"; echo \" • feature/<descriptive-name>\"; echo \" • release/v<MAJOR>.<MINOR>.<PATCH>\"; echo \" • hotfix/<descriptive-name>\"; echo \"\"; echo \"Examples:\"; echo \" ✅ feature/user-authentication\"; echo \" ✅ release/v1.2.0\"; echo \" ✅ hotfix/critical-security-fix\"; echo \"\"; echo \"Invalid:\"; echo \" ❌ $BRANCH_NAME (missing Git Flow prefix)\"; echo \" ❌ feat/something (use 'feature/' not 'feat/')\"; echo \" ❌ fix/bug (use 'hotfix/' not 'fix/')\"; echo \"\"; echo \"💡 Use Git Flow commands instead:\"; echo \" /feature <name> - Create feature branch\"; echo \" /release <version> - Create release branch\"; echo \" /hotfix <name> - Create hotfix branch\"; exit 1; fi; if [[ \"$BRANCH_NAME\" =~ ^release/ ]] && [[ ! \"$BRANCH_NAME\" =~ ^release/v[0-9]+\\.[0-9]+\\.[0-9]+(-.+)?$ ]]; then echo \"❌ Invalid release version: $BRANCH_NAME\"; echo \"\"; echo \"Release branches must follow semantic versioning:\"; echo \" release/vMAJOR.MINOR.PATCH[-prerelease]\"; echo \"\"; echo \"Valid examples:\"; echo \" ✅ release/v1.0.0\"; echo \" ✅ release/v2.1.3\"; echo \" ✅ release/v1.0.0-beta.1\"; echo \"\"; echo \"Invalid:\"; echo \" ❌ release/1.0.0 (missing 'v' prefix)\"; echo \" ❌ release/v1.0 (incomplete version)\"; echo \" ❌ $BRANCH_NAME\"; echo \"\"; echo \"💡 Use: /release v1.2.0\"; exit 1; fi; fi; fi"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "Bash(git commit:*)",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "COMMIT_MSG=$(echo \"$CLAUDE_TOOL_COMMAND\" | grep -oP '(?<=-m \")[^\"]+' | head -1); if [[ -n \"$COMMIT_MSG\" ]] && [[ ! \"$COMMIT_MSG\" =~ ^(feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert)(\\(.+\\))?:\\ ]]; then echo \"❌ Invalid commit message format\"; echo \"\"; echo \"Commit messages must follow Conventional Commits:\"; echo \" type(scope): description\"; echo \"\"; echo \"Types:\"; echo \" feat: New feature\"; echo \" fix: Bug fix\"; echo \" docs: Documentation changes\"; echo \" style: Code style changes (formatting)\"; echo \" refactor: Code refactoring\"; echo \" perf: Performance improvements\"; echo \" test: Adding or updating tests\"; echo \" chore: Maintenance tasks\"; echo \" ci: CI/CD changes\"; echo \" build: Build system changes\"; echo \" revert: Revert previous commit\"; echo \"\"; echo \"Examples:\"; echo \" ✅ feat: add user authentication\"; echo \" ✅ feat(auth): implement JWT tokens\"; echo \" ✅ fix: resolve memory leak in parser\"; echo \" ✅ fix(api): handle null responses\"; echo \" ✅ docs: update API documentation\"; echo \" ❌ Added new feature (no type)\"; echo \" ❌ feat:add feature (missing space)\"; echo \" ❌ feature: add login (wrong type)\"; echo \"\"; echo \"Your message: $COMMIT_MSG\"; exit 1; fi"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "Bash(git push:*)",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "PUSH_CMD=\"$CLAUDE_TOOL_COMMAND\"; CURRENT_BRANCH=$(git branch --show-current 2>/dev/null); if [[ \"$PUSH_CMD\" =~ (origin[[:space:]]+main|origin[[:space:]]+develop|main|develop) ]] || [[ \"$CURRENT_BRANCH\" == \"main\" || \"$CURRENT_BRANCH\" == \"develop\" ]]; then if [[ \"$PUSH_CMD\" != *\"--force\"* ]] && ([[ \"$CURRENT_BRANCH\" == \"main\" ]] || [[ \"$CURRENT_BRANCH\" == \"develop\" ]] || [[ \"$PUSH_CMD\" =~ origin[[:space:]]main ]] || [[ \"$PUSH_CMD\" =~ origin[[:space:]]develop ]]); then echo \"❌ Direct push to main/develop is not allowed!\"; echo \"\"; echo \"Protected branches:\"; echo \" - main (production)\"; echo \" - develop (integration)\"; echo \"\"; echo \"Git Flow workflow:\"; echo \" 1. Create a feature branch:\"; echo \" /feature <name>\"; echo \"\"; echo \" 2. Make your changes and commit\"; echo \"\"; echo \" 3. Push feature branch:\"; echo \" git push origin feature/<name>\"; echo \"\"; echo \" 4. Create pull request:\"; echo \" gh pr create\"; echo \"\"; echo \" 5. After approval, merge with:\"; echo \" /finish\"; echo \"\"; echo \"For releases:\"; echo \" /release <version> → PR → /finish\"; echo \"\"; echo \"For hotfixes:\"; echo \" /hotfix <name> → PR → /finish\"; echo \"\"; echo \"Current branch: $CURRENT_BRANCH\"; exit 1; fi; fi"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"description": "Display custom company announcements in Claude Code. Replace the example messages in the 'companyAnnouncements' array with your own organization's announcements, guidelines, or reminders.",
|
||||
"companyAnnouncements": [
|
||||
"Browse 1000+ components at aitmpl.com — agents, commands, MCPs, hooks, and settings ready to install!",
|
||||
"Install components instantly: npx claude-code-templates@latest --agent <name>",
|
||||
"New components added weekly — check aitmpl.com/blog for the latest updates"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Override the default Claude model with a custom or alternative model configuration. Useful for testing new model versions or using organization-specific model deployments.",
|
||||
"model": "claude-3-5-sonnet-20241022",
|
||||
"env": {
|
||||
"ANTHROPIC_SMALL_FAST_MODEL": "claude-3-5-haiku-20241022"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"description": "Configure git commit behavior including the co-authored-by signature. Disable the Claude co-authorship line if you prefer clean commit history or have organizational policies against AI attribution.",
|
||||
"includeCoAuthoredBy": false
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"description": "Customize the spinner tips shown while Claude is thinking. Replace the example tip string in the 'tips' array with your own custom messages. Set 'excludeDefault: true' to show only your custom tips, or 'false' to mix them with the built-in ones.",
|
||||
"spinnerTipsOverride": {
|
||||
"excludeDefault": true,
|
||||
"tips": [
|
||||
"Visit aitmpl.com to browse and install Claude Code components — agents, commands, MCPs, hooks, and more!"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"description": "Audit trail for subagent invocations using SubagentStart and SubagentStop lifecycle hooks. Every time Claude spawns or finishes a subagent, a timestamped JSON entry is appended to .claude/agent-log.jsonl — recording the agent name, event type, and ISO timestamp. Provides an offline, zero-dependency log for debugging multi-agent workflows, tracking which agents ran and in what order, and estimating AI usage per session.",
|
||||
"hooks": {
|
||||
"SubagentStart": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "mkdir -p .claude && printf '{\"event\":\"SubagentStart\",\"agent\":\"%s\",\"ts\":\"%s\"}\\n' \"${CLAUDE_AGENT_NAME:-unknown}\" \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" >> .claude/agent-log.jsonl"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"SubagentStop": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "mkdir -p .claude && printf '{\"event\":\"SubagentStop\",\"agent\":\"%s\",\"ts\":\"%s\"}\\n' \"${CLAUDE_AGENT_NAME:-unknown}\" \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" >> .claude/agent-log.jsonl"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"description": "Disable specific MCP servers that may pose security risks or are not needed for your workflow. This blacklist approach allows most servers while blocking potentially problematic integrations.",
|
||||
"disabledMcpjsonServers": [
|
||||
"web-scraper",
|
||||
"system-admin",
|
||||
"network-tools"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"description": "Automatically approve and enable all MCP servers defined in project .mcp.json files. This setting bypasses manual approval prompts for project-defined MCP servers, streamlining development workflow in trusted environments.",
|
||||
"enableAllProjectMcpServers": true
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"description": "Enable only specific MCP servers from .mcp.json files. This provides granular control over which MCP integrations are active, allowing you to selectively enable trusted or required servers while blocking others.",
|
||||
"enabledMcpjsonServers": [
|
||||
"memory",
|
||||
"github",
|
||||
"filesystem"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"description": "Configure timeout settings for MCP server operations. Adjust startup and tool execution timeouts to accommodate slower systems or complex MCP server operations while preventing indefinite hangs.",
|
||||
"env": {
|
||||
"MCP_TIMEOUT": "30000",
|
||||
"MCP_TOOL_TIMEOUT": "60000",
|
||||
"MAX_MCP_OUTPUT_TOKENS": "50000"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"description": "Configure Claude Code to use Claude 3.5 Haiku model for faster responses.",
|
||||
"model": "claude-3-5-haiku-20241022"
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"description": "Configure Claude Code to use Claude 3.5 Sonnet model.",
|
||||
"model": "claude-3-5-sonnet-20241022"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "GLM Coding Plan - Top-tier open-source coding performance powered by GLM-4.6, the top-ranked model on Code Arena leaderboard. Starting at $3/month with state-of-the-art reasoning, debugging, and code generation. Seamlessly integrates with Claude Code and 10+ AI coding tools. Includes native MCP support for image recognition and web search. Get 10% OFF with code: https://z.ai/subscribe?ic=8JVLJQFSKB",
|
||||
"env": {
|
||||
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
|
||||
"ANTHROPIC_AUTH_TOKEN": "YOUR-API-KEY",
|
||||
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air",
|
||||
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-4.7",
|
||||
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-4.7"
|
||||
},
|
||||
"alwaysThinkingEnabled": true
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Grant access to additional directories outside the current project. Useful for monorepo setups, shared libraries, or when working with documentation stored in separate repositories.",
|
||||
"permissions": {
|
||||
"additionalDirectories": [
|
||||
"../docs/",
|
||||
"../shared-components/",
|
||||
"~/projects/common-utils/",
|
||||
"/opt/company-tools/"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"description": "Allow common git operations for version control workflow. Permits git status, diff, add, commit, and push operations while maintaining security by requiring explicit permission for potentially destructive operations.",
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(git status)",
|
||||
"Bash(git diff:*)",
|
||||
"Bash(git add:*)",
|
||||
"Bash(git commit:*)",
|
||||
"Bash(git push:*)",
|
||||
"Bash(git pull:*)",
|
||||
"Bash(git log:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Allow common npm development commands (lint, test, build, start).",
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(npm run lint)",
|
||||
"Bash(npm run test:*)",
|
||||
"Bash(npm run build)",
|
||||
"Bash(npm start)"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Deny access to sensitive files like environment variables and secrets.",
|
||||
"permissions": {
|
||||
"deny": [
|
||||
"Read(./.env)",
|
||||
"Read(./.env.*)",
|
||||
"Read(./secrets/**)",
|
||||
"Read(./config/credentials.json)"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"description": "Comprehensive permissions for active development. Allows most development tools and operations while maintaining security boundaries. Ideal for trusted development environments where productivity is prioritized.",
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(npm:*)",
|
||||
"Bash(yarn:*)",
|
||||
"Bash(node:*)",
|
||||
"Bash(git:*)",
|
||||
"Bash(docker:*)",
|
||||
"Bash(python:*)",
|
||||
"Bash(pip:*)",
|
||||
"Read(**/*.json)",
|
||||
"Read(**/*.js)",
|
||||
"Read(**/*.ts)",
|
||||
"Read(**/*.py)",
|
||||
"Edit(**/*.js)",
|
||||
"Edit(**/*.ts)",
|
||||
"Edit(**/*.py)",
|
||||
"Edit(**/*.json)",
|
||||
"Write(**/*.js)",
|
||||
"Write(**/*.ts)",
|
||||
"Write(**/*.py)"
|
||||
],
|
||||
"deny": [
|
||||
"Read(./.env*)",
|
||||
"Read(./secrets/**)",
|
||||
"Bash(rm -rf:*)",
|
||||
"Bash(sudo:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"description": "Restrict Claude to read-only operations for code review and analysis. Prevents any file modifications or command executions, making it safe for exploring unfamiliar codebases or conducting security audits.",
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Read(**/*)",
|
||||
"Glob",
|
||||
"Grep",
|
||||
"LS"
|
||||
],
|
||||
"deny": [
|
||||
"Edit",
|
||||
"Write",
|
||||
"MultiEdit",
|
||||
"Bash",
|
||||
"WebFetch"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Asset pipeline controller monitoring texture processing, model optimization, audio compression, and platform-specific variants. Tracks asset processing queue status, file size optimizations, LOD generation progress, and compression ratios across different asset types for game development workflows.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "python3 -c \"import json, sys, os, glob; data=json.load(sys.stdin); model=data['model']['display_name']; current_dir=data['workspace']['current_dir']; os.chdir(current_dir); def get_file_sizes(pattern): files = glob.glob(pattern, recursive=True); return len(files), sum(os.path.getsize(f) for f in files if os.path.isfile(f)) // (1024*1024); textures = get_file_sizes('Assets/**/*.png') if os.path.exists('Assets') else get_file_sizes('**/*.png'); models = get_file_sizes('Assets/**/*.fbx') if os.path.exists('Assets') else get_file_sizes('**/*.fbx'); audio = get_file_sizes('Assets/**/*.wav') if os.path.exists('Assets') else get_file_sizes('**/*.wav'); tex_status = f'🖼️{textures[0]}({textures[1]}MB)' if textures[0] > 0 else '🖼️None'; model_status = f'🎯{models[0]}({models[1]}MB)' if models[0] > 0 else '🎯None'; audio_status = f'🔊{audio[0]}({audio[1]}MB)' if audio[0] > 0 else '🔊None'; processing_status = '⚡Ready'; if textures[1] > 500: processing_status = '🔴Heavy'; elif textures[1] > 100: processing_status = '🟡Med'; else: processing_status = '🟢Light'; compression_status = '📦Auto'; if os.path.exists('Assets/StreamingAssets') or os.path.exists('StreamingAssets'): compression_status = '📦Stream'; total_assets = textures[0] + models[0] + audio[0]; pipeline_health = '✅Optimal' if total_assets < 1000 else '⚠️Large' if total_assets < 2000 else '🔴Massive'; dir_name = os.path.basename(current_dir); print(f'[{model}] {tex_status} | {model_status} | {audio_status} | {processing_status} | {compression_status} | {pipeline_health}')\""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Turn debugging into a circus performance! Watch performers juggle bugs while the audience reacts to your coding show with dynamic applause and reactions. Displays: Show number (incremental counter), Rotating performers (🤹 juggler, 🎭 drama, 🎪 circus, 🎨 artist, 🎯 target - cycles every 5 shows), Random audience reactions (👏 applause 30% chance, 😴 sleeping 70% chance for each of 3 audience members).",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); SESSION=$(echo \"$input\" | jq -r \".session_id\" | cut -c1-8); CACHE=\"/tmp/circus_$SESSION\"; if [ ! -f \"$CACHE\" ]; then echo \"0\" > \"$CACHE\"; fi; SHOWS=$(cat \"$CACHE\"); SHOWS=$((SHOWS + 1)); echo \"$SHOWS\" > \"$CACHE\"; PERFORMERS=(\"🤹\" \"🎭\" \"🎪\" \"🎨\" \"🎯\"); PERFORMER=${PERFORMERS[$((SHOWS % 5))]}; AUDIENCE=$(python3 -c \"import random; print(''.join(['👏' if random.random() > 0.7 else '😴' for _ in range(3)]))\" 2>/dev/null || echo \"👏😴👏\"); echo \"[$MODEL] 🎪 Show #$SHOWS | $PERFORMER | $AUDIENCE | 📁 ${DIR##*/}\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Roll the dice with your code! Persistent chip tracking with wins and losses based on random dice rolls. Watch your coding fortune rise and fall. Displays: Chip count (starts at 100, persistent across session), Two random dice (1-6 each), Dice sum calculation, Game results (🎰 WIN +10 chips on 7 or 11, 💸 LOSE -5 chips on 2 or 12, 🎲 ROLL neutral on other sums).",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); SESSION=$(echo \"$input\" | jq -r \".session_id\" | cut -c1-8); CACHE=\"/tmp/casino_$SESSION\"; if [ ! -f \"$CACHE\" ]; then echo \"100\" > \"$CACHE\"; fi; CHIPS=$(cat \"$CACHE\"); DICE1=$((RANDOM % 6 + 1)); DICE2=$((RANDOM % 6 + 1)); SUM=$((DICE1 + DICE2)); if [ $SUM -eq 7 ] || [ $SUM -eq 11 ]; then CHIPS=$((CHIPS + 10)); RESULT=\"🎰 WIN!\"; elif [ $SUM -eq 2 ] || [ $SUM -eq 12 ]; then CHIPS=$((CHIPS - 5)); RESULT=\"💸 LOSE\"; else RESULT=\"🎲 ROLL\"; fi; echo \"$CHIPS\" > \"$CACHE\"; echo \"[$MODEL] 🎰 Chips: $CHIPS | 🎲 $DICE1+$DICE2=$SUM $RESULT | 📁 ${DIR##*/}\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Navigate through space on your coding journey. Track fuel consumption, travel distance, and warp levels. The ship's condition reflects your coding momentum. Displays: Ship condition (🚀 full fuel 80%+, 🛸 low fuel 40-80%, 🆘 emergency <40%), Warp level (increases each time fuel depletes), Fuel percentage (decreases by 1% per interaction, refills to 100% when empty), Distance in light-years (+5ly per interaction), Random star field (⭐🌟✨ combinations).",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); SESSION=$(echo \"$input\" | jq -r \".session_id\" | cut -c1-8); CACHE=\"/tmp/spaceship_$SESSION\"; if [ ! -f \"$CACHE\" ]; then echo \"100 0 0\" > \"$CACHE\"; fi; read FUEL DISTANCE WARP < \"$CACHE\"; FUEL=$((FUEL - 1)); DISTANCE=$((DISTANCE + 5)); if [ $FUEL -le 0 ]; then FUEL=100; WARP=$((WARP + 1)); fi; echo \"$FUEL $DISTANCE $WARP\" > \"$CACHE\"; SHIP=$([ $FUEL -gt 80 ] && echo \"🚀\" || [ $FUEL -gt 40 ] && echo \"🛸\" || echo \"🆘\"); STARS=$(python3 -c \"import random; print(''.join(random.choice('⭐🌟✨') for _ in range(3)))\" 2>/dev/null || echo \"⭐🌟✨\"); echo \"[$MODEL] $SHIP Warp $WARP | ⛽$FUEL% | 🌌 ${DISTANCE}ly | $STARS | 📁 ${DIR##*/}\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Colorful status line with ANSI color codes for enhanced visual appeal. Uses colors to distinguish between different information types: blue for model, green for directory, yellow for git branch.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); BRANCH=\"\"; if git rev-parse --git-dir >/dev/null 2>&1; then BRANCH=\" | 🌿 $(git branch --show-current 2>/dev/null)\"; fi; echo \"[$MODEL] 📁 ${DIR##*/}$BRANCH\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"description": "Configure a custom status line using a shell command that receives session context via JSON stdin. The script can display model name, current directory, git branch, or any dynamic information. Create your script at ~/.claude/statusline.sh and make it executable.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "~/.claude/statusline.sh",
|
||||
"padding": 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Real-time Claude Code context usage monitor with visual progress bars, color-coded alerts, session analytics (cost, duration, lines changed), and auto-compact warnings. Tracks conversation context consumption and provides visual feedback to prevent session interruptions.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "python3 .claude/scripts/context-monitor.py"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,299 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Claude Code Context Monitor
|
||||
Real-time context usage monitoring with visual indicators and session analytics
|
||||
"""
|
||||
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
|
||||
def get_git_status():
|
||||
"""Get git branch and change count for statusline."""
|
||||
try:
|
||||
# Check if inside a git repository
|
||||
subprocess.check_output(
|
||||
["git", "rev-parse", "--git-dir"], stderr=subprocess.DEVNULL
|
||||
)
|
||||
|
||||
# Get current branch
|
||||
branch = (
|
||||
subprocess.check_output(
|
||||
["git", "branch", "--show-current"], stderr=subprocess.DEVNULL
|
||||
)
|
||||
.decode()
|
||||
.strip()
|
||||
)
|
||||
|
||||
if not branch:
|
||||
return ""
|
||||
|
||||
# Count changes
|
||||
changes = (
|
||||
subprocess.check_output(
|
||||
["git", "status", "--porcelain"], stderr=subprocess.DEVNULL
|
||||
)
|
||||
.decode()
|
||||
.splitlines()
|
||||
)
|
||||
|
||||
change_count = len(changes)
|
||||
|
||||
# Color logic
|
||||
if change_count > 0:
|
||||
color = "\033[31m" # Red = dirty
|
||||
suffix = f" ({change_count})"
|
||||
else:
|
||||
color = "\033[32m" # Green = clean
|
||||
suffix = ""
|
||||
|
||||
return f" \033[90m|\033[0m {color}🌿 {branch}{suffix}\033[0m"
|
||||
|
||||
except Exception:
|
||||
return ""
|
||||
|
||||
|
||||
def parse_context_from_transcript(transcript_path):
|
||||
"""Parse context usage from transcript file."""
|
||||
if not transcript_path or not os.path.exists(transcript_path):
|
||||
return None
|
||||
|
||||
try:
|
||||
with open(transcript_path, "r", encoding="utf-8", errors="replace") as f:
|
||||
lines = f.readlines()
|
||||
|
||||
# Check last 15 lines for context information
|
||||
recent_lines = lines[-15:] if len(lines) > 15 else lines
|
||||
|
||||
for line in reversed(recent_lines):
|
||||
try:
|
||||
data = json.loads(line.strip())
|
||||
|
||||
# Method 1: Parse usage tokens from assistant messages
|
||||
if data.get("type") == "assistant":
|
||||
message = data.get("message", {})
|
||||
usage = message.get("usage", {})
|
||||
|
||||
if usage:
|
||||
input_tokens = usage.get("input_tokens", 0)
|
||||
cache_read = usage.get("cache_read_input_tokens", 0)
|
||||
cache_creation = usage.get("cache_creation_input_tokens", 0)
|
||||
|
||||
# Estimate context usage (assume 200k context for Claude Sonnet)
|
||||
total_tokens = input_tokens + cache_read + cache_creation
|
||||
if total_tokens > 0:
|
||||
percent_used = min(100, (total_tokens / 200000) * 100)
|
||||
return {
|
||||
"percent": percent_used,
|
||||
"tokens": total_tokens,
|
||||
"method": "usage",
|
||||
}
|
||||
|
||||
# Method 2: Parse system context warnings
|
||||
elif data.get("type") == "system_message":
|
||||
content = data.get("content", "")
|
||||
|
||||
# "Context left until auto-compact: X%"
|
||||
match = re.search(
|
||||
r"Context left until auto-compact: (\d+)%", content
|
||||
)
|
||||
if match:
|
||||
percent_left = int(match.group(1))
|
||||
return {
|
||||
"percent": 100 - percent_left,
|
||||
"warning": "auto-compact",
|
||||
"method": "system",
|
||||
}
|
||||
|
||||
# "Context low (X% remaining)"
|
||||
match = re.search(r"Context low \((\d+)% remaining\)", content)
|
||||
if match:
|
||||
percent_left = int(match.group(1))
|
||||
return {
|
||||
"percent": 100 - percent_left,
|
||||
"warning": "low",
|
||||
"method": "system",
|
||||
}
|
||||
|
||||
except (json.JSONDecodeError, KeyError, ValueError):
|
||||
continue
|
||||
|
||||
return None
|
||||
|
||||
except (FileNotFoundError, PermissionError):
|
||||
return None
|
||||
|
||||
|
||||
def get_context_display(context_info):
|
||||
"""Generate context display with visual indicators."""
|
||||
if not context_info:
|
||||
return "🔵 ???"
|
||||
|
||||
percent = context_info.get("percent", 0)
|
||||
warning = context_info.get("warning")
|
||||
|
||||
# Color and icon based on usage level
|
||||
if percent >= 95:
|
||||
icon, color = "🚨", "\033[31;1m" # Blinking red
|
||||
alert = "CRIT"
|
||||
elif percent >= 90:
|
||||
icon, color = "🔴", "\033[31m" # Red
|
||||
alert = "HIGH"
|
||||
elif percent >= 75:
|
||||
icon, color = "🟠", "\033[91m" # Light red
|
||||
alert = ""
|
||||
elif percent >= 50:
|
||||
icon, color = "🟡", "\033[33m" # Yellow
|
||||
alert = ""
|
||||
else:
|
||||
icon, color = "🟢", "\033[32m" # Green
|
||||
alert = ""
|
||||
|
||||
# Create progress bar
|
||||
segments = 8
|
||||
filled = int((percent / 100) * segments)
|
||||
bar = "█" * filled + "▁" * (segments - filled)
|
||||
|
||||
# Special warnings
|
||||
if warning == "auto-compact":
|
||||
alert = "AUTO-COMPACT!"
|
||||
elif warning == "low":
|
||||
alert = "LOW!"
|
||||
|
||||
reset = "\033[0m"
|
||||
alert_str = f" {alert}" if alert else ""
|
||||
|
||||
return f"{icon}{color}{bar}{reset} {percent:.0f}%{alert_str}"
|
||||
|
||||
|
||||
def get_directory_display(workspace_data):
|
||||
"""Get directory display name."""
|
||||
current_dir = workspace_data.get("current_dir", "")
|
||||
project_dir = workspace_data.get("project_dir", "")
|
||||
|
||||
if current_dir and project_dir:
|
||||
if current_dir.startswith(project_dir):
|
||||
rel_path = current_dir[len(project_dir) :].lstrip("/")
|
||||
return rel_path or os.path.basename(project_dir)
|
||||
else:
|
||||
return os.path.basename(current_dir)
|
||||
elif project_dir:
|
||||
return os.path.basename(project_dir)
|
||||
elif current_dir:
|
||||
return os.path.basename(current_dir)
|
||||
else:
|
||||
return "unknown"
|
||||
|
||||
|
||||
def get_session_metrics(cost_data):
|
||||
"""Get session metrics display."""
|
||||
if not cost_data:
|
||||
return ""
|
||||
|
||||
metrics = []
|
||||
|
||||
# Cost
|
||||
cost_usd = cost_data.get("total_cost_usd", 0)
|
||||
if cost_usd > 0:
|
||||
if cost_usd >= 0.10:
|
||||
cost_color = "\033[31m" # Red for expensive
|
||||
elif cost_usd >= 0.05:
|
||||
cost_color = "\033[33m" # Yellow for moderate
|
||||
else:
|
||||
cost_color = "\033[32m" # Green for cheap
|
||||
|
||||
cost_str = f"{cost_usd*100:.0f}¢" if cost_usd < 0.01 else f"${cost_usd:.3f}"
|
||||
metrics.append(f"{cost_color}💰 {cost_str}\033[0m")
|
||||
|
||||
# Duration
|
||||
duration_ms = cost_data.get("total_duration_ms", 0)
|
||||
if duration_ms > 0:
|
||||
minutes = duration_ms / 60000
|
||||
if minutes >= 30:
|
||||
duration_color = "\033[33m" # Yellow for long sessions
|
||||
else:
|
||||
duration_color = "\033[32m" # Green
|
||||
|
||||
if minutes < 1:
|
||||
duration_str = f"{duration_ms//1000}s"
|
||||
else:
|
||||
duration_str = f"{minutes:.0f}m"
|
||||
|
||||
metrics.append(f"{duration_color}⏱ {duration_str}\033[0m")
|
||||
|
||||
# Lines changed
|
||||
lines_added = cost_data.get("total_lines_added", 0)
|
||||
lines_removed = cost_data.get("total_lines_removed", 0)
|
||||
if lines_added > 0 or lines_removed > 0:
|
||||
net_lines = lines_added - lines_removed
|
||||
|
||||
if net_lines > 0:
|
||||
lines_color = "\033[32m" # Green for additions
|
||||
elif net_lines < 0:
|
||||
lines_color = "\033[31m" # Red for deletions
|
||||
else:
|
||||
lines_color = "\033[33m" # Yellow for neutral
|
||||
|
||||
sign = "+" if net_lines >= 0 else ""
|
||||
metrics.append(f"{lines_color}📝 {sign}{net_lines}\033[0m")
|
||||
|
||||
return f" \033[90m|\033[0m {' '.join(metrics)}" if metrics else ""
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
# Read JSON input from Claude Code
|
||||
data = json.load(sys.stdin)
|
||||
|
||||
# Extract information
|
||||
model_name = data.get("model", {}).get("display_name", "Claude")
|
||||
workspace = data.get("workspace", {})
|
||||
transcript_path = data.get("transcript_path", "")
|
||||
cost_data = data.get("cost", {})
|
||||
|
||||
# Parse context usage
|
||||
context_info = parse_context_from_transcript(transcript_path)
|
||||
|
||||
# Build status components
|
||||
context_display = get_context_display(context_info)
|
||||
directory = get_directory_display(workspace)
|
||||
session_metrics = get_session_metrics(cost_data)
|
||||
git_status = get_git_status()
|
||||
|
||||
# Model display with context-aware coloring
|
||||
if context_info:
|
||||
percent = context_info.get("percent", 0)
|
||||
if percent >= 90:
|
||||
model_color = "\033[31m" # Red
|
||||
elif percent >= 75:
|
||||
model_color = "\033[33m" # Yellow
|
||||
else:
|
||||
model_color = "\033[32m" # Green
|
||||
|
||||
model_display = f"{model_color}[{model_name}]\033[0m"
|
||||
else:
|
||||
model_display = f"\033[94m[{model_name}]\033[0m"
|
||||
|
||||
# Combine all components
|
||||
status_line = (
|
||||
f"{model_display} "
|
||||
f"\033[93m📁 {directory}\033[0m"
|
||||
f"{git_status} "
|
||||
f"🧠 {context_display}"
|
||||
f"{session_metrics}"
|
||||
)
|
||||
|
||||
print(status_line)
|
||||
|
||||
except Exception as e:
|
||||
# Fallback display on any error
|
||||
print(
|
||||
f"\033[94m[Claude]\033[0m \033[93m📁 {os.path.basename(os.getcwd())}\033[0m 🧠 \033[31m[Error: {str(e)[:20]}]\033[0m"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Dive deep into an ocean of code. Track depth based on file count, encounter different sea creatures, and occasionally discover treasure while surfing the data waves. Displays: Random wave patterns (🌊 ocean, 🌀 whirlpool, 💧 droplet, ⚡ electric, 🔥 fire), Depth in meters (file count * 10 for .py/.js/.rs files), Sea creatures (🐋 whale >100m, 🐠 fish 50-100m, 🐟 small fish <50m), Rare treasure (💎 diamond 5% chance per interaction).",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); WAVES=(\"🌊\" \"🌀\" \"💧\" \"⚡\" \"🔥\"); WAVE=${WAVES[$((RANDOM % 5))]}; DEPTH=$(($(find . -name \"*.py\" -o -name \"*.js\" -o -name \"*.rs\" 2>/dev/null | wc -l) * 10)); CREATURES=$([ $DEPTH -gt 100 ] && echo \"🐋\" || [ $DEPTH -gt 50 ] && echo \"🐠\" || echo \"🐟\"); TREASURE=$([ $((RANDOM % 20)) -eq 0 ] && echo \"💎\" || echo \"\"); echo \"[$MODEL] $WAVE Depth: ${DEPTH}m | $CREATURES $TREASURE | 📁 ${DIR##*/}\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Deadline day statusline with git branch, changed files count, and countdown timer to a configurable deadline. Color-coded urgency. Set DEADLINE_TIME env var (HH:MM, default 15:30) to customize.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "python3 .claude/scripts/deadline-countdown.py"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Deadline Countdown Statusline
|
||||
Shows git branch, changed files count, and countdown to deadline.
|
||||
Color-coded urgency: green >2h, yellow 1-2h, red <1h, blinking <30min.
|
||||
Configure with DEADLINE_TIME (HH:MM, default 15:30) env var.
|
||||
"""
|
||||
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
def get_git_info():
|
||||
"""Get git branch and change count for statusline."""
|
||||
try:
|
||||
subprocess.check_output(
|
||||
["git", "rev-parse", "--git-dir"], stderr=subprocess.DEVNULL
|
||||
)
|
||||
|
||||
branch = (
|
||||
subprocess.check_output(
|
||||
["git", "branch", "--show-current"], stderr=subprocess.DEVNULL
|
||||
)
|
||||
.decode()
|
||||
.strip()
|
||||
)
|
||||
|
||||
if not branch:
|
||||
return ""
|
||||
|
||||
changes = (
|
||||
subprocess.check_output(
|
||||
["git", "status", "--porcelain"], stderr=subprocess.DEVNULL
|
||||
)
|
||||
.decode()
|
||||
.splitlines()
|
||||
)
|
||||
|
||||
change_count = len(changes)
|
||||
|
||||
if change_count > 0:
|
||||
color = "\033[31m" # Red = dirty
|
||||
suffix = f" ({change_count})"
|
||||
else:
|
||||
color = "\033[32m" # Green = clean
|
||||
suffix = ""
|
||||
|
||||
return f"{color}\u00b7 {branch}{suffix}\033[0m"
|
||||
|
||||
except Exception:
|
||||
return ""
|
||||
|
||||
|
||||
def get_countdown():
|
||||
"""Calculate countdown to deadline with color-coded urgency."""
|
||||
deadline_str = os.environ.get("DEADLINE_TIME", "15:30")
|
||||
|
||||
try:
|
||||
hour, minute = map(int, deadline_str.split(":"))
|
||||
except (ValueError, AttributeError):
|
||||
hour, minute = 15, 30
|
||||
|
||||
now = datetime.now()
|
||||
deadline = now.replace(hour=hour, minute=minute, second=0, microsecond=0)
|
||||
|
||||
diff = deadline - now
|
||||
total_seconds = int(diff.total_seconds())
|
||||
|
||||
reset = "\033[0m"
|
||||
|
||||
if total_seconds <= 0:
|
||||
overtime_min = abs(total_seconds) // 60
|
||||
return f"\033[31;5m OVERTIME +{overtime_min}m{reset}"
|
||||
|
||||
total_minutes = total_seconds // 60
|
||||
hours = total_minutes // 60
|
||||
minutes = total_minutes % 60
|
||||
|
||||
# Format time remaining
|
||||
if hours > 0:
|
||||
time_str = f"{hours}h {minutes}m"
|
||||
else:
|
||||
time_str = f"{minutes}m"
|
||||
|
||||
# Color coding based on urgency
|
||||
if total_minutes > 120:
|
||||
color = "\033[32m" # Green >2h
|
||||
elif total_minutes > 60:
|
||||
color = "\033[33m" # Yellow 1-2h
|
||||
elif total_minutes > 30:
|
||||
color = "\033[31m" # Red <1h
|
||||
else:
|
||||
color = "\033[31;5m" # Blinking red <30min
|
||||
|
||||
return f"{color} {time_str}{reset}"
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
data = json.load(sys.stdin)
|
||||
|
||||
model_name = data.get("model", {}).get("display_name", "Claude")
|
||||
git_info = get_git_info()
|
||||
countdown = get_countdown()
|
||||
|
||||
sep = " \033[90m|\033[0m "
|
||||
|
||||
parts = [f"\033[94m[{model_name}]\033[0m"]
|
||||
|
||||
if git_info:
|
||||
parts.append(git_info)
|
||||
|
||||
parts.append(countdown)
|
||||
|
||||
print(sep.join(parts))
|
||||
|
||||
except Exception as e:
|
||||
print(f"\033[94m[Claude]\033[0m \033[31m[Error: {str(e)[:30]}]\033[0m")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "A theatrical display of coding emotions and activities. Random mood faces and dynamic activity detection based on file types present in your project. Displays: Random mood faces (😴 sleepy, 😅 laughing, 🤔 thinking, 😎 cool, 🤯 exploding, 🥳 partying, 😤 huffing, 🤖 robotic), Programming activity (🐍 Python, 🌐 JavaScript, 🦀 Rust, 💻 generic), Random energy percentage (1-100%), Current time (HH:MM format).",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); MOOD_FACES=(\"😴\" \"😅\" \"🤔\" \"😎\" \"🤯\" \"🥳\" \"😤\" \"🤖\"); MOOD=${MOOD_FACES[$((RANDOM % ${#MOOD_FACES[@]}))]}; ACTIVITY=$([ -f \"*.py\" ] && echo \"🐍 Pythoning\" || [ -f \"*.js\" ] && echo \"🌐 JSing\" || [ -f \"*.rs\" ] && echo \"🦀 Rusting\" || echo \"💻 Coding\"); TIME=$(date \"+%H:%M\"); ENERGY=$((RANDOM % 100 + 1)); echo \"[$MODEL] $MOOD $ACTIVITY | ⚡$ENERGY% | 🕐 $TIME | 📁 ${DIR##*/}\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Game engine performance monitor tracking FPS targets, draw calls, memory usage, and build optimization. Displays target framerate compliance, polygon count optimization status, texture memory usage, build size tracking across platforms, and performance bottleneck alerts for game development.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); cd \"$DIR\"; ENGINE=\"\"; PERF_STATUS=\"\"; MEM_STATUS=\"\"; BUILD_STATUS=\"\"; if [ -d \"Assets\" ] && [ -d \"ProjectSettings\" ]; then ENGINE=\"🎲Unity\"; ASSET_COUNT=$(find Assets -type f ! -name \"*.meta\" | wc -l | tr -d \" \"); if [ $ASSET_COUNT -gt 2000 ]; then PERF_STATUS=\"🔴High\"; elif [ $ASSET_COUNT -gt 1000 ]; then PERF_STATUS=\"🟡Med\"; else PERF_STATUS=\"🟢Low\"; fi; TEXTURE_COUNT=$(find Assets -name \"*.png\" -o -name \"*.jpg\" -o -name \"*.tga\" | wc -l | tr -d \" \"); if [ $TEXTURE_COUNT -gt 500 ]; then MEM_STATUS=\"🔴Mem\"; elif [ $TEXTURE_COUNT -gt 200 ]; then MEM_STATUS=\"🟡Mem\"; else MEM_STATUS=\"🟢Mem\"; fi; elif [ -f \"*.uproject\" ] || [ -d \"Content\" ]; then ENGINE=\"🎮Unreal\"; ASSET_COUNT=$(find . -name \"*.uasset\" 2>/dev/null | wc -l | tr -d \" \"); if [ $ASSET_COUNT -gt 1000 ]; then PERF_STATUS=\"🔴Complex\"; elif [ $ASSET_COUNT -gt 500 ]; then PERF_STATUS=\"🟡Med\"; else PERF_STATUS=\"🟢Simple\"; fi; MEM_STATUS=\"🟢Mem\"; elif [ -f \"project.godot\" ]; then ENGINE=\"👑Godot\"; SCENE_COUNT=$(find . -name \"*.tscn\" 2>/dev/null | wc -l | tr -d \" \"); if [ $SCENE_COUNT -gt 50 ]; then PERF_STATUS=\"🔴Large\"; elif [ $SCENE_COUNT -gt 20 ]; then PERF_STATUS=\"🟡Med\"; else PERF_STATUS=\"🟢Small\"; fi; MEM_STATUS=\"🟢Mem\"; else ENGINE=\"⚙️Generic\"; PERF_STATUS=\"🟢OK\"; MEM_STATUS=\"🟢OK\"; fi; if [ -d \"Builds\" ] || [ -d \"Build\" ] || [ -d \"build\" ]; then BUILD_SIZE=$(du -sh Builds Build build 2>/dev/null | head -1 | cut -f1 | tr -d \"\\t\"); BUILD_STATUS=\"📦$BUILD_SIZE\"; else BUILD_STATUS=\"🔧NoBuild\"; fi; FPS_TARGET=\"⚡60fps\"; DIR_NAME=$(basename \"$DIR\"); echo \"[$MODEL] $ENGINE | $FPS_TARGET | $PERF_STATUS | $MEM_STATUS | $BUILD_STATUS | 📁 $DIR_NAME\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Display current model, directory, and git branch with change indicators in the status line. Shows model name, folder name, active branch, and count of uncommitted changes for complete development context.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); BRANCH=\"\"; if git rev-parse --git-dir >/dev/null 2>&1; then BRANCH=\" | 🌿 $(git branch --show-current 2>/dev/null)\"; CHANGES=$(git status --porcelain 2>/dev/null | wc -l); if [ $CHANGES -gt 0 ]; then BRANCH=\"$BRANCH ($CHANGES)\"; fi; fi; echo \"[$MODEL] 📁 ${DIR##*/}$BRANCH\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Display comprehensive Git Flow status with branch type, sync status, and change indicators. Shows branch type icon (🌿 feature, 🚀 release, 🔥 hotfix), commits ahead/behind, modified/added/deleted files, and merge target branch.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'if ! git rev-parse --git-dir >/dev/null 2>&1; then echo \"Not a git repository\"; exit 0; fi; BRANCH=$(git branch --show-current 2>/dev/null); if [ -z \"$BRANCH\" ]; then echo \"Detached HEAD\"; exit 0; fi; ICON=\"📁\"; TARGET=\"\"; if [[ $BRANCH == feature/* ]]; then ICON=\"🌿\"; TARGET=\"→ develop\"; elif [[ $BRANCH == release/* ]]; then ICON=\"🚀\"; TARGET=\"→ main\"; elif [[ $BRANCH == hotfix/* ]]; then ICON=\"🔥\"; TARGET=\"→ main+develop\"; elif [[ $BRANCH == \"develop\" ]]; then ICON=\"🔀\"; elif [[ $BRANCH == \"main\" ]]; then ICON=\"🏠\"; fi; AHEAD=$(git rev-list --count @{u}..HEAD 2>/dev/null || echo \"0\"); BEHIND=$(git rev-list --count HEAD..@{u} 2>/dev/null || echo \"0\"); SYNC=\"\"; if [ \"$AHEAD\" -gt 0 ]; then SYNC=\" ↑$AHEAD\"; fi; if [ \"$BEHIND\" -gt 0 ]; then SYNC=\"$SYNC ↓$BEHIND\"; fi; MODIFIED=$(git status --porcelain 2>/dev/null | grep \"^ M\" | wc -l | tr -d \" \"); ADDED=$(git status --porcelain 2>/dev/null | grep \"^??\" | wc -l | tr -d \" \"); DELETED=$(git status --porcelain 2>/dev/null | grep \"^ D\" | wc -l | tr -d \" \"); CHANGES=\"\"; if [ \"$MODIFIED\" -gt 0 ]; then CHANGES=\" ●$MODIFIED\"; fi; if [ \"$ADDED\" -gt 0 ]; then CHANGES=\"$CHANGES ✚$ADDED\"; fi; if [ \"$DELETED\" -gt 0 ]; then CHANGES=\"$CHANGES ✖$DELETED\"; fi; if [ -n \"$TARGET\" ]; then echo \"$ICON $BRANCH$SYNC$CHANGES | 🎯 $TARGET\"; else echo \"$ICON $BRANCH$SYNC$CHANGES\"; fi'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Simple minimal status line showing only model name and current directory. Clean and distraction-free display perfect for focused development sessions where you want minimal visual clutter.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); echo \"[$MODEL] ${DIR##*/}\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Multi-platform build status tracker for game development showing build completion across iOS, Android, PC, and WebGL platforms. Displays build progress percentages, platform-specific error counts, app store readiness indicators, and binary size compliance for each target platform.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); cd \"$DIR\"; PLATFORMS=\"\"; BUILD_STATUS=\"\"; ENGINE_TYPE=\"\"; if [ -d \"Assets\" ] && [ -f \"ProjectSettings/ProjectVersion.txt\" ]; then ENGINE_TYPE=\"🎲Unity\"; if [ -d \"Builds\" ]; then IOS_BUILD=$([ -d \"Builds/iOS\" ] && echo \"📱✅\" || echo \"📱❌\"); ANDROID_BUILD=$([ -d \"Builds/Android\" ] && echo \"🤖✅\" || echo \"🤖❌\"); PC_BUILD=$([ -d \"Builds/PC\" ] && echo \"🖥️✅\" || echo \"🖥️❌\"); WEBGL_BUILD=$([ -d \"Builds/WebGL\" ] && echo \"🌐✅\" || echo \"🌐❌\"); PLATFORMS=\"$IOS_BUILD$ANDROID_BUILD$PC_BUILD$WEBGL_BUILD\"; BUILD_COUNT=$(ls Builds/ 2>/dev/null | wc -l | tr -d \" \"); BUILD_STATUS=\"📦$BUILD_COUNT\"; else PLATFORMS=\"📱🤖🖥️🌐❓\"; BUILD_STATUS=\"🔧Pending\"; fi; elif [ -f \"*.uproject\" ] || [ -d \"Binaries\" ]; then ENGINE_TYPE=\"🎮Unreal\"; if [ -d \"Binaries\" ]; then WIN_BUILD=$([ -d \"Binaries/Win64\" ] && echo \"🖥️✅\" || echo \"🖥️❌\"); MAC_BUILD=$([ -d \"Binaries/Mac\" ] && echo \"🍎✅\" || echo \"🍎❌\"); LINUX_BUILD=$([ -d \"Binaries/Linux\" ] && echo \"🐧✅\" || echo \"🐧❌\"); PLATFORMS=\"$WIN_BUILD$MAC_BUILD$LINUX_BUILD\"; BUILD_COUNT=$(ls Binaries/ 2>/dev/null | wc -l | tr -d \" \"); BUILD_STATUS=\"📦$BUILD_COUNT\"; else PLATFORMS=\"🖥️🍎🐧❓\"; BUILD_STATUS=\"🔧Pending\"; fi; elif [ -f \"project.godot\" ]; then ENGINE_TYPE=\"👑Godot\"; if [ -d \"export\" ] || [ -d \"builds\" ]; then PLATFORMS=\"📱🤖🖥️✅\"; BUILD_STATUS=\"📦Multi\"; else PLATFORMS=\"📱🤖🖥️❓\"; BUILD_STATUS=\"🔧Setup\"; fi; else ENGINE_TYPE=\"⚙️Generic\"; PLATFORMS=\"🔧Config\"; BUILD_STATUS=\"❓Unknown\"; fi; STORE_READY=\"\"; if [[ \"$PLATFORMS\" == *\"✅\"* ]]; then ERROR_COUNT=$(find . -name \"*.log\" -exec grep -i \"error\" {} \\; 2>/dev/null | wc -l | tr -d \" \"); if [ $ERROR_COUNT -eq 0 ]; then STORE_READY=\"🏪Ready\"; elif [ $ERROR_COUNT -lt 5 ]; then STORE_READY=\"⚠️Issues\"; else STORE_READY=\"🔴Errors\"; fi; else STORE_READY=\"🔧Build\"; fi; DIR_NAME=$(basename \"$DIR\"); echo \"[$MODEL] $ENGINE_TYPE | $PLATFORMS | $BUILD_STATUS | $STORE_READY | 📁 $DIR_NAME\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Neon database context statusline showing project name, active branch, compute state, and autoscaling CU range. Uses only Neon REST API (no SQL connections needed). Helps avoid mistakes like running migrations on the wrong branch. Setup: Export NEON_API_KEY and NEON_PROJECT_ID as environment variables, or add them to your project's .env file. Get your API key from console.neon.tech and project ID from your Neon dashboard.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\" 2>/dev/null || echo \".\"); if [ -f \"$DIR/.env\" ]; then while IFS= read -r line; do case \"$line\" in NEON_API_KEY=*) export NEON_API_KEY=\"${line#*=}\";; NEON_PROJECT_ID=*) export NEON_PROJECT_ID=\"${line#*=}\";; esac; done < \"$DIR/.env\"; fi; if [ -z \"$NEON_API_KEY\" ] || [ -z \"$NEON_PROJECT_ID\" ]; then echo \"🐘 Neon 🔧 config-needed | set NEON_API_KEY & NEON_PROJECT_ID\"; exit 0; fi; PROJECT=$(curl -s -m 3 -H \"Authorization: Bearer $NEON_API_KEY\" \"https://console.neon.tech/api/v2/projects/$NEON_PROJECT_ID\" 2>/dev/null); PROJECT_NAME=$(echo \"$PROJECT\" | jq -r \".project.name // \\\"unknown\\\"\" 2>/dev/null || echo \"unknown\"); BRANCHES=$(curl -s -m 3 -H \"Authorization: Bearer $NEON_API_KEY\" \"https://console.neon.tech/api/v2/projects/$NEON_PROJECT_ID/branches\" 2>/dev/null); BRANCH_NAME=$(echo \"$BRANCHES\" | jq -r \"[.branches[] | select(.default == true)][0].name // \\\"unknown\\\"\" 2>/dev/null || echo \"unknown\"); BRANCH_ID=$(echo \"$BRANCHES\" | jq -r \"[.branches[] | select(.default == true)][0].id // \\\"\\\"\" 2>/dev/null); ENDPOINTS=$(curl -s -m 3 -H \"Authorization: Bearer $NEON_API_KEY\" \"https://console.neon.tech/api/v2/projects/$NEON_PROJECT_ID/endpoints\" 2>/dev/null); EP=$(echo \"$ENDPOINTS\" | jq -r --arg bid \"$BRANCH_ID\" \"[.endpoints[] | select(.branch_id == \\$bid)][0] // .endpoints[0]\"); STATE=$(echo \"$EP\" | jq -r \".current_state // \\\"unknown\\\"\" 2>/dev/null || echo \"unknown\"); MIN_CU=$(echo \"$EP\" | jq -r \".autoscaling_limit_min_cu // \\\"?\\\"\" 2>/dev/null || echo \"?\"); MAX_CU=$(echo \"$EP\" | jq -r \".autoscaling_limit_max_cu // \\\"?\\\"\" 2>/dev/null || echo \"?\"); case \"$STATE\" in active) STATE_ICON=\"🟢\";; idle) STATE_ICON=\"🟡\";; suspended) STATE_ICON=\"🔴\";; *) STATE_ICON=\"❓\";; esac; echo \"🐘 Neon | 📁 $PROJECT_NAME | 🌿 $BRANCH_NAME | $STATE_ICON $STATE | ⚡ $MIN_CU-$MAX_CU CU\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Development-focused Neon monitor showing connection status, response time, and database activity. Perfect for daily development work. Setup: Add variables to your project's .env file or export them: NEON_ENDPOINT, NEON_DATABASE, NEON_API_KEY, and NEON_PROJECT_ID. Shows connection state, response time, pool status, compute usage, environment detection, and project info for development workflow.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\" 2>/dev/null || echo \"unknown\"); DIR_NAME=$(basename \"$DIR\" 2>/dev/null || echo \"project\"); if [ -f \"$DIR/.env\" ]; then while IFS= read -r line; do case \"$line\" in NEON_ENDPOINT=*) export NEON_ENDPOINT=\"${line#*=}\";; NEON_DATABASE=*) export NEON_DATABASE=\"${line#*=}\";; NEON_API_KEY=*) export NEON_API_KEY=\"${line#*=}\";; NEON_PROJECT_ID=*) export NEON_PROJECT_ID=\"${line#*=}\";; esac; done < \"$DIR/.env\"; fi; if [ -n \"$NEON_ENDPOINT\" ] && [ -n \"$NEON_DATABASE\" ]; then REGION=$(echo \"$NEON_ENDPOINT\" | grep -o \"us-[a-z0-9-]*\" | head -1 || echo \"unknown\"); DB_NAME=$(echo \"$NEON_DATABASE\" | cut -c1-6); START_TIME=$(date +%s); DNS_TEST=$(nslookup \"$NEON_ENDPOINT\" >/dev/null 2>&1 && echo \"🟢\" || echo \"🔴\"); END_TIME=$(date +%s); RESPONSE_TIME=$(( (END_TIME - START_TIME) * 1000 )); if [ \"$RESPONSE_TIME\" -lt 100 ]; then PERF_ICON=\"⚡\"; elif [ \"$RESPONSE_TIME\" -lt 500 ]; then PERF_ICON=\"🟡\"; else PERF_ICON=\"🔴\"; fi; if command -v nc >/dev/null 2>&1; then CONNECTION_TEST=$(timeout 3 nc -z \"$NEON_ENDPOINT\" 5432 >/dev/null 2>&1 && echo \"connected\" || echo \"sleeping\"); else CONNECTION_TEST=\"unknown\"; fi; if [ \"$CONNECTION_TEST\" = \"connected\" ]; then CONN_ICON=\"🟢\"; CONN_STATUS=\"active\"; POOL_INFO=\"pool:✓\"; elif [ \"$CONNECTION_TEST\" = \"sleeping\" ] && [ \"$DNS_TEST\" = \"🟢\" ]; then CONN_ICON=\"🟡\"; CONN_STATUS=\"sleep\"; POOL_INFO=\"pool:💤\"; else CONN_ICON=\"🔴\"; CONN_STATUS=\"down\"; POOL_INFO=\"pool:✗\"; fi; PROJECT_ID=$(echo \"$NEON_ENDPOINT\" | cut -d- -f3- | cut -d. -f1); ENV_TYPE=\"dev\"; if echo \"$DIR_NAME\" | grep -qi \"prod\\|main\\|master\"; then ENV_TYPE=\"prod\"; elif echo \"$DIR_NAME\" | grep -qi \"stage\\|staging\"; then ENV_TYPE=\"stage\"; fi; CURRENT_TIME=$(date \"+%H:%M\"); if [ -n \"$NEON_API_KEY\" ] && [ -n \"$NEON_PROJECT_ID\" ]; then QUOTA_DATA=$(curl -s -m 3 -H \"Authorization: Bearer $NEON_API_KEY\" \"https://console.neon.tech/api/v2/projects/$NEON_PROJECT_ID/consumption\" 2>/dev/null | jq -r \".active_time_seconds // 0\" 2>/dev/null || echo \"0\"); USAGE_HOURS=$(( QUOTA_DATA / 3600 )); if [ \"$USAGE_HOURS\" -gt 0 ]; then USAGE_INFO=\"${USAGE_HOURS}h\"; else USAGE_INFO=\"<1h\"; fi; else USAGE_INFO=\"n/a\"; fi; echo \"🐘 Neon $CONN_ICON $CONN_STATUS | $PERF_ICON ${RESPONSE_TIME}ms | 📊 $DB_NAME | $POOL_INFO | ⏱️ $USAGE_INFO | 🌍 $ENV_TYPE | 📁 $DIR_NAME\"; else echo \"🐘 Neon 🔧 config-needed | ⚠️ set NEON_ENDPOINT & NEON_DATABASE | 📁 $DIR_NAME\"; fi'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Resource-focused Neon monitor showing storage usage, compute consumption, and cost tracking. Perfect for monitoring resource usage and billing. Setup: Add variables to your project's .env file or export them: NEON_ENDPOINT, NEON_DATABASE, NEON_API_KEY, and NEON_PROJECT_ID. Shows storage usage, compute hours, estimated costs, activity metrics, and resource consumption tracking.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\" 2>/dev/null || echo \"unknown\"); DIR_NAME=$(basename \"$DIR\" 2>/dev/null || echo \"project\"); if [ -f \"$DIR/.env\" ]; then while IFS= read -r line; do case \"$line\" in NEON_ENDPOINT=*) export NEON_ENDPOINT=\"${line#*=}\";; NEON_DATABASE=*) export NEON_DATABASE=\"${line#*=}\";; NEON_API_KEY=*) export NEON_API_KEY=\"${line#*=}\";; NEON_PROJECT_ID=*) export NEON_PROJECT_ID=\"${line#*=}\";; esac; done < \"$DIR/.env\"; fi; if [ -n \"$NEON_ENDPOINT\" ] && [ -n \"$NEON_DATABASE\" ] && [ -n \"$NEON_API_KEY\" ] && [ -n \"$NEON_PROJECT_ID\" ]; then REGION=$(echo \"$NEON_ENDPOINT\" | grep -o \"us-[a-z0-9-]*\" | head -1 || echo \"unknown\"); DB_NAME=$(echo \"$NEON_DATABASE\" | cut -c1-6); CONNECTION_TEST=$(timeout 3 nc -z \"$NEON_ENDPOINT\" 5432 >/dev/null 2>&1 && echo \"connected\" || echo \"sleeping\"); if [ \"$CONNECTION_TEST\" = \"connected\" ]; then CONN_ICON=\"🟢\"; STATUS=\"active\"; else CONN_ICON=\"🟡\"; STATUS=\"sleep\"; fi; CONSUMPTION_DATA=$(curl -s -m 5 -H \"Authorization: Bearer $NEON_API_KEY\" \"https://console.neon.tech/api/v2/consumption_history/projects/$NEON_PROJECT_ID?limit=1\" 2>/dev/null); if [ -n \"$CONSUMPTION_DATA\" ] && echo \"$CONSUMPTION_DATA\" | jq -e \".periods[0]\" >/dev/null 2>&1; then PERIOD_DATA=$(echo \"$CONSUMPTION_DATA\" | jq \".periods[0]\" 2>/dev/null); ACTIVE_TIME=$(echo \"$PERIOD_DATA\" | jq -r \".active_time_seconds // 0\"); COMPUTE_TIME=$(echo \"$PERIOD_DATA\" | jq -r \".compute_time_seconds // 0\"); STORAGE_BYTES=$(echo \"$PERIOD_DATA\" | jq -r \".synthetic_storage_size_bytes // 0\"); WRITTEN_BYTES=$(echo \"$PERIOD_DATA\" | jq -r \".written_data_bytes // 0\"); ACTIVE_HOURS=$(( ACTIVE_TIME / 3600 )); COMPUTE_HOURS=$(( COMPUTE_TIME / 3600 )); if [ \"$STORAGE_BYTES\" -gt 0 ]; then STORAGE_MB=$(( STORAGE_BYTES / 1048576 )); if [ \"$STORAGE_MB\" -lt 1024 ]; then STORAGE_DISPLAY=\"${STORAGE_MB}MB\"; else STORAGE_GB=$(( STORAGE_MB / 1024 )); STORAGE_DISPLAY=\"${STORAGE_GB}GB\"; fi; else STORAGE_DISPLAY=\"<1MB\"; fi; if [ \"$WRITTEN_BYTES\" -gt 0 ]; then WRITTEN_MB=$(( WRITTEN_BYTES / 1048576 )); ACTIVITY_DISPLAY=\"${WRITTEN_MB}MB↑\"; else ACTIVITY_DISPLAY=\"idle\"; fi; ESTIMATED_COST=$(echo \"scale=2; ($ACTIVE_HOURS * 0.25) + ($STORAGE_MB * 0.0001)\" | bc 2>/dev/null || echo \"0.00\"); COST_DISPLAY=\"\\$${ESTIMATED_COST}\"; if [ \"$ACTIVE_HOURS\" -gt 100 ]; then USAGE_ICON=\"🔴\"; elif [ \"$ACTIVE_HOURS\" -gt 50 ]; then USAGE_ICON=\"🟡\"; else USAGE_ICON=\"🟢\"; fi; else ACTIVE_HOURS=0; STORAGE_DISPLAY=\"n/a\"; ACTIVITY_DISPLAY=\"n/a\"; COST_DISPLAY=\"n/a\"; USAGE_ICON=\"❓\"; fi; CURRENT_TIME=$(date \"+%H:%M\"); PLAN_TYPE=\"free\"; if [ \"$ACTIVE_HOURS\" -gt 100 ]; then PLAN_TYPE=\"paid\"; fi; echo \"🐘 Neon $CONN_ICON $STATUS | 💾 $STORAGE_DISPLAY | $USAGE_ICON ${ACTIVE_HOURS}h compute | 💰 $COST_DISPLAY/$PLAN_TYPE | 📈 $ACTIVITY_DISPLAY | ⏰ $CURRENT_TIME | 📁 $DIR_NAME\"; else echo \"🐘 Neon 🔧 config-needed | ⚠️ set NEON_ENDPOINT, NEON_DATABASE, NEON_API_KEY & NEON_PROJECT_ID | 📁 $DIR_NAME\"; fi'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "A colorful celebration of your coding journey. Dynamic rainbow colors that cycle with time, energy levels based on time of day, and productivity streaks. Displays: Rainbow symbol (🌈), Cycling colors (🔴🟠🟡🟢🔵🟣 changes every second based on current seconds), Time-based energy (☀️ Morning <12h, 🌤️ Afternoon 12-18h, 🌙 Evening >18h), Productivity streak (day of year modulo 100 for variety).",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); COLORS=(\"🔴\" \"🟠\" \"🟡\" \"🟢\" \"🔵\" \"🟣\"); COLOR_INDEX=$(($(date +%S) % 6)); COLOR=${COLORS[$COLOR_INDEX]}; RAINBOW=\"🌈\"; HOUR=$(date +%H); ENERGY=$([ $HOUR -lt 12 ] && echo \"☀️ Morning\" || [ $HOUR -lt 18 ] && echo \"🌤️ Afternoon\" || echo \"🌙 Evening\"); STREAK=$(($(date +%j) % 100)); echo \"[$MODEL] $RAINBOW $COLOR $ENERGY | ⚡Streak: $STREAK | 📁 ${DIR##*/}\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "A virtual pet that evolves based on your coding activity. Health and happiness change over time, creating an emotional connection with your coding sessions. Displays: Pet emoji (🐱 healthy, 😺 good, 😿 tired, 💀 exhausted), Mood emoji (✨ very happy, 😊 happy, 😐 neutral, 😢 sad), HP (Health Points 0-100, decreases every 20 commits), Joy (Happiness 0-100, increases every 10 commits), Commits counter (tracks session activity).",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); SESSION=$(echo \"$input\" | jq -r \".session_id\" | cut -c1-8); CACHE=\"/tmp/tamagochi_$SESSION\"; if [ ! -f \"$CACHE\" ]; then echo \"100 50 0\" > \"$CACHE\"; fi; read HEALTH HAPPINESS COMMITS < \"$CACHE\"; COMMITS=$((COMMITS + 1)); if [ $((COMMITS % 10)) -eq 0 ]; then HAPPINESS=$((HAPPINESS + 5)); fi; if [ $((COMMITS % 20)) -eq 0 ]; then HEALTH=$((HEALTH - 10)); fi; HEALTH=$((HEALTH > 100 ? 100 : HEALTH)); HAPPINESS=$((HAPPINESS > 100 ? 100 : HAPPINESS)); echo \"$HEALTH $HAPPINESS $COMMITS\" > \"$CACHE\"; if [ $HEALTH -gt 80 ]; then PET=\"🐱\"; elif [ $HEALTH -gt 60 ]; then PET=\"😺\"; elif [ $HEALTH -gt 40 ]; then PET=\"😿\"; else PET=\"💀\"; fi; if [ $HAPPINESS -gt 80 ]; then MOOD=\"✨\"; elif [ $HAPPINESS -gt 60 ]; then MOOD=\"😊\"; elif [ $HAPPINESS -gt 40 ]; then MOOD=\"😐\"; else MOOD=\"😢\"; fi; echo \"[$MODEL] $PET$MOOD HP:$HEALTH Joy:$HAPPINESS | 📁 ${DIR##*/} | Commits:$COMMITS\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Track your coding fitness with steps and calories burned through programming. Earn badges and monitor your coding intensity levels. Displays: Activity intensity (🚶 walking 0-29% cycle, 🏃 running 30-69% cycle, 💨 sprinting 70%+ cycle), Steps counter (+1 per interaction), Calories burned (+2 per interaction), Achievement badges (🥉 bronze at 50 steps, 🏆 gold at 100 steps).",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); SESSION=$(echo \"$input\" | jq -r \".session_id\" | cut -c1-8); CACHE=\"/tmp/fitness_$SESSION\"; if [ ! -f \"$CACHE\" ]; then echo \"0 0\" > \"$CACHE\"; fi; read STEPS CALORIES < \"$CACHE\"; STEPS=$((STEPS + 1)); CALORIES=$((CALORIES + 2)); echo \"$STEPS $CALORIES\" > \"$CACHE\"; BADGE=\"\"; [ $STEPS -ge 100 ] && BADGE=\"🏆\"; [ $STEPS -ge 50 ] && BADGE=\"🥉\"; INTENSITY=$([ $((STEPS % 10)) -lt 3 ] && echo \"🚶\" || [ $((STEPS % 10)) -lt 7 ] && echo \"🏃\" || echo \"💨\"); echo \"[$MODEL] $INTENSITY Steps: $STEPS | 🔥 ${CALORIES}cal $BADGE | 📁 ${DIR##*/}\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Display comprehensive project information including model, directory, Node.js version, and Claude Code version. Perfect for multi-project environments where you need full context about your development setup.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); VERSION=$(echo \"$input\" | jq -r \".version\"); NODE_VER=$(node --version 2>/dev/null || echo \"N/A\"); echo \"[$MODEL] 📁 ${DIR##*/} | Node $NODE_VER | Claude $VERSION\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Level up your coding skills like in an RPG. Gain experience with each session, advance through classes from Novice to Archmage, and track your health and mana. Displays: Class progression (Novice 1-4, Wizard 5-9, Archmage 10+), Level (increases when XP reaches level*100), HP (Health Points 0-10, calculated from git changes: 10 minus uncommitted files), Mana (🔵 if package.json exists, ⚪ if not), XP (Experience Points, +3 per interaction, resets on level up).",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); SESSION=$(echo \"$input\" | jq -r \".session_id\" | cut -c1-8); CACHE=\"/tmp/rpg_$SESSION\"; if [ ! -f \"$CACHE\" ]; then echo \"1 0 Novice\" > \"$CACHE\"; fi; read LEVEL XP CLASS < \"$CACHE\"; XP=$((XP + 3)); if [ $XP -ge $((LEVEL * 100)) ]; then LEVEL=$((LEVEL + 1)); XP=0; [ $LEVEL -eq 5 ] && CLASS=\"Wizard\"; [ $LEVEL -eq 10 ] && CLASS=\"Archmage\"; fi; echo \"$LEVEL $XP $CLASS\" > \"$CACHE\"; MANA=$([ -f \"package.json\" ] && echo \"🔵\" || echo \"⚪\"); HP=$(git status --porcelain 2>/dev/null | wc -l | awk \"{\\$1=\\$1}1\"); HP=$((10 - HP)); echo \"[$MODEL] ⚔️ $CLASS Lv.$LEVEL | HP:$HP/10 $MANA | 📁 ${DIR##*/} | XP:$XP/$((LEVEL * 100))\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Status line with timestamp showing model, directory, and current time. Useful for tracking session duration and maintaining awareness of time during long coding sessions.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); TIME=$(date \"+%H:%M\"); echo \"[$MODEL] 📁 ${DIR##*/} | 🕐 $TIME\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Unity project dashboard displaying scene info, build target, asset pipeline status, and Unity version. Shows current scene name, active platform (iOS/Android/PC/WebGL), asset processing queue status, memory usage warnings, and available Unity package updates. Detects Unity projects and provides real-time development metrics.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "python3 -c \"import json, sys, os, subprocess, glob; data=json.load(sys.stdin); model=data['model']['display_name']; current_dir=data['workspace']['current_dir']; os.chdir(current_dir); unity_project = os.path.exists('Assets') and os.path.exists('ProjectSettings'); scene_info = ''; build_target = ''; asset_status = ''; unity_version = ''; package_status = ''; if unity_project: scenes = glob.glob('Assets/**/*.unity', recursive=True); active_scene = os.path.basename(scenes[0]) if scenes else 'None'; scene_info = f'🎮 {active_scene.replace(\".unity\", \"\")}'; try: with open('ProjectSettings/ProjectVersion.txt', 'r') as f: unity_version = f.read().split(':')[1].strip()[:6]; except: unity_version = 'Unknown'; try: with open('ProjectSettings/EditorBuildSettings.asset', 'r') as f: content = f.read(); if 'iPhone' in content: build_target = '📱iOS'; elif 'Android' in content: build_target = '🤖And'; elif 'StandaloneWindows' in content: build_target = '🖥️PC'; elif 'WebGL' in content: build_target = '🌐Web'; else: build_target = '⚙️Multi'; except: build_target = '⚙️Build'; asset_count = len(glob.glob('Assets/**/*', recursive=True)) - len(glob.glob('Assets/**/*.meta', recursive=True)); if asset_count > 1000: asset_status = '⚠️Assets'; elif asset_count > 500: asset_status = '📦Assets'; else: asset_status = '✅Assets'; packages_dir = 'Packages'; if os.path.exists(f'{packages_dir}/manifest.json'): package_status = '📋Pkgs'; print(f'[{model}] {unity_version} | {scene_info} | {build_target} | {asset_status} | {package_status}'); else: dir_name = os.path.basename(current_dir); print(f'[{model}] 📁 {dir_name} | ❌ Not Unity Project')\""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Real-time Vercel deployment monitor with clickable deploy link. Shows build status, time since last deployment, and a clickable OSC 8 hyperlink to the deployment URL (Cmd+click). Setup: Export environment variables 'export VERCEL_TOKEN=your_token' and 'export VERCEL_PROJECT_ID=your_project_id' (or manually replace $VERCEL_TOKEN and $VERCEL_PROJECT_ID in the command if you prefer not to use environment variables). Get your token from vercel.com/account/tokens and project ID from your Vercel dashboard.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); DEPLOY_DATA=$(curl -s -H \"Authorization: Bearer $VERCEL_TOKEN\" \"https://api.vercel.com/v6/deployments?projectId=$VERCEL_PROJECT_ID&limit=1\" 2>/dev/null); if [ -n \"$DEPLOY_DATA\" ] && [ \"$DEPLOY_DATA\" != \"null\" ]; then STATE=$(echo \"$DEPLOY_DATA\" | jq -r \".deployments[0].state // empty\"); FULL_URL=$(echo \"$DEPLOY_DATA\" | jq -r \".deployments[0].url // empty\"); CREATED=$(echo \"$DEPLOY_DATA\" | jq -r \".deployments[0].created // empty\"); if [ -n \"$CREATED\" ] && [ \"$CREATED\" != \"null\" ]; then AGO=$(( ($(date +%s) - $CREATED/1000) / 60 )); TIME_AGO=\"${AGO}m ago\"; else TIME_AGO=\"unknown\"; fi; case \"$STATE\" in READY) STATUS_ICON=\"✅\";; BUILDING) STATUS_ICON=\"🔄\";; QUEUED) STATUS_ICON=\"⏳\";; ERROR) STATUS_ICON=\"❌\";; *) STATUS_ICON=\"❓\";; esac; else STATE=\"unavailable\"; FULL_URL=\"\"; TIME_AGO=\"unknown\"; STATUS_ICON=\"❓\"; fi; echo \"▲ Vercel | $STATUS_ICON $STATE | ⏰ $TIME_AGO | \u001b]8;;https://$FULL_URL\u0007🌐 Deploy\u001b]8;;\u0007\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Intelligent error monitoring system that tracks deployment failures and build issues. Automatically sends desktop notifications when errors are detected and maintains error count tracking. Features building status monitoring and provides immediate alerts for deployment problems, helping you catch issues quickly. Setup: Export environment variables 'export VERCEL_TOKEN=your_token' and 'export VERCEL_PROJECT_ID=your_project_id' (or manually replace $VERCEL_TOKEN and $VERCEL_PROJECT_ID in the command if you prefer not to use environment variables). Get your token from vercel.com/account/tokens and project ID from your Vercel dashboard. Desktop notifications work on macOS.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); SESSION=$(echo \"$input\" | jq -r \".session_id\" | cut -c1-8); ERROR_FILE=\"/tmp/vercel_errors_$SESSION\"; DEPLOYS=$(curl -s -H \"Authorization: Bearer $VERCEL_TOKEN\" \"https://api.vercel.com/v6/deployments?projectId=$VERCEL_PROJECT_ID&limit=5\" 2>/dev/null); if [ -n \"$DEPLOYS\" ] && [ \"$DEPLOYS\" != \"null\" ]; then ERRORS=$(echo \"$DEPLOYS\" | jq -r \".deployments[].state\" | grep -c \"ERROR\" 2>/dev/null || echo \"0\"); BUILDING=$(echo \"$DEPLOYS\" | jq -r \".deployments[].state\" | grep -c \"BUILDING\" 2>/dev/null || echo \"0\"); if [ \"$ERRORS\" -gt 0 ]; then echo \"$ERRORS\" > \"$ERROR_FILE\"; ALERT=\"🚨 $ERRORS errors!\"; osascript -e \"display notification \\\"$ERRORS deployment errors found\\\" with title \\\"Vercel Alert\\\"\" 2>/dev/null; elif [ \"$BUILDING\" -gt 0 ]; then ALERT=\"🔄 Building...\"; else ALERT=\"✅ All good\"; fi; else ALERT=\"❓ API error\"; ERRORS=\"?\"; BUILDING=\"?\"; fi; echo \"▲ Vercel 🚀 $ALERT | Building: $BUILDING | 📁 ${DIR##*/}\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Monitors both production and preview environments simultaneously with color-coded status indicators. Perfect for teams managing multiple deployment targets. Shows real-time status of your latest production and preview deployments with green/yellow/red indicators for quick visual assessment. Setup: Export environment variables 'export VERCEL_TOKEN=your_token' and 'export VERCEL_PROJECT_ID=your_project_id' (or manually replace $VERCEL_TOKEN and $VERCEL_PROJECT_ID in the command if you prefer not to use environment variables). Get your token from vercel.com/account/tokens and project ID from your Vercel dashboard.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); DEPLOYS=$(curl -s -H \"Authorization: Bearer $VERCEL_TOKEN\" \"https://api.vercel.com/v6/deployments?projectId=$VERCEL_PROJECT_ID&limit=10\" 2>/dev/null); if [ -n \"$DEPLOYS\" ] && [ \"$DEPLOYS\" != \"null\" ]; then PROD=$(echo \"$DEPLOYS\" | jq -r \".deployments[] | select(.target == \\\"production\\\") | .state\" | head -1); PREVIEW=$(echo \"$DEPLOYS\" | jq -r \".deployments[] | select(.target == \\\"preview\\\") | .state\" | head -1); case \"$PROD\" in READY) PROD_ICON=\"🟢\";; BUILDING) PROD_ICON=\"🟡\";; ERROR) PROD_ICON=\"🔴\";; *) PROD_ICON=\"⚪\";; esac; case \"$PREVIEW\" in READY) PREV_ICON=\"🟢\";; BUILDING) PREV_ICON=\"🟡\";; ERROR) PREV_ICON=\"🔴\";; *) PREV_ICON=\"⚪\";; esac; else PROD_ICON=\"❓\"; PREV_ICON=\"❓\"; fi; echo \"▲ Vercel 🚀 Prod:$PROD_ICON Prev:$PREV_ICON | 📁 ${DIR##*/}\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Watch your code garden grow with each session. Plants evolve from seeds to trees based on your activity, with dynamic weather effects. Displays: Plant stages (🌱 seed 0-9, 🌿 sprout 10-19, 🍃 sapling 20-29, 🌳 tree 30-39, 🌺 flower 40+), Weather (🌧️ rainy every 7 growth points, ☀️ sunny every 5 points, ⛅ cloudy default), Garden Level (stage number), Growth counter (total session interactions).",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); MODEL=$(echo \"$input\" | jq -r \".model.display_name\"); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); SESSION=$(echo \"$input\" | jq -r \".session_id\" | cut -c1-8); CACHE=\"/tmp/garden_$SESSION\"; if [ ! -f \"$CACHE\" ]; then echo \"0\" > \"$CACHE\"; fi; GROWTH=$(cat \"$CACHE\"); GROWTH=$((GROWTH + 1)); echo \"$GROWTH\" > \"$CACHE\"; STAGE=$((GROWTH / 10)); case $STAGE in 0) PLANT=\"🌱\";; 1) PLANT=\"🌿\";; 2) PLANT=\"🍃\";; 3) PLANT=\"🌳\";; *) PLANT=\"🌺\";; esac; WEATHER=$([ $((GROWTH % 7)) -eq 0 ] && echo \"🌧️\" || [ $((GROWTH % 5)) -eq 0 ] && echo \"☀️\" || echo \"⛅\"); echo \"[$MODEL] $PLANT $WEATHER Garden Lv.$STAGE | 📁 ${DIR##*/} | Growth: $GROWTH\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Auto-detecting Vercel deployment monitor with zero configuration required. Automatically discovers your Vercel auth token from CLI config (macOS: ~/Library/Application Support/com.vercel.cli/auth.json, Linux: ~/.config/vercel/auth.json, Windows: %APPDATA%/vercel/auth.json) and project ID from .vercel/project.json. Shows real-time deployment status, build state icons, deployment URL preview, and time elapsed since last deployment. Falls back gracefully to environment variables VERCEL_TOKEN and VERCEL_PROJECT_ID if auto-detection fails. Works across all platforms without any manual setup.",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "bash -c 'input=$(cat); DIR=$(echo \"$input\" | jq -r \".workspace.current_dir\"); if [[ \"$OSTYPE\" == \"darwin\"* ]]; then AUTH_FILE=\"$HOME/Library/Application Support/com.vercel.cli/auth.json\"; elif [[ \"$OSTYPE\" == \"linux-gnu\"* ]]; then AUTH_FILE=\"$HOME/.config/vercel/auth.json\"; elif [[ \"$OSTYPE\" == \"msys\" || \"$OSTYPE\" == \"cygwin\" ]]; then AUTH_FILE=\"$APPDATA/vercel/auth.json\"; else AUTH_FILE=\"$HOME/.config/vercel/auth.json\"; fi; PROJECT_FILE=\".vercel/project.json\"; if [ -f \"$AUTH_FILE\" ]; then TOKEN=$(jq -r \".token // empty\" \"$AUTH_FILE\" 2>/dev/null); else TOKEN=\"$VERCEL_TOKEN\"; fi; if [ -f \"$PROJECT_FILE\" ]; then PROJECT=$(jq -r \".projectId // empty\" \"$PROJECT_FILE\" 2>/dev/null); else PROJECT=\"$VERCEL_PROJECT_ID\"; fi; if [ -n \"$TOKEN\" ] && [ -n \"$PROJECT\" ] && [ \"$TOKEN\" != \"null\" ] && [ \"$PROJECT\" != \"null\" ]; then DEPLOY_DATA=$(curl -s -H \"Authorization: Bearer $TOKEN\" \"https://api.vercel.com/v6/deployments?projectId=$PROJECT&limit=1\" 2>/dev/null); if [ -n \"$DEPLOY_DATA\" ] && [ \"$DEPLOY_DATA\" != \"null\" ]; then STATE=$(echo \"$DEPLOY_DATA\" | jq -r \".deployments[0].state // empty\"); URL=$(echo \"$DEPLOY_DATA\" | jq -r \".deployments[0].url // empty\" | cut -c1-20); CREATED=$(echo \"$DEPLOY_DATA\" | jq -r \".deployments[0].created // empty\"); if [ -n \"$CREATED\" ] && [ \"$CREATED\" != \"null\" ]; then AGO=$(( ($(date +%s) - $CREATED/1000) / 60 )); TIME_AGO=\"${AGO}m ago\"; else TIME_AGO=\"unknown\"; fi; case \"$STATE\" in READY) STATUS_ICON=\"✅\";; BUILDING) STATUS_ICON=\"🔄\";; QUEUED) STATUS_ICON=\"⏳\";; ERROR) STATUS_ICON=\"❌\";; *) STATUS_ICON=\"❓\";; esac; else STATE=\"API error\"; URL=\"\"; TIME_AGO=\"\"; STATUS_ICON=\"❌\"; fi; else STATE=\"config missing\"; URL=\"\"; TIME_AGO=\"\"; STATUS_ICON=\"⚠️\"; fi; echo \"▲ Vercel 🚀 $STATUS_ICON $STATE | 🌐 $URL | ⏰ $TIME_AGO | 📁 ${DIR##*/}\"'"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "Custom telemetry configuration with different endpoint.",
|
||||
"env": {
|
||||
"CLAUDE_CODE_ENABLE_TELEMETRY": "0",
|
||||
"OTEL_METRICS_EXPORTER": "custom"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"description": "Disable Claude Code telemetry for privacy.",
|
||||
"env": {
|
||||
"DISABLE_TELEMETRY": "1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"description": "Enable Claude Code telemetry for usage analytics and improvements.",
|
||||
"env": {
|
||||
"CLAUDE_CODE_ENABLE_TELEMETRY": "1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"description": "Configure LangSmith tracing environment variables for Claude Code observability. Sends conversation traces to LangSmith for monitoring and analysis. Requires: LangSmith account and API key from https://smith.langchain.com/settings/apikeys. After installation, replace YOUR_API_KEY_HERE with your actual API key (starts with lsv2_pt_). Set TRACE_TO_LANGSMITH to false to disable tracing.",
|
||||
"env": {
|
||||
"TRACE_TO_LANGSMITH": "true",
|
||||
"CC_LANGSMITH_API_KEY": "YOUR_API_KEY_HERE",
|
||||
"CC_LANGSMITH_PROJECT": "claude-code-project",
|
||||
"CC_LANGSMITH_DEBUG": "false"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user