5 Portable Agent Skills for OpenCode and Claude Code

5 Portable Agent Skills for OpenCode and Claude Code

适用于 OpenCode 和 Claude Code 的 5 个便携式智能体技能

Agent Skills turn repeated prompts into reusable, inspectable workflows. This collection includes five small skills for work that comes up often when building with OpenCode or Claude Code: reviewing public copy, checking text limits, capturing public webpages as PDFs, sending task notifications, and structuring research for later use. The full index is available at Published Agent Skills. For OpenCode, Skills can live in ~/.config/opencode/skills/ or project-level locations supported by your setup. Claude Code can discover Skills from .claude/skills/. Put a Skill folder in the right location, restart the agent session if needed, and it becomes available when the task matches its description.

“智能体技能”(Agent Skills)将重复的提示词转化为可复用、可审查的工作流。本合集包含了五个在 OpenCode 或 Claude Code 开发过程中经常用到的实用小技能:审查公开文案、检查文本限制、将公共网页保存为 PDF、发送任务通知以及结构化研究资料以备后用。完整索引可在“已发布智能体技能”(Published Agent Skills)中查看。对于 OpenCode,技能可以存放在 ~/.config/opencode/skills/ 或你配置支持的项目级目录中。Claude Code 则可以从 .claude/skills/ 中发现技能。只需将技能文件夹放入正确位置,必要时重启智能体对话,当任务与技能描述匹配时,该技能即可使用。

1. AI Writing Detector Skill

1. AI 写作检测技能

AI Writing Detector Skill reviews English and Brazilian Portuguese copy for patterns that make AI-written text feel generic. It checks common issues such as repeated sentence rhythm, filler phrases, excessive formatting, and em-dash use. It also ships with a CLI and MCP server for text and file linting. Useful prompts: Review this README introduction with the anti-ai-tells Skill. Keep the technical facts, flag generic wording, and suggest direct replacements. Run the writing linter on this release post, then rewrite only the passages that need attention. This is useful before publishing documentation, launch posts, landing pages, and changelogs.

AI 写作检测技能用于审查英语和巴西葡萄牙语的文案,识别那些让 AI 生成文本显得平庸的模式。它会检查诸如句子节奏重复、填充短语、过度格式化以及破折号滥用等常见问题。该技能还附带了用于文本和文件检查的 CLI 和 MCP 服务器。实用提示词:使用 anti-ai-tells 技能审查这份 README 简介。保留技术事实,标记平庸的措辞,并建议直接替换方案。对这篇发布文章运行写作检查器,然后仅重写需要修改的段落。这在发布文档、发布公告、落地页和更新日志之前非常有用。

2. Text Counter Skill

2. 文本计数技能

Text Counter Skill gives exact counts for characters, words, sentences, paragraphs, lines, graphemes, bytes, and phrase occurrences. It helps when “roughly under the limit” is not enough. Useful prompts: Write a 155-character meta description for this package and verify its exact character count. Reduce this GitHub issue title to 80 characters without removing the error code. Count the phrase “OpenCode” in this Markdown file. The Skill makes counting rules explicit. That avoids surprises with spaces, Unicode characters, emoji, or repeated phrases.

文本计数技能可以精确统计字符、单词、句子、段落、行数、字素、字节以及短语出现的次数。当“大致在限制范围内”的要求不够时,它能派上用场。实用提示词:为该包编写一个 155 字符的元描述,并验证其精确字符数。将此 GitHub Issue 标题缩减至 80 字符以内,且不能删除错误代码。统计此 Markdown 文件中“OpenCode”短语出现的次数。该技能明确了计数规则,从而避免了空格、Unicode 字符、表情符号或重复短语带来的意外情况。

3. HTML to PDF Skill

3. HTML 转 PDF 技能

HTML to PDF Skill converts authorized public webpages into readable, browser-rendered PDFs. The workflow uses Playwright and Chromium, waits for page assets, handles common cookie dialogs, removes ad blocks, and records the source URL and access time in each PDF footer. Useful prompts: Capture these public API documentation pages as PDFs for offline review. Create a readable PDF copy of these public release notes and verify the page count. This is practical for research, design reviews, long documentation pages, and internal reading packs.

HTML 转 PDF 技能将授权的公共网页转换为可读的、经浏览器渲染的 PDF。该工作流使用 Playwright 和 Chromium,能够等待页面资源加载、处理常见的 Cookie 弹窗、移除广告块,并在每个 PDF 页脚记录源 URL 和访问时间。实用提示词:将这些公共 API 文档页面保存为 PDF 以供离线查阅。为这些公共发布说明创建一个可读的 PDF 副本,并核对页数。这对于研究、设计评审、长文档页面和内部阅读资料包非常实用。

4. ntfy Skill

4. ntfy 通知技能

ntfy Skill sends safe completion, failure, or blocked notifications for agent tasks that may take longer than 30 seconds. It encourages a simple rule: estimate task duration before starting. If the work may take a while, notify the user once when it finishes or needs input. The Skill keeps tokens out of repositories, shell history, URLs, and notification content. It supports ntfy.sh and approved self-hosted ntfy servers. Useful prompts: This export may take several minutes. Use the ntfy Skill to notify me once the final files are ready. Before sending an ntfy message, confirm the token comes from the operating system credential store.

ntfy 技能为可能耗时超过 30 秒的智能体任务发送安全完成、失败或阻塞通知。它提倡一个简单的规则:在开始前预估任务时长。如果工作可能需要一段时间,则在任务完成或需要人工介入时通知用户一次。该技能确保令牌(Token)不会泄露到代码仓库、Shell 历史记录、URL 或通知内容中。它支持 ntfy.sh 以及经批准的自托管 ntfy 服务器。实用提示词:此导出过程可能需要几分钟。请使用 ntfy 技能在最终文件准备好后通知我。在发送 ntfy 消息前,请确认令牌来自操作系统凭据存储。

5. Open Knowledge Format Skill

5. 开放知识格式技能

Open Knowledge Format Skill creates source-linked Markdown research bundles for people and agents. A bundle can include an index, a research report, an AI summary, source tables, evidence tables, and related output files. It separates facts from interpretation and points claims back to their sources. Useful prompts: Package this research into an OKF bundle with source links, evidence rows, caveats, and open questions. Create an ai_summary.md that another agent can use to continue this investigation safely. This helps when research needs to survive longer than one chat session.

开放知识格式(OKF)技能为人类和智能体创建带有源链接的 Markdown 研究包。一个研究包可以包含索引、研究报告、AI 摘要、源数据表、证据表以及相关输出文件。它将事实与解读分离开来,并将观点指向其原始来源。实用提示词:将此研究打包成 OKF 格式,包含源链接、证据行、注意事项和待解决问题。创建一个 ai_summary.md,以便另一个智能体可以安全地继续此项调查。当研究成果需要跨越单次对话会话长期保存时,这非常有用。

A Small Workflow That Works

一个行之有效的小工作流

A developer can combine these Skills in a normal agent session: Research a topic and save findings with the Open Knowledge Format Skill. Draft documentation or a blog post. Use Text Counter for title, description, and social-post limits. Run AI Writing Detector before publication. Capture public references as PDFs when visual records matter. Use ntfy for long-running exports, tests, or browser tasks. No large framework is required. Each Skill is a focused Markdown file with optional scripts where automation adds value.

开发者可以在常规的智能体对话中组合使用这些技能:使用“开放知识格式技能”研究某个主题并保存发现;起草文档或博客文章;使用“文本计数技能”控制标题、描述和社交媒体帖子的字数限制;在发布前运行“AI 写作检测技能”;当需要视觉记录时,将公共参考资料保存为 PDF;对长时间运行的导出、测试或浏览器任务使用 ntfy。无需大型框架,每个技能都是一个专注的 Markdown 文件,并在自动化能带来价值的地方辅以可选脚本。