Add comprehensive skills, agents, commands collection
- Added 44 external skills from obra/superpowers, ui-ux-pro-max-skill, claude-codex-settings - Added 8 autonomous agents (commit-creator, pr-creator, pr-reviewer, etc.) - Added 23 slash commands for Git/GitHub, setup, and plugin development - Added hooks for code formatting, notifications, and validation - Added MCP configurations for Azure, GCloud, Supabase, MongoDB, etc. - Added awesome-openclaw-skills registry (3,002 skills referenced) - Updated comprehensive README with full documentation Sources: - github.com/obra/superpowers (14 skills) - github.com/nextlevelbuilder/ui-ux-pro-max-skill (1 skill) - github.com/fcakyon/claude-codex-settings (29 skills, 8 agents, 23 commands) - github.com/VoltAgent/awesome-openclaw-skills (registry) - skills.sh (reference) - buildwithclaude.com (reference)
This commit is contained in:
59
skills/external/plugin-dev-plugin-settings/scripts/parse-frontmatter.sh
vendored
Executable file
59
skills/external/plugin-dev-plugin-settings/scripts/parse-frontmatter.sh
vendored
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
# Frontmatter Parser Utility
|
||||
# Extracts YAML frontmatter from .local.md files
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Usage
|
||||
show_usage() {
|
||||
echo "Usage: $0 <settings-file.md> [field-name]"
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo " # Show all frontmatter"
|
||||
echo " $0 .claude/my-plugin.local.md"
|
||||
echo ""
|
||||
echo " # Extract specific field"
|
||||
echo " $0 .claude/my-plugin.local.md enabled"
|
||||
echo ""
|
||||
echo " # Extract and use in script"
|
||||
echo " ENABLED=\$($0 .claude/my-plugin.local.md enabled)"
|
||||
exit 0
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
|
||||
show_usage
|
||||
fi
|
||||
|
||||
FILE="$1"
|
||||
FIELD="${2:-}"
|
||||
|
||||
# Validate file
|
||||
if [ ! -f "$FILE" ]; then
|
||||
echo "Error: File not found: $FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract frontmatter
|
||||
FRONTMATTER=$(sed -n '/^---$/,/^---$/{ /^---$/d; p; }' "$FILE")
|
||||
|
||||
if [ -z "$FRONTMATTER" ]; then
|
||||
echo "Error: No frontmatter found in $FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If no field specified, output all frontmatter
|
||||
if [ -z "$FIELD" ]; then
|
||||
echo "$FRONTMATTER"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Extract specific field
|
||||
VALUE=$(echo "$FRONTMATTER" | grep "^${FIELD}:" | sed "s/${FIELD}: *//" | sed 's/^"\(.*\)"$/\1/' | sed "s/^'\\(.*\\)'$/\\1/")
|
||||
|
||||
if [ -z "$VALUE" ]; then
|
||||
echo "Error: Field '$FIELD' not found in frontmatter" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$VALUE"
|
||||
exit 0
|
||||
Reference in New Issue
Block a user