Files
claude-code-skills-reference/scripts/install.sh
daymade ebb9336452 Fix skill-creator usage instructions: Use natural conversation, not script paths
The previous instructions showed incorrect direct script paths like:
  skill-creator/scripts/init_skill.py <skill-name> --path <output-dir>

These paths don't work after marketplace installation because:
1. Users install via: /plugin marketplace install daymade/claude-code-skills#skill-creator
2. Skills are installed to ~/.claude/skills/, not the user's current directory
3. skill-creator is a SKILL that guides Claude Code, not a standalone CLI tool

Correct usage:
After installing skill-creator, users simply ask Claude Code in natural language:
  "Create a new skill called my-awesome-skill in ~/my-skills"
  "Validate my skill at ~/my-skills/my-awesome-skill"
  "Package my skill at ~/my-skills/my-awesome-skill"

Claude Code, with skill-creator loaded, knows how to execute the bundled scripts
and guide users through the entire skill creation process.

Fixed in:
- README.md (English)
- README.zh-CN.md (Chinese)
- scripts/install.sh (bash)
- scripts/install.ps1 (PowerShell)
2025-10-24 18:38:36 +08:00

145 lines
4.8 KiB
Bash
Executable File

#!/bin/bash
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
CYAN='\033[0;36m'
NC='\033[0m' # No Color
echo "================================================"
echo "Claude Code Skills Marketplace Installer"
echo "================================================"
echo ""
# Detect OS
OS="$(uname -s)"
case "${OS}" in
Linux*) MACHINE=Linux;;
Darwin*) MACHINE=macOS;;
*) MACHINE="UNKNOWN:${OS}"
esac
echo "Detected OS: ${MACHINE}"
echo ""
# Check if Claude Code is installed
if ! command -v claude &> /dev/null; then
echo -e "${RED}Error: Claude Code not found!${NC}"
echo "Please install Claude Code first: https://claude.com/code"
exit 1
fi
echo -e "${GREEN}✓ Claude Code detected${NC}"
echo ""
# Check if running interactively
if [ -t 0 ]; then
# Interactive mode
echo "What would you like to install?"
echo ""
echo "1) skill-creator only (RECOMMENDED - enables you to create your own skills)"
echo "2) All skills"
echo "3) Custom selection"
echo "4) Exit"
echo ""
read -p "Enter your choice (1-4): " choice
else
# Non-interactive mode (piped from curl)
echo -e "${YELLOW}Running in non-interactive mode.${NC}"
echo "Defaulting to option 1: skill-creator only (RECOMMENDED)"
echo ""
echo "To run interactively, download and run directly:"
echo " curl -fsSL https://raw.githubusercontent.com/daymade/claude-code-skills/main/scripts/install.sh -o install.sh"
echo " bash install.sh"
echo ""
choice=1
fi
case $choice in
1)
echo ""
echo -e "${CYAN}Installing skill-creator...${NC}"
echo ""
echo "Run these commands in Claude Code:"
echo ""
echo -e "${YELLOW}/plugin marketplace add daymade/claude-code-skills${NC}"
echo -e "${YELLOW}/plugin marketplace install daymade/claude-code-skills#skill-creator${NC}"
echo ""
echo -e "${GREEN}After installation, ask Claude Code:${NC}"
echo " \"Create a new skill called my-awesome-skill in ~/my-skills\""
echo " \"Validate my skill at ~/my-skills/my-awesome-skill\""
echo " \"Package my skill at ~/my-skills/my-awesome-skill\""
echo ""
echo "Claude Code will guide you through the skill creation process!"
;;
2)
echo ""
echo -e "${CYAN}Installing all skills...${NC}"
echo ""
echo "Run these commands in Claude Code:"
echo ""
echo -e "${YELLOW}/plugin marketplace add daymade/claude-code-skills${NC}"
echo ""
for skill in skill-creator github-ops markdown-tools mermaid-tools statusline-generator teams-channel-post-writer repomix-unmixer llm-icon-finder; do
echo -e "${YELLOW}/plugin marketplace install daymade/claude-code-skills#${skill}${NC}"
done
;;
3)
echo ""
echo "Available skills:"
echo " 1) skill-creator (meta-skill for creating skills)"
echo " 2) github-ops (GitHub operations)"
echo " 3) markdown-tools (document conversion)"
echo " 4) mermaid-tools (diagram generation)"
echo " 5) statusline-generator (statusline customization)"
echo " 6) teams-channel-post-writer (Teams communication)"
echo " 7) repomix-unmixer (repomix extraction)"
echo " 8) llm-icon-finder (AI/LLM icons)"
echo ""
if [ -t 0 ]; then
read -p "Enter skill numbers separated by spaces (e.g., '1 2 3'): " selections
else
echo -e "${YELLOW}Non-interactive mode: Installing skill-creator only${NC}"
selections="1"
fi
echo ""
echo "Run these commands in Claude Code:"
echo ""
echo -e "${YELLOW}/plugin marketplace add daymade/claude-code-skills${NC}"
echo ""
SKILLS=(skill-creator github-ops markdown-tools mermaid-tools statusline-generator teams-channel-post-writer repomix-unmixer llm-icon-finder)
for num in $selections; do
idx=$((num-1))
if [ $idx -ge 0 ] && [ $idx -lt 8 ]; then
echo -e "${YELLOW}/plugin marketplace install daymade/claude-code-skills#${SKILLS[$idx]}${NC}"
fi
done
;;
4)
echo "Installation cancelled."
exit 0
;;
*)
echo -e "${RED}Invalid choice!${NC}"
exit 1
;;
esac
echo ""
echo -e "${GREEN}================================================${NC}"
echo -e "${GREEN}Installation commands generated!${NC}"
echo -e "${GREEN}================================================${NC}"
echo ""
echo "Next steps:"
echo "1. Copy the commands above"
echo "2. Paste them into Claude Code"
echo "3. Restart Claude Code"
echo "4. Start using your skills!"
echo ""
echo "Documentation: https://github.com/daymade/claude-code-skills"
echo ""