lexile-check

Detect the Lexile measure of English text. Invoke when the user mentions triggers such as “Lexile”, “lexile”, “detect English text difficulty”, “check picture book English level”, or “reading level”.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "lexile-check" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-2fce11ad265ce6d088b0015fc9965b5eec8006c6658cc36e1229911fbcc9671c. Verify the upstream source and version against https://skillhub.cn/skills/user_b94aef45/lexile-check before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Detect the Lexile measure of English text. Invoke when the user mentions triggers such as “Lexile”, “lexile”, “detect English text difficulty”, “check picture book English level”, or “reading level”.

0 Downloads

Introduction source: third_party · user_b94aef45 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: lexile-check
description: 检测英文文本的蓝思值(Lexile)。触发条件:用户提到"蓝思值"、"lexile"、"检测英文文本难度"、"检查绘本英文等级"、"阅读分级"等。

Lexile Check Skill

通过 CoGrader 免费 API 检测英文文本的蓝思值、AWL 覆盖率、Tier 2 词汇等指标。 API: https://cograder.com/tools/vocabulary-analyzer/ (免登录、免费、无配额限制)

执行步骤

步骤 0: 环境自检与自动修复

按顺序执行以下检查,所有安装操作必须自动执行,不提示用户手动下载:

0.1 检查 Python

python --version 2>&1 || python3 --version 2>&1 || py --version 2>&1

如果输出 Python 3.7.x 或更高版本 -> 记录实际可用的命令名 (python / python3 / py) 为 $PYTHON,跳到步骤 0.2。

如果无输出或版本 < 3.7 -> 执行 0.1B 自动安装 Python。

0.1B 自动安装 Python

先检测操作系统:

uname -s 2>/dev/null || echo "Windows"
# 或 PowerShell: $env:OS

Windows (使用 winget,Windows 10+ 内置):

# 使用 Start-Process 避免交互式弹窗
winget install Python.Python.3.12 --silent --accept-package-agreements --accept-source-agreements 2>&1

# 如果 winget 不可用(极旧的 Windows),回退到直接下载:
# PowerShell 静默下载安装:
# $url = "https://www.python.org/ftp/python/3.12.8/python-3.12.8-amd64.exe"
# $out = "$env:TEMP\python-installer.exe"
# Invoke-WebRequest -Uri $url -OutFile $out
# Start-Process -Wait -FilePath $out -ArgumentList "/quiet","InstallAllUsers=1","PrependPath=1","Include_test=0"
# Remove-Item $out

安装后需要刷新 PATH。在 Windows 上因为 Claude 的每个 Bash/PowerShell 调用都是独立进程,安装完成后在新的 shell 中验证:

# 尝试常见路径
$py = Get-Command python -ErrorAction SilentlyContinue
if (-not $py) { $py = Get-Command py -ErrorAction SilentlyContinue }
if (-not $py) {
    # winget 安装后的默认路径
    $candidates = @(
        "$env:LOCALAPPDATA\Programs\Python\Python312\python.exe",
        "$env:ProgramFiles\Python312\python.exe",
        "C:\Python312\python.exe"
    )
    foreach ($c in $candidates) { if (Test-Path $c) { $py = $c; break } }
}

如果所有路径都找不到 -> 提示用户重新打开终端后重试。

macOS:

优先使用 brew,无 brew 时用官方 pkg:

if command -v brew &>/dev/null; then
  brew install python@3.12 2>&1
else
  # 无 brew:下载官方 pkg 静默安装
  curl -sL "https://www.python.org/ftp/python/3.12.8/python-3.12.8-macos11.pkg" -o /tmp/python.pkg
  sudo installer -pkg /tmp/python.pkg -target / 2>&1
  rm -f /tmp/python.pkg
fi

安装后验证:/usr/local/bin/python3.12 --version 或 /usr/local/bin/python3 --version。

Linux:

# Debian/Ubuntu
if command -v apt-get &>/dev/null; then
  sudo apt-get update -qq && sudo apt-get install -y -qq python3 python3-venv 2>&1
# Red Hat/CentOS/Fedora
elif command -v dnf &>/dev/null; then
  sudo dnf install -y python3 2>&1
elif command -v yum &>/dev/null; then
  sudo yum install -y python3 2>&1
# Arch
elif command -v pacman &>/dev/null; then
  sudo pacman -S --noconfirm python 2>&1
# Alpine
elif command -v apk &>/dev/null; then
  sudo apk add --no-cache python3 2>&1
else
  echo "ERROR: Unknown Linux distribution, cannot auto-install Python"
  exit 1
fi

安装后验证:python3 --version

0.2 检查脚本文件

ls -la "{{SKILL_DIR}}/lexile_api.py"

如果文件存在 -> 通过。

0.3 检查网络

curl -s -o /dev/null -w "%{http_code}" "https://cograder.com" --connect-timeout 10 2>&1
  • 返回 200/301/302 -> 通过
  • 返回空或超时 -> 执行代理检测

代理检测(中国大陆常见问题):

# 测试是否有代理环境变量
echo "HTTP_PROXY=$HTTP_PROXY"
echo "HTTPS_PROXY=$HTTPS_PROXY"
# 如果没有代理但网络不通,提示用户:
# "CoGrader API 当前不可达,可能需要 VPN 或代理。你可以在浏览器打开 https://cograder.com 验证。"

0.4 最终确认

输出环境检测摘要:

Environment check summary:
- OS: <detected>
- Python: <version> ($PYTHON command)
- Script: found
- Network: <ok/blocked>

步骤 1: 准备文本

  1. 从用户指定的文件中提取英文正文
  2. 如果用户引用的是 Markdown 绘本脚本,只提取 **Text**: 或 - **Text**: 后面的英文行
  3. 将提取的英文文本写入临时文件(UTF-8)

提取示例(绘本脚本格式):

import re
with open(script_path, 'r', encoding='utf-8') as f:
    content = f.read()
lines = []
for line in content.split('\n'):
    m = re.match(r'^- \*\*Text\*\*[::]\s*(.+)', line)
    if m:
        lines.append(m.group(1))
text = '\n'.join(lines)
with open(temp_file, 'w', encoding='utf-8') as f:
    f.write(text)

步骤 2: 调用脚本检测

$PYTHON "{{SKILL_DIR}}/lexile_api.py" <temp_file>

脚本特性:

  • 文本 <= 80 词:单次 API 调用
  • 文本 > 80 词:自动分块(每块 ~80 词),分别调用 API 后取 Lexile 中位数
  • 内置:3 次重试 + 指数退避 + 60s 超时 + 429 速率限制处理
  • 分块结果标注 "(Chunked analysis)"

可手动控制分块:

$PYTHON "{{SKILL_DIR}}/lexile_api.py" <temp_file> --chunk-size 120

步骤 3: 解读结果

字段 含义
Lexile Estimate 蓝思值,200L-350L 为儿童绘本推荐区间
Grade Band 美国 K-12 年级 + 大致年龄
Word / Sentence Count 文本统计
AWL Coverage 学术词汇覆盖,日常写作 <4%,学术写作 6%-12%
AWL Words / Tier 2 Vocab 检出词汇列表

绘本项目验收参考:

  • 目标蓝思值: 250L-300L
  • AWL 覆盖率: <2% 为佳(绘本 = 日常语言)
  • Lexile < 250 → 句子过短,增加 1-2 个复合句
  • Lexile > 300 → 句子过长,拆分或替换低频词

步骤 4: 报告与清理

将结果以表格展示,判断是否在目标区间内。清理临时文件。

常见问题

现象 原因 自动处理
Python 未安装 新系统/精简系统 自动安装 (winget/brew/apt)
Python 版本 < 3.7 系统自带旧版 装新版到用户目录,不影响系统 Python
python 命令找不到 Windows 未加入 PATH 自动探测 py / python3 / 安装目录
安装后 PATH 未刷新 当前 shell 未重载 尝试已知安装路径直接调用
服务器 500 文本过长/特殊字符 自动重试;失败则分块
网络超时 中国大陆访问慢 重试 + 退避;检测代理环境变量
API 返回 {error: string} 输入格式不对 至少 2 句,检查 JSON 转义
分块后 Lexile 偏低 短文本固有偏差 结果标注 "(Chunked)",建议增大 chunk-size
winget 不存在 极旧的 Windows 回退到 PowerShell 直接下载官方安装包
sudo 需要密码 受限 Linux 环境 尝试 apt-get 的非 sudo 替代(如 --user 标志的 pip 方式)

API 说明

  • 端点: POST https://cograder.com/api/vocabulary-analyzer/
  • 请求格式: {"text": "英文文本内容"}
  • 响应字段: lexileEstimate, lexileBandLabel, awlCoverage, awlWords, tier2Words, wordCount, sentenceCount, registerAssessment
  • 限制: 免登录,免费,无硬性配额
  • 蓝思值为估计值,非 MetaMetrics 官方认证值,适用于教学决策

完成清单

执行完毕后向用户报告:

  • 蓝思值是否在目标区间内
  • 不在区间内时给出具体调整建议(句长、词汇替换)
  • 如果使用了分块模式,提醒结果有标注 "(Chunked analysis)"

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value75/100

Areas to improve

  • 缺少When to Use章节 Reported severity: Minor

    文档中缺少明确的'When to Use'使用场景说明章节

    Recommendation: 建议添加'When to Use'章节,明确说明该Skill适用的具体场景和使用时机

Highlights

  • 提供英文文本蓝思值检测功能,适用于教育、出版、英语学习等多个场景
  • 集成CoGrader免费API,无需登录和配额限制,实用性强
  • 支持文本分块处理,可处理长文本内容
Trigger Precision85/100

Areas to improve

  • 触发词可进一步细化 Reported severity: Minor

    触发词列表可以更具体,如添加'英文阅读难度'、'文本分级'等变体

    Recommendation: 建议扩展触发词列表,增加更多用户可能使用的表达方式

Highlights

  • 触发词覆盖全面,包含中英文关键词
  • 边界清晰,不易与其他Skill混淆
Structure and Standards80/100

Areas to improve

  • Document is too long Reported severity: Minor

    文档内容超过500行,影响可读性

    Recommendation: 建议将部分详细说明移至附录或外部链接,保持主文档简洁

  • 排版问题 Reported severity: Minor

    部分代码块和表格格式不够规范

    Recommendation: 建议统一代码块标记和表格格式,提升文档专业性

Highlights

  • 执行步骤清晰,Phase划分合理
  • 包含完整的端到端示例和常见问题处理
  • frontmatter完整,包含name和description
Execution Reliability70/100

Areas to improve

  • 自动安装Python存在平台兼容风险 Reported severity: Major

    自动安装Python的脚本在不同操作系统和环境中可能存在兼容性问题,特别是Windows的winget和Linux的各种包管理器

    Recommendation: 建议增加更详细的错误处理和回退机制,或提供手动安装指引作为备选方案

  • 网络检测和代理处理不完善 Reported severity: Major

    网络检测逻辑简单,对中国大陆用户常见的代理/VPN场景处理不够完善

    Recommendation: 建议增加更智能的网络检测和代理自动配置功能

Highlights

  • 工具来源明确,使用CoGrader官方API
  • 参数处理正确,支持文本分块和重试机制
  • 覆盖主要异常情况,有重试和退避策略
Evidence Verifiability (mean of the first four)78/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • cograder.com
  • www.python.org

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.