Initial release: Professional Claude Code Skills Marketplace
8 production-ready skills for enhanced Claude Code workflows: 1. github-ops - Comprehensive GitHub operations via gh CLI and API - PR/issue management, workflow automation, API interactions 2. markdown-tools - Document conversion to markdown - PDF/Word/PowerPoint/Confluence → Markdown with WSL support 3. mermaid-tools - Mermaid diagram generation - Extract and render diagrams from markdown to PNG/SVG 4. statusline-generator - Claude Code statusline customization - Multi-line layouts, cost tracking, git status, colors 5. teams-channel-post-writer - Microsoft Teams communication - Adaptive Cards, formatted announcements, corporate standards 6. repomix-unmixer - Repomix file extraction - Extract from XML/Markdown/JSON formats with auto-detection 7. skill-creator - Skill development toolkit - Init, validation, packaging scripts with privacy best practices 8. llm-icon-finder - AI/LLM brand icon finder - 100+ AI model icons in SVG/PNG/WEBP formats Features: - Individual skill installation (install only what you need) - Progressive disclosure design (optimized context usage) - Privacy-safe examples (no personal/company information) - Comprehensive documentation with references - Production-tested workflows Installation: /plugin marketplace add daymade/claude-code-skills /plugin marketplace install daymade/claude-code-skills#<skill-name> Version: 1.2.0 License: See individual skill licenses 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
80
statusline-generator/scripts/generate_statusline.sh
Normal file
80
statusline-generator/scripts/generate_statusline.sh
Normal file
@@ -0,0 +1,80 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Read JSON input from stdin
|
||||
input=$(cat)
|
||||
|
||||
# Extract values from JSON
|
||||
model_full=$(echo "$input" | jq -r '.model.display_name' 2>/dev/null || echo "Claude")
|
||||
cwd=$(echo "$input" | jq -r '.workspace.current_dir' 2>/dev/null || pwd)
|
||||
transcript=$(echo "$input" | jq -r '.transcript_path' 2>/dev/null)
|
||||
|
||||
# Shorten model name: "Sonnet 4.5 (with 1M token context)" -> "Sonnet 4.5 [1M]"
|
||||
model=$(echo "$model_full" | sed -E 's/(.*)\(with ([0-9]+[KM]) token context\)/\1[\2]/' | sed 's/ *$//')
|
||||
|
||||
# Get username
|
||||
username=$(whoami)
|
||||
|
||||
# Shorten path (replace home with ~)
|
||||
short_path="${cwd/#$HOME/~}"
|
||||
|
||||
# Git branch status
|
||||
git_info=""
|
||||
if [ -d "$cwd/.git" ] || git -C "$cwd" rev-parse --git-dir >/dev/null 2>&1; then
|
||||
branch=$(git -C "$cwd" --no-optional-locks branch --show-current 2>/dev/null || echo "detached")
|
||||
|
||||
# Check for changes
|
||||
status=""
|
||||
if ! git -C "$cwd" --no-optional-locks diff --quiet 2>/dev/null || \
|
||||
! git -C "$cwd" --no-optional-locks diff --cached --quiet 2>/dev/null; then
|
||||
status="*"
|
||||
fi
|
||||
|
||||
# Check for untracked files
|
||||
if [ -n "$(git -C "$cwd" --no-optional-locks ls-files --others --exclude-standard 2>/dev/null)" ]; then
|
||||
status="${status}+"
|
||||
fi
|
||||
|
||||
# Format git info with color
|
||||
if [ -n "$status" ]; then
|
||||
# Red for dirty
|
||||
git_info=$(printf ' \033[01;31m[git:%s%s]\033[00m' "$branch" "$status")
|
||||
else
|
||||
# Yellow for clean
|
||||
git_info=$(printf ' \033[01;33m[git:%s]\033[00m' "$branch")
|
||||
fi
|
||||
fi
|
||||
|
||||
# Cost information using ccusage with caching
|
||||
cost_info=""
|
||||
cache_file="/tmp/claude_cost_cache_$(date +%Y%m%d_%H%M).txt"
|
||||
|
||||
# Clean old cache files (older than 2 minutes)
|
||||
find /tmp -name "claude_cost_cache_*.txt" -mmin +2 -delete 2>/dev/null
|
||||
|
||||
if [ -f "$cache_file" ]; then
|
||||
# Use cached costs
|
||||
cost_info=$(cat "$cache_file")
|
||||
else
|
||||
# Get costs from ccusage (in background to not block statusline on first run)
|
||||
{
|
||||
session=$(ccusage session --json --offline -o desc 2>/dev/null | jq -r '.sessions[0].totalCost' 2>/dev/null | xargs printf "%.2f")
|
||||
daily=$(ccusage daily --json --offline -o desc 2>/dev/null | jq -r '.daily[0].totalCost' 2>/dev/null | xargs printf "%.2f")
|
||||
|
||||
if [ -n "$session" ] && [ -n "$daily" ] && [ "$session" != "" ] && [ "$daily" != "" ]; then
|
||||
printf ' \033[01;35m[$%s/$%s]\033[00m' "$session" "$daily" > "$cache_file"
|
||||
fi
|
||||
} &
|
||||
|
||||
# Try to use previous cache while new one is being generated
|
||||
prev_cache=$(find /tmp -name "claude_cost_cache_*.txt" -mmin -10 2>/dev/null | head -1)
|
||||
if [ -f "$prev_cache" ]; then
|
||||
cost_info=$(cat "$prev_cache")
|
||||
fi
|
||||
fi
|
||||
|
||||
# Print the final status line (multi-line format for portrait screens)
|
||||
# Line 1: username (model) [costs]
|
||||
# Line 2: path (bright white for better visibility)
|
||||
# Line 3: [git:branch]
|
||||
printf '\033[01;32m%s\033[00m \033[01;36m(%s)\033[00m%s\n\033[01;37m%s\033[00m\n%s' \
|
||||
"$username" "$model" "$cost_info" "$short_path" "$git_info"
|
||||
73
statusline-generator/scripts/install_statusline.sh
Normal file
73
statusline-generator/scripts/install_statusline.sh
Normal file
@@ -0,0 +1,73 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Install statusline script to Claude Code configuration directory
|
||||
# Usage: ./install_statusline.sh [target_path]
|
||||
|
||||
set -e
|
||||
|
||||
# Determine target path
|
||||
if [ -n "$1" ]; then
|
||||
TARGET_PATH="$1"
|
||||
else
|
||||
TARGET_PATH="$HOME/.claude/statusline.sh"
|
||||
fi
|
||||
|
||||
# Get the directory where this script is located
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
SOURCE_SCRIPT="$SCRIPT_DIR/generate_statusline.sh"
|
||||
|
||||
# Check if source script exists
|
||||
if [ ! -f "$SOURCE_SCRIPT" ]; then
|
||||
echo "❌ Error: generate_statusline.sh not found at $SOURCE_SCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create .claude directory if it doesn't exist
|
||||
CLAUDE_DIR=$(dirname "$TARGET_PATH")
|
||||
if [ ! -d "$CLAUDE_DIR" ]; then
|
||||
echo "📁 Creating directory: $CLAUDE_DIR"
|
||||
mkdir -p "$CLAUDE_DIR"
|
||||
fi
|
||||
|
||||
# Copy the script
|
||||
echo "📋 Copying statusline script to: $TARGET_PATH"
|
||||
cp "$SOURCE_SCRIPT" "$TARGET_PATH"
|
||||
chmod +x "$TARGET_PATH"
|
||||
|
||||
# Update settings.json
|
||||
SETTINGS_FILE="$HOME/.claude/settings.json"
|
||||
|
||||
if [ ! -f "$SETTINGS_FILE" ]; then
|
||||
echo "⚠️ Warning: settings.json not found at $SETTINGS_FILE"
|
||||
echo " Please create it manually or restart Claude Code"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check if statusLine already configured
|
||||
if grep -q '"statusLine"' "$SETTINGS_FILE"; then
|
||||
echo "✅ statusLine already configured in settings.json"
|
||||
echo " Current configuration will use the updated script"
|
||||
else
|
||||
echo "📝 Adding statusLine configuration to settings.json"
|
||||
|
||||
# Backup settings.json
|
||||
cp "$SETTINGS_FILE" "$SETTINGS_FILE.backup"
|
||||
|
||||
# Add statusLine configuration using jq
|
||||
jq '. + {"statusLine": {"type": "command", "command": "bash '"$TARGET_PATH"'", "padding": 0}}' "$SETTINGS_FILE.backup" > "$SETTINGS_FILE"
|
||||
|
||||
echo "✅ statusLine configuration added"
|
||||
echo " Backup saved to: $SETTINGS_FILE.backup"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "🎉 Installation complete!"
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo " 1. Restart Claude Code to see your new statusline"
|
||||
echo " 2. The statusline will show:"
|
||||
echo " Line 1: username (model) [session_cost/daily_cost]"
|
||||
echo " Line 2: current_path"
|
||||
echo " Line 3: [git:branch]"
|
||||
echo ""
|
||||
echo "Note: Cost information requires ccusage to be installed and accessible"
|
||||
Reference in New Issue
Block a user