Skip to main content
complexity-scorer Score task complexity using keyword matching and heuristics
インストールへ移動 Skills Marketplace コミュニティが作成したAIスキルを発見・探索
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill complexity-scorerコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
Zipをダウンロード ダウンロード中... このリポジトリの他の Skills Write outbound email and external messages in Vamsee Achanta's voice — a subtle offer to help, never bold or rash claims. Load before drafting ANY email, LinkedIn/Collide reply, proposal note, or outreach sent under his name.
Save/publish analysis or computation results from ANY ecosystem repo to Hugging Face as a queryable, viewer-renderable dataset. Use when the user wants to "save results to hugging face", "publish dataset to HF", "hugging face data saving", "save analysis results", "hf dataset", "make results queryable", or "render via datasets-server API". Reshapes nested results into flat parquet tables, writes a dataset card with a viewer `configs:` block and provenance, applies license/public-vs-private routing, enforces a domain data-quality gate (faithful-to-source != correct), publishes to `aceengineer/<repo>-<projection>`, and verifies via the datasets-server API.
Clone, create, fork, configure, and manage GitHub repositories. Manage remotes, secrets, releases, and workflows. Works with gh CLI or falls back to git + GitHub REST API via curl.
name complexity-scorer version 1.0.0 description Score task complexity using keyword matching and heuristics author workspace-hub category bash tags ["bash","complexity","scoring","keywords","analysis","classification"] platforms ["linux","macos"]
Complexity Scorer
Patterns for scoring task complexity using keyword matching, context analysis, and configurable heuristics. Extracted from workspace-hub's model selection system.
When to Use This Skill
✅ Use when:
Routing tasks to different handlers based on complexity
Recommending resources (models, workers, time estimates)
Prioritizing work items
Auto-classifying incoming requests
Building intelligent dispatchers
❌ Avoid when:
Simple yes/no classification
When ML-based classification is more appropriate
Highly domain-specific scoring that requires expertise
Core Capabilities
1. Keyword-Based Scoring
Define keyword categories with weights:
#!/bin/bash
HIGH_COMPLEXITY="architecture|refactor|design|security|complex|multi-file|algorithm|optimization|strategy|planning|cross-repository|performance|migration|integration"
MEDIUM_COMPLEXITY="implement|feature|bug|fix|code review|documentation|test|update|add|create|build|configure|setup"
LOW_COMPLEXITY="check|status|simple|quick|template|list|grep|find|search|summary|validation|exists|show|display|count|verify"
score_keywords () {
local text="$1 "
local text_lower=$(echo "$text " | tr '[:upper:]' '[:lower:]' )
local score=0
if echo "$text_lower " | grep -qE "$HIGH_COMPLEXITY " ; then
((score+=3 ))
elif echo "$text_lower " | grep -qE "$MEDIUM_COMPLEXITY " ; then
((score+=1 ))
elif echo " " | grep -qE ;
((score-= ))
}
task=
score=$(score_keywords )
2. Multi-Factor Scoring
Combine multiple factors for better accuracy:
#!/bin/bash
declare -A WEIGHTS=(
["keywords" ]=3
["length" ]=1
["urgency" ]=1
["scope" ]=2
)
score_length () {
local text="$1 "
local word_count=$(echo "$text " | wc -w)
if [[ $word_count -gt 20 ]]; then
echo 2
elif [[ $word_count -gt 10 ]]; then
echo 1
elif [[ $word_count -lt 5 ]]; then
echo -1
else
echo 0
fi
}
score_urgency () {
local text="$1 "
local text_lower=$(echo "$text " | tr '[:upper:]' '[:lower:]' )
if echo | grep -qE ;
2
| grep -qE ;
1
0
}
() {
text=
text_lower=$( | )
| grep -qE ;
2
| grep -qE ;
1
| grep -qE ;
-1
0
}
() {
text=
total=0
keyword_score=$(score_keywords )
length_score=$(score_length )
urgency_score=$(score_urgency )
scope_score=$(score_scope )
total=$((keyword_score * +
length_score * +
urgency_score * +
scope_score * ))
}
3. Context-Aware Scoring
Adjust scores based on context (repository, domain, etc.):
#!/bin/bash
TIER1_REPOS="workspace-hub|digitalmodel|energy|client-a"
TIER2_REPOS="aceengineercode|assetutilities|worldenergydata|client-b"
TIER3_REPOS="lng-a|client-d|OGManufacturing|client-f"
PERSONAL_ACTIVE="aceengineer-admin|aceengineer-website"
PERSONAL_EXPERIMENTAL="hobbies|sd-work|mkt-a"
get_repo_tier () {
local repo="$1 "
if echo "$repo " | grep -qE "$TIER1_REPOS " ; then
echo "tier1"
elif echo "$repo " | grep -qE "$TIER2_REPOS " ; then
echo "tier2"
elif echo "$repo " | grep -qE "$TIER3_REPOS " ; then
echo "tier3"
elif echo "$repo " | grep -qE "$PERSONAL_ACTIVE " ; then
echo "personal_active"
| grep -qE ;
}
() {
base_score=
repo=
adjusted=
tier=$(get_repo_tier )
tier1)
((adjusted+= ))
;;
tier3|personal_experimental)
((adjusted-= ))
;;
}
() {
task=
repo=
base_score=$(calculate_complexity )
final_score=$(adjust_for_context )
}
4. Score Classification
Map scores to categories:
#!/bin/bash
THRESHOLD_HIGH=5
THRESHOLD_MEDIUM=1
THRESHOLD_LOW=-2
classify_complexity () {
local score="$1 "
if [[ $score -ge $THRESHOLD_HIGH ]]; then
echo "high"
elif [[ $score -ge $THRESHOLD_MEDIUM ]]; then
echo "medium"
elif [[ $score -ge $THRESHOLD_LOW ]]; then
echo "low"
else
echo "trivial"
fi
}
get_recommendation () {
local score="$1 "
local classification=$(classify_complexity "$score " )
case "$classification " in
high)
echo "OPUS"
echo "Use for complex architecture, multi-file refactoring, security analysis"
;;
medium)
;;
low)
;;
trivial)
;;
}
() {
score=
classification=$(classify_complexity )
high) ;;
medium) ;;
low) ;;
trivial) ;;
}
5. Confidence Scoring
Add confidence to scoring:
#!/bin/bash
calculate_confidence () {
local text="$1 "
local confidence=50
local word_count=$(echo "$text " | wc -w)
local keyword_matches=0
local text_lower=$(echo "$text " | tr '[:upper:]' '[:lower:]' )
if [[ $word_count -gt 15 ]]; then
((confidence+=20 ))
elif [[ $word_count -gt 8 ]]; then
((confidence+=10 ))
elif [[ $word_count -lt 3 ]]; then
((confidence-=20 ))
fi
for pattern in "$HIGH_COMPLEXITY " "$MEDIUM_COMPLEXITY " "$LOW_COMPLEXITY " ; do
if echo " " | grep -qE ;
((keyword_matches++))
((confidence += keyword_matches * ))
[[ -gt 100 ]] && confidence=100
[[ -lt 10 ]] && confidence=10
}
() {
confidence=
[[ -ge 80 ]];
[[ -ge 60 ]];
[[ -ge 40 ]];
}
6. Historical Learning
Adjust based on past accuracy:
#!/bin/bash
HISTORY_FILE="${HOME} /.complexity-scorer/history.log"
log_outcome () {
local task="$1 "
local predicted_score="$2 "
local actual_complexity="$3 "
local timestamp=$(date '+%Y-%m-%d_%H:%M:%S' )
mkdir -p "$(dirname "$HISTORY_FILE " ) "
echo "${timestamp} |${predicted_score} |${actual_complexity} |${task} " >> "$HISTORY_FILE "
}
calculate_accuracy () {
local correct=0
local total=0
while IFS='|' read -r ts predicted actual task; do
[[ "$ts " =~ ^#.*$ ]] && continue
[[ -z "$ts " ]] && continue
((total++))
local predicted_class=$(classify_complexity )
[[ == ]];
((correct++))
<
[[ -gt 0 ]];
$((correct * / total))
0
}
() {
IFS= -r ts predicted actual task;
predicted_class=$(classify_complexity )
[[ != ]];
<
}
Complete Example: Task Complexity Scorer
#!/bin/bash
set -e
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
CYAN='\033[0;36m'
RED='\033[0;31m'
NC='\033[0m'
OPUS_KEYWORDS="architecture|refactor|design|security|complex|multi-file|algorithm|optimization|strategy|planning|cross-repository|performance|migration"
SONNET_KEYWORDS="implement|feature|bug|fix|code review|documentation|test|update|add|create|build"
HAIKU_KEYWORDS="check|status|simple|quick|template|list|grep|find|search|summary|validation|exists|show|display"
WORK_TIER1="workspace-hub|digitalmodel|energy|client-a"
WORK_TIER2="aceengineercode|assetutilities|worldenergydata"
WORK_TIER3="lng-a|client-d|OGManufacturing"
PERSONAL="hobbies|sd-work|mkt-a"
score_task () {
local task="$1 "
local repo="${2:-} "
local task_lower=$(echo "$task " | tr '[:upper:]' )
score=0
| grep -qE ;
((score+= ))
| grep -qE ;
((score+= ))
| grep -qE ;
((score-= ))
word_count=$( | -w)
[[ -gt 15 ]];
((score+= ))
[[ -lt 5 ]];
((score-= ))
[[ -n ]];
| grep -qE ;
((score+= ))
| grep -qE ;
((score-= ))
}
() {
score=
[[ -ge 3 ]];
[[ -ge 0 ]];
}
() {
repo=
| grep -qE ;
| grep -qE ;
| grep -qE ;
| grep -qE ;
}
() {
task=
repo=
score=$(score_task )
recommendation=$(get_recommendation )
tier=$(get_tier_name )
color
OPUS) color= ;;
SONNET) color= ;;
HAIKU) color= ;;
-e
-e
-e
[[ -n ]] && -e
-e
-e
-e
-e
task_lower=$( | )
| grep -qE ;
| grep -qE ;
| grep -qE ;
[[ -n ]] &&
-e
}
() {
<<
}
REPO=
SCORE_ONLY=
JSON_OUTPUT=
[[ -gt 0 ]];
-r|--repo)
REPO=
2
;;
-s|--score-only)
SCORE_ONLY=
;;
-j|--json)
JSON_OUTPUT=
;;
-h|-- )
show_usage
0
;;
-*)
show_usage
1
;;
*)
;;
TASK=
[[ -z ]];
-p TASK
[[ -z ]];
1
[[ == ]];
score_task
[[ == ]];
score=$(score_task )
rec=$(get_recommendation )
<<
display_result
Best Practices
Tune Keywords - Adjust patterns based on your domain
Use Multiple Factors - Don't rely on keywords alone
Add Confidence - Help users understand reliability
Learn from Feedback - Track accuracy and improve
Context Matters - Same task may have different complexity in different contexts
Resources
Version History
1.0.0 (2026-01-14): Initial release - extracted from workspace-hub suggest_model.sh
$text_lower
"$LOW_COMPLEXITY "
then
2
fi
echo
$score
"Design the authentication system architecture"
"$task "
echo
"Complexity score: $score "
"$text_lower "
"urgent|asap|critical|emergency|immediately"
then
echo
elif
echo
"$text_lower "
"soon|priority|important"
then
echo
else
echo
fi
score_scope
local
"$1 "
local
echo
"$text "
tr
'[:upper:]'
'[:lower:]'
if
echo
"$text_lower "
"all|every|entire|complete|full|comprehensive"
then
echo
elif
echo
"$text_lower "
"multiple|several|various|many"
then
echo
elif
echo
"$text_lower "
"single|one|specific|particular"
then
echo
else
echo
fi
calculate_complexity
local
"$1 "
local
local
"$text "
local
"$text "
local
"$text "
local
"$text "
${WEIGHTS[keywords]}
${WEIGHTS[length]}
${WEIGHTS[urgency]}
${WEIGHTS[scope]}
echo
$total
elif
echo
"$repo "
"$PERSONAL_EXPERIMENTAL "
then
echo
"personal_experimental"
else
echo
"unknown"
fi
adjust_for_context
local
"$1 "
local
"$2 "
local
$base_score
local
"$repo "
case
"$tier "
in
1
1
esac
echo
$adjusted
score_with_context
local
"$1 "
local
"$2 "
local
"$task "
local
"$base_score "
"$repo "
echo
$final_score
echo
"SONNET"
echo
"Standard implementation, code review, documentation"
echo
"HAIKU"
echo
"Quick queries, status checks, simple operations"
echo
"HAIKU"
echo
"Trivial task - consider if AI is even needed"
esac
get_score_color
local
"$1 "
local
"$score "
case
"$classification "
in
echo
"$GREEN "
echo
"$BLUE "
echo
"$YELLOW "
echo
"$CYAN "
esac
$text_lower
"$pattern "
then
fi
done
10
$confidence
$confidence
echo
$confidence
confidence_label
local
"$1 "
if
$confidence
then
echo
"High"
elif
$confidence
then
echo
"Medium"
elif
$confidence
then
echo
"Low"
else
echo
"Very Low"
fi
"$predicted "
if
"$predicted_class "
"$actual "
then
fi
done
"$HISTORY_FILE "
if
$total
then
echo
100
else
echo
fi
find_patterns
echo
"Analyzing misclassification patterns..."
while
'|'
read
do
local
"$predicted "
if
"$predicted_class "
"$actual "
then
echo
"Predicted: $predicted_class , Actual: $actual "
echo
"Task: $task "
echo
"---"
fi
done
"$HISTORY_FILE "
'[:lower:]'
local
if
echo
"$task_lower "
"$OPUS_KEYWORDS "
then
3
elif
echo
"$task_lower "
"$SONNET_KEYWORDS "
then
1
elif
echo
"$task_lower "
"$HAIKU_KEYWORDS "
then
2
fi
local
echo
"$task "
wc
if
$word_count
then
1
elif
$word_count
then
1
fi
if
"$repo "
then
if
echo
"$repo "
"$WORK_TIER1 "
then
1
elif
echo
"$repo "
"$WORK_TIER3 |$PERSONAL "
then
1
fi
fi
echo
$score
get_recommendation
local
"$1 "
if
$score
then
echo
"OPUS"
elif
$score
then
echo
"SONNET"
else
echo
"HAIKU"
fi
get_tier_name
local
"$1 "
if
echo
"$repo "
"$WORK_TIER1 "
then
echo
"Work Tier 1 (Production)"
elif
echo
"$repo "
"$WORK_TIER2 "
then
echo
"Work Tier 2 (Active)"
elif
echo
"$repo "
"$WORK_TIER3 "
then
echo
"Work Tier 3 (Maintenance)"
elif
echo
"$repo "
"$PERSONAL "
then
echo
"Personal (Experimental)"
else
echo
"Unknown"
fi
display_result
local
"$1 "
local
"$2 "
local
"$task "
"$repo "
local
"$score "
local
"$repo "
local
case
"$recommendation "
in
$GREEN
$BLUE
$YELLOW
esac
echo
""
echo
"${CYAN} ═══════════════════════════════════════${NC} "
echo
"${CYAN} Task Complexity Analysis${NC} "
echo
"${CYAN} ═══════════════════════════════════════${NC} "
echo
""
"$repo "
echo
"Repository: ${CYAN} $repo${NC} ($tier )"
echo
"Task: $task "
echo
"Complexity Score: $score "
echo
""
echo
"Recommended: ${color} ${recommendation} ${NC} "
echo
""
echo
"${CYAN} Reasoning:${NC} "
local
echo
"$task "
tr
'[:upper:]'
'[:lower:]'
if
echo
"$task_lower "
"$OPUS_KEYWORDS "
then
echo
" • High complexity keywords detected"
elif
echo
"$task_lower "
"$SONNET_KEYWORDS "
then
echo
" • Standard implementation keywords detected"
elif
echo
"$task_lower "
"$HAIKU_KEYWORDS "
then
echo
" • Simple task indicators detected"
fi
"$tier "
echo
" • Repository tier: $tier "
echo
""
echo
"${CYAN} ═══════════════════════════════════════${NC} "
show_usage
cat
EOF
Usage: $(basename "$0") [options] <task-description>
Options:
-r, --repo REPO Repository context
-s, --score-only Output only the numeric score
-j, --json Output as JSON
-h, --help Show this help
Examples:
$(basename "$0") "Check if file exists"
$(basename "$0") -r digitalmodel "Design authentication architecture"
$(basename "$0") --score-only "Implement user login"
EOF
""
false
false
while
$#
do
case
"$1 "
in
"$2 "
shift
true
shift
true
shift
help
exit
echo
"Unknown option: $1 "
exit
break
esac
done
"$*"
if
"$TASK "
then
read
"Task description: "
fi
if
"$TASK "
then
echo
"Error: Task description required"
exit
fi
if
"$SCORE_ONLY "
true
then
"$TASK "
"$REPO "
elif
"$JSON_OUTPUT "
true
then
"$TASK "
"$REPO "
"$score "
cat
EOF
{
"task": "$TASK",
"repository": "$REPO",
"score": $score,
"recommendation": "$rec"
}
EOF
else
"$TASK "
"$REPO "
fi