Shell script testing expertise using bash test framework patterns from unix-goto, covering test structure (arrange-act-assert), 4 test categories, assertion patterns, 100% coverage requirements, and performance testing
Comprehensive testing expertise for bash shell scripts using patterns from unix-goto.
This skill provides systematic testing expertise for shell scripts, including:
Use this skill when:
Every core feature requires complete test coverage:
1. Unit Tests
2. Integration Tests
3. Edge Cases
4. Performance Tests
Every test follows this three-phase structure:
test_feature() {
# Arrange - Set up test conditions
local input="test-value"
local expected="expected-result"
# Act - Execute the code under test
local result=$(function_under_test "$input")
# Assert - Verify the results
if [[ "$result" == "$expected" ]]; then
pass "Test description"
else
fail "Expected '$expected', got '$result'"
fi
}
This skill is already installed at:
~/Library/Application Support/Claude/skills/shell-testing-framework/
Simply mention shell testing tasks in your conversation with Claude:
"Create a comprehensive test suite for my cache module with 100% coverage"
"Help me write performance tests for this navigation function"
"Generate unit, integration, and edge case tests for bookmark management"
Claude will automatically activate this skill and guide you through creating comprehensive test suites.
"I need a comprehensive test suite for my cache lookup function.
Include all four test categories with 100% coverage."
Claude will generate:
"Create performance tests to validate my cache lookup is <100ms"
Claude will:
#!/bin/bash
# test-module.sh
set -e
# Setup
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
source "$SCRIPT_DIR/lib/module.sh"
# Counters
TESTS_PASSED=0
TESTS_FAILED=0
# Helpers
pass() { echo "✓ PASS: $1"; ((TESTS_PASSED++)); }
fail() { echo "✗ FAIL: $1"; ((TESTS_FAILED++)); }
# Unit Tests
test_basic_functionality() {
# Arrange
local input="test"
# Act
local result=$(function_under_test "$input")
# Assert
[[ "$result" == "expected" ]] && pass "Basic test" || fail "Basic test"
}
# Run tests
test_basic_functionality
# Summary
echo "Passed: $TESTS_PASSED, Failed: $TESTS_FAILED"
[ $TESTS_FAILED -eq 0 ] && exit 0 || exit 1
This skill is created for shell testing based on unix-goto patterns by Manu Tej + Claude Code.
npx skills add manutej/shell-testing-framework下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer