← 返回 Skills 市场
26
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install laosi-reading-assistant
功能描述
阅读助手 - 贴链接或粘贴文字,自动提炼4点:主旨/论据/行动/疑问,不用读全文。支持网页抓取和本地文本
使用说明 (SKILL.md)
Reading Assistant - 阅读助手
激活词: 读一下 / 总结 / 提炼 / 摘要
功能
- 4点结构化提炼:主旨 / 论据 / 行动 / 疑问
- 支持网页URL抓取和纯文本输入
- 自动保存阅读记录到知识库
Python 实现
import os, json, re
from datetime import datetime
class ReadingAssistant:
def __init__(self):
self.log_file = os.path.join(os.path.dirname(__file__), "reading_log.json")
def extract(self, text: str, source: str = "text") -> dict:
"""对输入文本做4点结构化提炼"""
# 分段落
paragraphs = [p.strip() for p in re.split(r'\
\
+', text) if p.strip()]
result = {
"source": source,
"timestamp": datetime.now().isoformat(),
"stats": {
"paragraphs": len(paragraphs),
"total_chars": len(text),
"total_words": len(text.split())
},
"extraction": {
"main_idea": self._extract_main_idea(paragraphs),
"key_arguments": self._extract_arguments(paragraphs),
"action_items": self._extract_actions(paragraphs),
"open_questions": self._extract_questions(text)
}
}
self._log(result)
return result
def _extract_main_idea(self, paragraphs: list) -> str:
"""提取主旨:取第一段或包含关键词的句子"""
candidates = [p for p in paragraphs if any(k in p.lower()
for k in ["this paper", "we propose", "in this", "本文", "我们提出"])]
if candidates:
return candidates[0][:300]
return paragraphs[0][:300] if paragraphs else ""
def _extract_arguments(self, paragraphs: list) -> list:
"""提取论据:含数据/引用的段落"""
args = []
for p in paragraphs:
if any(k in p for k in ["%", "图", "table", "实验", "accuracy", "结果表明", "实验表明"]):
args.append(p[:200])
return args[:5]
def _extract_actions(self, paragraphs: list) -> list:
"""提取行动项:含should/must/需要/应该的句子"""
actions = []
for p in paragraphs:
sentences = re.split(r'[。.!?]', p)
for s in sentences:
if any(k in s for k in ["should", "must", "need", "需要", "应该", "建议", "推荐"]):
actions.append(s.strip())
return actions[:5]
def _extract_questions(self, text: str) -> list:
"""提取开放问题:含问号的句子"""
questions = re.findall(r'[^。]*?[??][^。]*', text)
return [q.strip() for q in questions][:5]
def _log(self, result: dict):
"""保存阅读记录"""
logs = []
if os.path.exists(self.log_file):
with open(self.log_file, encoding="utf-8") as f:
logs = json.load(f)
logs.append(result)
with open(self.log_file, "w", encoding="utf-8") as f:
json.dump(logs, f, ensure_ascii=False, indent=2)
# 使用示例
reader = ReadingAssistant()
# 从文本提炼
article = """
We propose FlashAttention, a novel attention algorithm that computes exact attention
with significantly fewer memory accesses. Our experiments show 2-4x speedup over
baseline implementations on GPT-2 and BERT. The key insight is to tile the attention
computation, avoiding materialization of the full N×N attention matrix.
We recommend using block sizes of 128×128 for optimal performance.
"""
result = reader.extract(article, source="AI论文: FlashAttention")
print(f"主旨: {result['extraction']['main_idea'][:80]}...")
print(f"论据: {len(result['extraction']['key_arguments'])} 条")
print(f"行动: {result['extraction']['action_items']}")
网页抓取模式
from urllib.request import urlopen
from urllib.parse import urlparse
def extract_url(url: str) -> dict:
"""从URL抓取并提炼"""
try:
resp = urlopen(url, timeout=10)
html = resp.read().decode("utf-8", errors="ignore")
# 简单去标签
text = re.sub(r'\x3C[^>]+>', '', html)
text = re.sub(r'\s+', ' ', text).strip()
reader = ReadingAssistant()
return reader.extract(text, source=url)
except Exception as e:
return {"error": str(e)}
# 使用示例
# result = extract_url("https://arxiv.org/abs/2205.14135")
输出格式
📄 阅读摘要
━━━━━━━━━━━━━━━━━━━━
💡 主旨:
FlashAttention通过分块计算注意力,
避免完整N×N矩阵物化,实现2-4x加速
📊 论据:
1. GPT-2和BERT上验证2-4x加速
2. 推荐块大小128×128
✅ 行动:
- 建议在长序列任务中使用FlashAttention
❓ 疑问:
- 是否支持梯度检查点?
使用场景
- 论文快速浏览: 贴arXiv链接,30秒了解核心贡献
- 公众号文章: 太长不看?提炼4点够了
- 技术文档: API文档的快速导航
- 邮件处理: 长邮件自动摘要
依赖
- Python 3.8+
- urllib (标准库,可选URL抓取)
安全使用建议
Install only if you are comfortable with a local reading_log.json history of summaries, source labels or URLs, timestamps, and extracted snippets. Avoid using it on confidential emails, internal documents, or sensitive URLs unless you remove or disable the logging behavior and periodically delete any saved history.
能力评估
Purpose & Capability
The artifact consistently describes a reading assistant that summarizes pasted text or user-provided URLs into main idea, arguments, actions, and questions.
Instruction Scope
The Python example automatically logs each extraction, but that behavior is disclosed in the feature list as saving reading records to a knowledge base.
Install Mechanism
The package contains a single non-executable SKILL.md file, with no install scripts, dependencies beyond Python standard library examples, or hidden setup behavior.
Credentials
Fetching user-provided URLs and writing a local JSON reading log are proportionate to the stated reading and knowledge-base purpose, though users should be aware of local retention.
Persistence & Privilege
The sample implementation writes source identifiers, timestamps, statistics, and extracted snippets to reading_log.json without an explicit no-save mode or retention controls.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install laosi-reading-assistant - 安装完成后,直接呼叫该 Skill 的名称或使用
/laosi-reading-assistant触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Reading Assistant - 阅读助手.
- Summarizes any text or webpage into four points: main idea, key arguments, action items, open questions.
- Supports both plain text input and automatic web page extraction via URL.
- Automatically logs reading summaries to a local knowledge base.
- Output is structured, concise, and suitable for quick understanding without reading the full original.
- Example code and usage scenarios included for easy integration.
元数据
常见问题
阅读助手 是什么?
阅读助手 - 贴链接或粘贴文字,自动提炼4点:主旨/论据/行动/疑问,不用读全文。支持网页抓取和本地文本. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 26 次。
如何安装 阅读助手?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install laosi-reading-assistant」即可一键安装,无需额外配置。
阅读助手 是免费的吗?
是的,阅读助手 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
阅读助手 支持哪些平台?
阅读助手 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 阅读助手?
由 534422530(@534422530)开发并维护,当前版本 v1.0.0。
推荐 Skills