feat: Add bootstrap script to generate skill-seekers operational skill
Add: - scripts/bootstrap_skill.sh - Main script (uv sync, analyze) - scripts/skill_header.md - Operational instructions header - tests/test_bootstrap_skill.py - Pytest tests The header contains manual instructions that can't be auto-extracted: - Prerequisites (pip install) - Command reference table - Quick start examples The script prepends this header to the auto-generated SKILL.md which contains patterns, examples, and API docs from code analysis. Usage: ./scripts/bootstrap_skill.sh cp -r output/skill-seekers ~/.claude/skills/ Output: output/skill-seekers/ (directory with SKILL.md) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
65
scripts/bootstrap_skill.sh
Executable file
65
scripts/bootstrap_skill.sh
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Bootstrap Skill Seekers into an Operational Skill for Claude Code
|
||||
#
|
||||
# Usage: ./scripts/bootstrap_skill.sh
|
||||
# Output: output/skill-seekers/ (skill directory)
|
||||
#
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
SKILL_NAME="skill-seekers"
|
||||
OUTPUT_DIR="$PROJECT_ROOT/output/$SKILL_NAME"
|
||||
HEADER_FILE="$SCRIPT_DIR/skill_header.md"
|
||||
|
||||
echo "============================================"
|
||||
echo " Skill Seekers Bootstrap"
|
||||
echo "============================================"
|
||||
|
||||
# Step 1: Sync dependencies
|
||||
echo "Step 1: uv sync..."
|
||||
command -v uv &> /dev/null || { echo "Error: uv not installed"; exit 1; }
|
||||
cd "$PROJECT_ROOT"
|
||||
uv sync --quiet
|
||||
echo "✓ Done"
|
||||
|
||||
# Step 2: Run codebase analysis
|
||||
echo "Step 2: Analyzing codebase..."
|
||||
rm -rf "$OUTPUT_DIR" 2>/dev/null || true
|
||||
uv run skill-seekers-codebase \
|
||||
--directory "$PROJECT_ROOT" \
|
||||
--output "$OUTPUT_DIR" \
|
||||
--depth deep \
|
||||
--ai-mode none 2>&1 | grep -E "^(INFO|✅)" || true
|
||||
echo "✓ Done"
|
||||
|
||||
# Step 3: Prepend header to SKILL.md
|
||||
echo "Step 3: Adding operational header..."
|
||||
if [[ -f "$HEADER_FILE" ]]; then
|
||||
# Get auto-generated content (skip its frontmatter)
|
||||
AUTO_CONTENT=$(tail -n +6 "$OUTPUT_DIR/SKILL.md")
|
||||
# Combine: header + auto-generated
|
||||
cat "$HEADER_FILE" > "$OUTPUT_DIR/SKILL.md"
|
||||
echo "$AUTO_CONTENT" >> "$OUTPUT_DIR/SKILL.md"
|
||||
echo "✓ Done ($(wc -l < "$OUTPUT_DIR/SKILL.md") lines)"
|
||||
else
|
||||
echo "Warning: $HEADER_FILE not found, using auto-generated only"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "============================================"
|
||||
echo " Bootstrap Complete!"
|
||||
echo "============================================"
|
||||
echo ""
|
||||
echo "Output: $OUTPUT_DIR/"
|
||||
echo " - SKILL.md ($(wc -l < "$OUTPUT_DIR/SKILL.md") lines)"
|
||||
echo " - references/ (API docs, patterns, examples)"
|
||||
echo ""
|
||||
echo "Install to Claude Code:"
|
||||
echo " cp -r output/$SKILL_NAME ~/.claude/skills/"
|
||||
echo ""
|
||||
echo "Verify:"
|
||||
echo " ls ~/.claude/skills/$SKILL_NAME/SKILL.md"
|
||||
echo ""
|
||||
44
scripts/skill_header.md
Normal file
44
scripts/skill_header.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
name: skill-seekers
|
||||
description: Generate LLM skills from documentation, codebases, and GitHub repositories
|
||||
---
|
||||
|
||||
# Skill Seekers
|
||||
|
||||
## Prerequisites
|
||||
|
||||
```bash
|
||||
pip install skill-seekers
|
||||
# Or: uv pip install skill-seekers
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
| Source | Command |
|
||||
|--------|---------|
|
||||
| Local code | `skill-seekers-codebase --directory ./path` |
|
||||
| Docs URL | `skill-seekers scrape --url https://...` |
|
||||
| GitHub | `skill-seekers github --repo owner/repo` |
|
||||
| PDF | `skill-seekers pdf --file doc.pdf` |
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Analyze local codebase
|
||||
skill-seekers-codebase --directory /path/to/project --output output/my-skill/
|
||||
|
||||
# Package for Claude
|
||||
yes | skill-seekers package output/my-skill/ --no-open
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
| Flag | Description |
|
||||
|------|-------------|
|
||||
| `--depth surface/deep/full` | Analysis depth |
|
||||
| `--skip-patterns` | Skip pattern detection |
|
||||
| `--skip-test-examples` | Skip test extraction |
|
||||
| `--ai-mode none/api/local` | AI enhancement |
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user