manpage-skill
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 "manpage-skill" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-1418f76f9983188a7a971f62b12bbce040dbb287b08e3a446d0d41dc76969fd3. Verify the upstream source and version against https://skillhub.cn/skills/user_b6499226/manpage-skill 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
A Linux manpage query and analysis tool offering manual page lookup, search, parsing, and visualization by name/keyword/section; generates structured documents and HTML reports, including command syntax parsing, option extraction, example collection, and related command recommendations, suitable for learning commands, documentation lookup, and script writing.
Introduction source: third_party · user_b6499226 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- man --no-hyphenation --no-justification <command> | col -b ```
- Testing
- Not tested
Browse files
Frontmatter
name: manpage-skill
description: >
Linux manpage 查询与分析专家。提供命令手册页查询、搜索、解析和可视化功能。
支持按名称/关键词/章节查询,生成结构化文档和 HTML 报告。包含命令语法解析、
选项提取、示例收集、相关命令推荐。适用于命令学习、文档查阅、脚本编写等场景。
compatibility: >
适用于 Linux/Unix 系统 (openEuler/CentOS/RHEL/Ubuntu/macOS 等)。
需要 man、apropos、whatis 等标准工具。支持 aarch64/x86_64 架构。
生成 HTML 报告需要浏览器查看。
metadata:
author: openEuler community
version: "1.0.0"
keywords:
- manpage
- man
- documentation
- command-reference
- linux-manual
- help-system
- cli-reference
allowed-tools: Bash(man:*) Bash(apropos:*) Bash(whatis:*) Bash(manpath:*) Bash(grep:*) Bash(cat:*) Bash(ls:*) Bash(pager:*)Manpage 查询与分析技能
触发场景
当用户需要:
- 查询 Linux/Unix 命令的手册页
- 搜索包含特定关键词的命令
- 了解命令的完整语法和选项
- 生成命令参考文档
- 学习新命令的使用方法
- 查找相关命令和替代方案
核心功能
1. 命令手册查询
# 基本查询
man <command>
# 指定章节查询
man <section> <command>
# 查询所有匹配的手册页
man -a <command>
# 以纯文本输出 (无分页)
man --no-hyphenation --no-justification <command> | col -b
2. 关键词搜索
# 搜索命令名称和描述
apropos <keyword>
man -k <keyword>
# 精确匹配
whatis <command>
# 搜索特定章节
apropos -s <section> <keyword>
3. 手册页章节说明
| 章节 | 内容 | 示例 |
|---|---|---|
| 1 | 用户命令 | man 1 ls |
| 2 | 系统调用 | man 2 fork |
| 3 | 库函数 | man 3 printf |
| 4 | 特殊文件 | man 4 null |
| 5 | 文件格式 | man 5 passwd |
| 6 | 游戏 | man 6 fortune |
| 7 | 杂项 | man 7 ascii |
| 8 | 系统管理 | man 8 mount |
| 9 | 内核例程 | man 9 kmap |
4. 手册页结构解析
标准 manpage 包含以下章节:
NAME - 命令名称和简短描述
SYNOPSIS - 命令语法格式
DESCRIPTION - 详细描述
OPTIONS - 命令行选项说明
EXAMPLES - 使用示例
EXIT STATUS - 退出状态码
FILES - 相关文件
ENVIRONMENT - 环境变量
DIAGNOSTICS - 诊断信息
BUGS - 已知问题
AUTHOR - 作者信息
SEE ALSO - 相关命令
使用方法
模式 1: 查询命令手册
# 调用技能查询
manpage.sh query <command>
# 示例
manpage.sh query ls
manpage.sh query grep
manpage.sh query systemctl
# 指定章节查询
manpage.sh query 5 passwd
manpage.sh query -s 5 passwd
输出内容:
- 命令名称和描述
- 完整语法格式
- 常用选项列表
- 使用示例
- 相关文件
- 相关命令推荐
模式 2: 搜索相关命令
# 按关键词搜索
manpage.sh search <keyword>
# 示例
manpage.sh search "file compression"
manpage.sh search "network interface"
manpage.sh search "process management"
输出内容:
- 匹配命令列表
- 每个命令的简短描述
- 所属章节
- 推荐使用场景
模式 3: 在命令手册页中搜索关键词
# 在指定命令的手册页中搜索参数、选项或子命令说明
manpage.sh search-in <command> <keyword>
# 示例
manpage.sh search-in docker-run --rm
manpage.sh search-in docker-run -- -v -i # 关键词以 - 开头时使用 -- 分隔
manpage.sh search-in grep -i
manpage.sh search-in clang -std
输出内容:
- 匹配行号
- 上下文 2 行
- 适用场景说明
模式 4: 生成命令参考卡
# 生成快速参考
manpage.sh cheat <command>
# 示例
manpage.sh cheat tar
manpage.sh cheat find
manpage.sh cheat awk
输出内容:
- 最常用选项 Top 10
- 典型使用场景示例
- 快捷命令组合
- 常见陷阱和注意事项
模式 4: 生成 HTML 文档
# 生成 HTML 格式手册
manpage.sh html <command> -o <file.html>
# 示例
manpage.sh html bash -o bash-reference.html
脚本工具
manpage (Bash)
主脚本位于 scripts/manpage.sh,是一个 Bash 命令行工具,封装了 man、apropos、whatis 等系统工具,提供以下子命令:
| 子命令 | 说明 | 示例 |
|---|---|---|
query |
查询命令手册页 | manpage.sh query ls |
search |
按关键词搜索相关命令 | manpage.sh search compression |
search-in |
在指定命令手册页中搜索关键词 | manpage.sh search-in docker-run --rm |
cheat |
生成命令速查表 | manpage.sh cheat tar |
html |
生成 HTML 参考文档 | manpage.sh html bash -o bash.html |
sections |
列出手册章节说明 | manpage.sh sections |
random |
随机推荐一个命令 | manpage.sh random |
常用选项:
-s, --section <n>:指定手册章节 (1-9)-o, --output <file>:输出文件路径 (HTML 模式)-h, --help:显示帮助信息
特性:
- 优先使用
man查询完整手册页 man不可用时自动降级到<command> --help- 使用 ANSI 颜色美化终端输出
- 支持指定章节查询 (
manpage.sh query 5 passwd或manpage.sh query -s 5 passwd)
直接调用:
scripts/manpage.sh.sh query ls
常见问题
问题 1:命令存在但 man <cmd> 找不到手册页
原因: man 是手册页查看工具(man-db 包),而具体命令的手册页文件在单独的文档包中。最小化安装或容器环境常只安装命令二进制,不安装手册页。
解决: 安装 man-pages 及对应命令的文档包,然后重建索引:
# 安装通用 Linux 手册页
dnf install -y man-pages
# 安装常用命令文档(如 coreutils 包含 ls、cp、mv、rm 等)
dnf install -y coreutils
# 更新 whatis / apropos 数据库
mandb
安装完成后即可正常使用:
man ls
man tar
man 5 passwd
问题 2:man 命令不可用
原因: man-db 包未安装。
解决:
dnf install -y man-db
mandb
本脚本在 man 不可用时会自动降级到 <command> --help。
问题 3:搜索结果为空
原因: 关键词未命中 man 页描述,或 whatis/apropos 数据库未生成。
解决:
- 尝试英文关键词,如
copy代替复制; - 使用更通用的术语,如
file代替files; - 执行
mandb重建数据库。
manpage.sh search copy
manpage.sh search networkCurrent listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 Linux 命令手册页查询、搜索、解析和可视化功能
- 支持多种查询模式(query/search/search-in/cheat/html)
- 适用于命令学习、文档查阅、脚本编写等多个场景
Highlights
- 触发场景描述清晰完整
- 关键词覆盖全面且边界清晰
- description 位置正确且内容完整
Highlights
- 功能模式划分清晰(query/search/search-in/cheat/html)
- 每个模式都有详细的使用方法和输出说明
- frontmatter 完整规范,包含兼容性说明
Highlights
- 使用标准系统工具(man/apropos/whatis)
- 具备异常降级机制(man 不可用时使用 --help)
- 提供了常见问题的解决方案
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.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.