@@ -17,15 +17,19 @@ jobs:
1717 permissions :
1818 contents : read
1919 timeout-minutes : 10
20+ strategy :
21+ matrix :
22+ skill : [humanizer, grammar-checker]
23+ fail-fast : false # ν μ€ν¬μ΄ μ€ν¨ν΄λ λ€λ₯Έ μ€ν¬ ν
μ€νΈ κ³μ
2024
2125 steps :
2226 - name : Checkout repository
23- uses : actions/checkout@v4
27+ uses : actions/checkout@v6
2428
2529 - name : Validate SKILL.md frontmatter
2630 run : |
27- echo "π Validating YAML frontmatter..."
28- SKILL_FILE="skills/humanizer /SKILL.md"
31+ echo "π Validating YAML frontmatter for ${{ matrix.skill }} ..."
32+ SKILL_FILE="skills/${{ matrix.skill }} /SKILL.md"
2933
3034 if [ ! -f "$SKILL_FILE" ]; then
3135 echo "β SKILL.md not found"
@@ -40,11 +44,11 @@ jobs:
4044 NAME=$(echo "$FRONTMATTER" | grep "^name:" | sed 's/name: *//')
4145 echo "β
Found name: $NAME"
4246
43- # Verify name is 'humanizer'
44- if [ "$NAME" = "humanizer " ]; then
45- echo "β
Name is correct: humanizer "
47+ # Verify name matches matrix skill
48+ if [ "$NAME" = "${{ matrix.skill }} " ]; then
49+ echo "β
Name is correct: ${{ matrix.skill }} "
4650 else
47- echo "β Name should be 'humanizer ', got '$NAME'"
51+ echo "β Name should be '${{ matrix.skill }} ', got '$NAME'"
4852 exit 1
4953 fi
5054 else
5458
5559 # Check required field: description
5660 if echo "$FRONTMATTER" | grep -q "^description:"; then
57- DESC=$(echo "$FRONTMATTER" | grep "^description:" | sed 's/description: *//')
61+ # Handle both quoted and unquoted descriptions
62+ DESC=$(echo "$FRONTMATTER" | sed -n 's/^description: *"\?\(.*\)"\?$/\1/p')
5863 DESC_LEN=${#DESC}
5964 echo "β
Found description ($DESC_LEN chars)"
6065
@@ -75,65 +80,111 @@ jobs:
7580 exit 1
7681 fi
7782
78- # Check optional field: author
79- if echo "$FRONTMATTER" | grep -q "author:"; then
80- AUTHOR=$(echo "$FRONTMATTER" | grep "author:" | sed 's/.*author: *//')
81- echo "β
Found author: $AUTHOR"
83+ echo "β
Frontmatter validation passed for ${{ matrix.skill }}"
8284
83- # Verify author is 'DaleSeo'
84- if [ "$AUTHOR" = "DaleSeo" ]; then
85- echo "β
Author is correct: DaleSeo"
86- else
87- echo "β οΈ Warning: Author should be 'DaleSeo', got '$AUTHOR'"
88- fi
85+ - name : Validate skill structure
86+ run : |
87+ echo "π Validating skill structure for ${{ matrix.skill }}..."
88+ SKILL_DIR="skills/${{ matrix.skill }}"
89+
90+ # Check SKILL.md exists
91+ if [ ! -f "$SKILL_DIR/SKILL.md" ]; then
92+ echo "β SKILL.md not found"
93+ exit 1
8994 fi
95+ echo "β
SKILL.md exists"
9096
91- echo "β
Frontmatter validation passed"
97+ # Check for references directory (if it exists)
98+ if [ -d "$SKILL_DIR/references" ]; then
99+ echo "β
references/ directory found"
100+ REF_COUNT=$(find "$SKILL_DIR/references" -name "*.md" | wc -l)
101+ echo " Found $REF_COUNT reference files"
102+ fi
92103
93- - name : Validate references directory
94- run : |
95- echo "π Validating references directory..."
104+ # Check for examples directory (if it exists)
105+ if [ -d "$SKILL_DIR/examples" ]; then
106+ echo "β
examples/ directory found"
107+ EX_COUNT=$(find "$SKILL_DIR/examples" -type f | wc -l)
108+ echo " Found $EX_COUNT example files"
109+ fi
96110
97- if [ ! -d "skills/humanizer/references" ]; then
98- echo "β references/ directory not found"
99- exit 1
111+ # Check for scripts directory (if it exists)
112+ if [ -d "$SKILL_DIR/scripts" ]; then
113+ echo "β
scripts/ directory found"
114+ SCRIPT_COUNT=$(find "$SKILL_DIR/scripts" -type f | wc -l)
115+ echo " Found $SCRIPT_COUNT scripts"
100116 fi
101117
102- # Expected reference files
103- EXPECTED_FILES=(
104- "skills/humanizer/references/punctuation-patterns.md"
105- "skills/humanizer/references/spacing-patterns.md"
106- "skills/humanizer/references/pos-patterns.md"
107- "skills/humanizer/references/vocabulary-patterns.md"
108- "skills/humanizer/references/structure-patterns.md"
109- )
110-
111- for file in "${EXPECTED_FILES[@]}"; do
112- if [ -f "$file" ]; then
113- echo "β
Found: $file"
114- else
115- echo "β Missing: $file"
116- exit 1
117- fi
118- done
118+ # Check for assets directory (if it exists)
119+ if [ -d "$SKILL_DIR/assets" ]; then
120+ echo "β
assets/ directory found"
121+ ASSET_COUNT=$(find "$SKILL_DIR/assets" -type f | wc -l)
122+ echo " Found $ASSET_COUNT assets"
123+ fi
124+
125+ echo "β
Skill structure validation passed for ${{ matrix.skill }}"
119126
120- echo "β
All reference files validated"
127+ - name : Validate skill-specific requirements
128+ run : |
129+ echo "π Running skill-specific validation for ${{ matrix.skill }}..."
130+
131+ if [ "${{ matrix.skill }}" = "humanizer" ]; then
132+ echo "Validating humanizer-specific files..."
133+
134+ # Expected reference files for humanizer
135+ EXPECTED_FILES=(
136+ "skills/humanizer/references/punctuation-patterns.md"
137+ "skills/humanizer/references/spacing-patterns.md"
138+ "skills/humanizer/references/pos-patterns.md"
139+ "skills/humanizer/references/vocabulary-patterns.md"
140+ "skills/humanizer/references/structure-patterns.md"
141+ )
142+
143+ for file in "${EXPECTED_FILES[@]}"; do
144+ if [ -f "$file" ]; then
145+ echo "β
Found: $file"
146+ else
147+ echo "β Missing: $file"
148+ exit 1
149+ fi
150+ done
151+
152+ elif [ "${{ matrix.skill }}" = "grammar-checker" ]; then
153+ echo "Validating grammar-checker-specific files..."
154+
155+ # Expected reference files for grammar-checker
156+ EXPECTED_FILES=(
157+ "skills/grammar-checker/references/rules.md"
158+ "skills/grammar-checker/references/common-errors.md"
159+ )
160+
161+ for file in "${EXPECTED_FILES[@]}"; do
162+ if [ -f "$file" ]; then
163+ echo "β
Found: $file"
164+ else
165+ echo "β Missing: $file"
166+ exit 1
167+ fi
168+ done
169+ fi
170+
171+ echo "β
Skill-specific validation passed for ${{ matrix.skill }}"
121172
122173 - name : Install skill with npx skills add
123174 run : |
124- echo "π§ͺ Installing skill with npx skills add..."
175+ echo "π§ͺ Installing ${{ matrix. skill }} with npx skills add..."
125176
126177 # Install skill with claude-code agent and auto-confirm
127- npx skills add DaleSeo/korean-skills --skill humanizer --agent claude-code --yes || {
178+ npx skills add DaleSeo/korean-skills --skill ${{ matrix.skill }} --agent claude-code --yes || {
128179 echo "β οΈ npx skills add failed, but continuing to verify..."
129180 echo "This may be expected in CI environment due to TTY issues"
130181 }
131182
132- echo "β
Skill installation step completed"
183+ echo "β
Skill installation step completed for ${{ matrix.skill }} "
133184
134185 - name : Verify installed skill
135186 run : |
136- echo "π Verifying installed skill..."
187+ echo "π Verifying installed ${{ matrix. skill }} ..."
137188
138189 # Debug: Show all potential skill locations
139190 echo "π Searching for skill installation..."
@@ -145,18 +196,18 @@ jobs:
145196 ls -laR ~/.agents/ 2>/dev/null || echo "~/.agents/ not found"
146197
147198 echo ""
148- echo "Searching entire home directory for humanizer :"
149- find ~ -name "humanizer " -type d 2>/dev/null | head -10 || echo "No directories found"
199+ echo "Searching entire home directory for ${{ matrix.skill }} :"
200+ find ~ -name "${{ matrix.skill }} " -type d 2>/dev/null | head -10 || echo "No directories found"
150201
151202 # Try to find the skill in any location
152203 SKILL_DIR=""
153- if [ -d ~/.claude/skills/humanizer ]; then
154- SKILL_DIR=~/.claude/skills/humanizer
155- elif [ -d ~/.agents/skills/humanizer ]; then
156- SKILL_DIR=~/.agents/skills/humanizer
204+ if [ -d ~/.claude/skills/${{ matrix.skill }} ]; then
205+ SKILL_DIR=~/.claude/skills/${{ matrix.skill }}
206+ elif [ -d ~/.agents/skills/${{ matrix.skill }} ]; then
207+ SKILL_DIR=~/.agents/skills/${{ matrix.skill }}
157208 else
158209 # Last resort: search for it
159- SKILL_DIR=$(find ~ -name "humanizer " -type d 2>/dev/null | grep -E '(\.claude|\.agents)/skills' | head -1)
210+ SKILL_DIR=$(find ~ -name "${{ matrix.skill }} " -type d 2>/dev/null | grep -E '(\.claude|\.agents)/skills' | head -1)
160211 fi
161212
162213 if [ -z "$SKILL_DIR" ]; then
@@ -183,12 +234,31 @@ jobs:
183234 echo "π Skill content preview:"
184235 head -20 "$SKILL_FILE"
185236
186- # Verify references directory
237+ # Verify references directory (if expected)
187238 echo ""
188239 if [ -d "$SKILL_DIR/references" ]; then
189240 echo "β
references/ directory installed"
190241 echo "π Reference files:"
191242 ls -1 "$SKILL_DIR/references/"
192243 else
193- echo "β οΈ references/ directory not found"
244+ echo "βΉοΈ references/ directory not found (may not be required)"
245+ fi
246+
247+ echo "β
Skill verification completed for ${{ matrix.skill }}"
248+
249+ summary :
250+ runs-on : ubuntu-latest
251+ needs : test
252+ if : always()
253+ steps :
254+ - name : Check test results
255+ run : |
256+ echo "π Test Summary"
257+ echo "==============="
258+ if [ "${{ needs.test.result }}" = "success" ]; then
259+ echo "β
All skill tests passed!"
260+ exit 0
261+ else
262+ echo "β Some skill tests failed"
263+ exit 1
194264 fi
0 commit comments