Ubuntu Encyclopedia
Overview
Use a docs-first workflow for Ubuntu-specific work. Prefer Ubuntu manpages at https://manpages.ubuntu.com/manpages/ for command and utility behavior, use official Ubuntu documentation when the task is broader than a manpage, consult cached local copies under .Ubuntu-Encyclopedia/ before re-fetching, and record useful authoritative excerpts plus environment-specific operational learnings so future work gets faster and safer.
This skill is for the Ubuntu distro/admin layer. It should trigger for Ubuntu-specific package, service, networking, storage, and release-behavior questions — not for generic Linux/shell/dev tooling questions that merely happen to be asked from an Ubuntu machine.
Workflow
- 1. Classify the task
- Decide whether the task is an Ubuntu-specific question, maintenance task, troubleshooting task, command-planning task, upgrade/update task, or live admin task.
- Use this skill when the task materially depends on Ubuntu-specific behavior, Ubuntu administration knowledge, Ubuntu package/service behavior, or command semantics that should be verified from manpages or official Ubuntu docs.
- Do not use this skill for generic shell work, generic Docker/git/Python work, or generic Linux questions that merely happen to be on Ubuntu when Ubuntu-specific semantics do not matter.
- 2. Check local cache first
- Use
.Ubuntu-Encyclopedia/ as the local knowledge/cache root.
- Check these locations first when relevant:
-
.Ubuntu-Encyclopedia/manpages/manpages.ubuntu.com/...
-
.Ubuntu-Encyclopedia/docs/...
-
.Ubuntu-Encyclopedia/notes/components/...
-
.Ubuntu-Encyclopedia/notes/patterns/...
-
.Ubuntu-Encyclopedia/inventory/...
- If a cached page or note already answers the question well enough, use it.
- 3. Consult authoritative Ubuntu sources before answering or acting
- Before answering direct or indirect Ubuntu questions that depend on command syntax, package behavior, service behavior, configuration semantics, or version-sensitive distro details, consult the relevant authoritative source unless the answer is already well-supported by the local cache.
- Prefer sources in this order:
1. Ubuntu manpages for command and utility behavior
2. Official Ubuntu docs for broader workflows and distro-specific guidance
- Before performing non-trivial Ubuntu maintenance or troubleshooting work, consult the relevant docs first when:
- the exact command semantics matter
- service/package behavior is easy to misremember
- the action could affect package state, service health, networking, storage, bootability, or access
- Do not improvise high-impact Ubuntu admin commands from memory when the docs are easy to check.
- 4. Cache consulted docs locally
- When you consult a manpage, save a normalized cache copy under
.Ubuntu-Encyclopedia/manpages/manpages.ubuntu.com/....
- When you consult broader Ubuntu docs, save a normalized cache copy under
.Ubuntu-Encyclopedia/docs/....
- Mirror the official path structure as much as practical.
- Cache only pages actually consulted; do not try to mirror the whole docs site eagerly.
- Use
scripts/cache_manpage.py or
scripts/cache_doc.py when appropriate.
- 5. Separate authoritative documentation from local observations
- Store manpage-derived material under
.Ubuntu-Encyclopedia/manpages/....
- Store other official-doc-derived material under
.Ubuntu-Encyclopedia/docs/....
- Store environment-specific operational knowledge under:
-
.Ubuntu-Encyclopedia/notes/components/
-
.Ubuntu-Encyclopedia/notes/patterns/
-
.Ubuntu-Encyclopedia/inventory/
- Distinguish clearly between:
- authoritative documentation
- observed local configuration/state
- inferred best-practice guidance
- 6. Record useful local learnings
- After useful live work, save durable notes such as:
- package/service management patterns
- host-specific quirks
- repeated repair/maintenance sequences
- networking/storage/admin gotchas
- safe/unsafe operational boundaries for the environment
- Prefer concise durable notes over re-learning the same Ubuntu-specific details later.
Live Work Rules
- - Treat manpage/docs lookup as the default preflight for non-trivial Ubuntu work.
- Prefer read/inspect first when entering an Ubuntu area you have not recently reviewed.
- Treat release upgrades, package repair, service/network/storage changes, and boot-impacting admin work as high-sensitivity areas.
- When uncertainty remains after checking cache + docs, say so and avoid bluffing.
- When answering a question, mention when useful whether the answer comes from cached manpages, cached official docs, a fresh lookup, or live observed environment state.
Data Root
Use this workspace-local root for cache and notes:
Expected structure:
- - INLINECODE18
- INLINECODE19
- INLINECODE20
- INLINECODE21
- INLINECODE22
Use scripts/init_workspace.py to create or repair the expected directory structure.
Note Destinations
- - Component-specific observations → INLINECODE24
- Reusable Ubuntu patterns/gotchas → INLINECODE25
- Environment-wide deployment/access info → INLINECODE26
- Cached manpages → INLINECODE27
- Cached official docs → INLINECODE28
Secrets / Sensitive Data
- - Do not store plaintext credentials, API keys, session tokens, private URLs, recovery codes, or other secrets in the encyclopedia notes/inventory tree.
- If a note needs to mention access details, keep it high-level and redact or omit secret material.
- Treat these workspace notes as operational memory, not as a secrets vault.
Resources
- -
scripts/init_workspace.py — create or repair the .Ubuntu-Encyclopedia/ directory tree. - INLINECODE31 — fetch and cache a consulted Ubuntu manpage under
.Ubuntu-Encyclopedia/manpages/.... - INLINECODE33 — fetch and cache a consulted official Ubuntu docs page under
.Ubuntu-Encyclopedia/docs/.... - INLINECODE35 — detailed operating workflow and evidence-handling rules.
- INLINECODE36 — canonical
.Ubuntu-Encyclopedia/ directory structure. - INLINECODE38 — useful Ubuntu topic groupings for faster authoritative lookup.
Good Outcomes
- - Answer an Ubuntu-specific question using cached or freshly checked manpages/docs instead of guesswork.
- Inspect a live Ubuntu host after checking the relevant docs and record any new local operational knowledge.
- Build a growing local Ubuntu knowledge cache that makes later work faster, safer, and more grounded.
- Turn one-off Ubuntu discoveries into durable notes so future work does not rediscover them from scratch.
Avoid
- - Triggering on generic shell work that is not materially Ubuntu-specific.
- Answering Ubuntu-specific questions purely from memory when authoritative sources are easy to consult.
- Treating local observed behavior as if it were guaranteed authoritative documented behavior.
- Dumping large amounts of low-value docs into the workspace without a reason.
- Making high-impact live changes before checking the relevant docs when exact behavior matters.
Ubuntu 百科全书
概述
采用文档优先的工作流程处理Ubuntu相关任务。优先使用https://manpages.ubuntu.com/manpages/上的Ubuntu手册页获取命令和工具行为说明,当任务范围超出单个手册页时使用官方Ubuntu文档,在重新获取前先查阅.Ubuntu-Encyclopedia/下的本地缓存副本,并记录有用的权威摘录及特定环境的操作经验,以便后续工作更快速、更安全。
本技能适用于Ubuntu发行版/管理层面。应针对Ubuntu特有的软件包、服务、网络、存储和发行版行为问题触发——而非那些恰好从Ubuntu机器上提出的通用Linux/shell/开发工具问题。
工作流程
- 1. 任务分类
- 判断任务是Ubuntu特定问题、维护任务、故障排查任务、命令规划任务、升级/更新任务,还是实时管理任务。
- 当任务实质上依赖Ubuntu特有行为、Ubuntu管理知识、Ubuntu软件包/服务行为,或需要从手册页或官方Ubuntu文档验证的命令语义时,使用本技能。
- 对于通用shell工作、通用Docker/git/Python工作,或仅因恰好在Ubuntu上提出但Ubuntu特有语义无关紧要的通用Linux问题,不使用本技能。
- 2. 优先检查本地缓存
- 将.Ubuntu-Encyclopedia/作为本地知识/缓存根目录。
- 相关时优先检查以下位置:
- .Ubuntu-Encyclopedia/manpages/manpages.ubuntu.com/...
- .Ubuntu-Encyclopedia/docs/...
- .Ubuntu-Encyclopedia/notes/components/...
- .Ubuntu-Encyclopedia/notes/patterns/...
- .Ubuntu-Encyclopedia/inventory/...
- 如果缓存的页面或笔记已能充分回答问题,则直接使用。
- 3. 在回答或操作前查阅权威Ubuntu来源
- 在回答依赖命令语法、软件包行为、服务行为、配置语义或版本敏感的发行版细节的直接或间接Ubuntu问题前,除非本地缓存已充分支持答案,否则应查阅相关权威来源。
- 按以下顺序优先选择来源:
1. 用于命令和工具行为的Ubuntu手册页
2. 用于更广泛工作流程和发行版特定指导的官方Ubuntu文档
- 在执行重要的Ubuntu维护或故障排查工作前,在以下情况下先查阅相关文档:
- 确切的命令语义至关重要
- 服务/软件包行为容易记错
- 操作可能影响软件包状态、服务健康、网络、存储、启动能力或访问权限
- 当文档易于查阅时,不要仅凭记忆即兴执行影响重大的Ubuntu管理命令。
- 4. 本地缓存已查阅的文档
- 查阅手册页时,在.Ubuntu-Encyclopedia/manpages/manpages.ubuntu.com/...下保存规范化缓存副本。
- 查阅更广泛的Ubuntu文档时,在.Ubuntu-Encyclopedia/docs/...下保存规范化缓存副本。
- 尽可能镜像官方路径结构。
- 仅缓存实际查阅的页面;不要急于镜像整个文档站点。
- 适当时使用scripts/cache
manpage.py或scripts/cachedoc.py。
- 5. 区分权威文档与本地观察
- 将手册页衍生材料存储在.Ubuntu-Encyclopedia/manpages/...下。
- 将其他官方文档衍生材料存储在.Ubuntu-Encyclopedia/docs/...下。
- 将特定环境的操作知识存储在:
- .Ubuntu-Encyclopedia/notes/components/
- .Ubuntu-Encyclopedia/notes/patterns/
- .Ubuntu-Encyclopedia/inventory/
- 清晰区分:
- 权威文档
- 观察到的本地配置/状态
- 推断的最佳实践指导
- 6. 记录有用的本地经验
- 完成有用的实时工作后,保存持久的笔记,例如:
- 软件包/服务管理模式
- 主机特定问题
- 重复的修复/维护流程
- 网络/存储/管理陷阱
- 环境的安全/不安全操作边界
- 优先使用简洁持久的笔记,避免日后重新学习相同的Ubuntu特定细节。
实时工作规则
- - 将手册页/文档查阅视为重要Ubuntu工作的默认预检步骤。
- 进入近期未复习的Ubuntu领域时,优先执行读取/检查操作。
- 将发行版升级、软件包修复、服务/网络/存储变更以及影响启动的管理工作视为高敏感领域。
- 在检查缓存和文档后仍存在不确定性时,应明确说明并避免猜测。
- 回答问题时,酌情说明答案来源是缓存的手册页、缓存的官方文档、新查阅的结果,还是实时观察到的环境状态。
数据根目录
使用以下工作区本地根目录存储缓存和笔记:
预期结构:
- - .Ubuntu-Encyclopedia/manpages/manpages.ubuntu.com/...
- .Ubuntu-Encyclopedia/docs/...
- .Ubuntu-Encyclopedia/notes/components/...
- .Ubuntu-Encyclopedia/notes/patterns/...
- .Ubuntu-Encyclopedia/inventory/...
使用scripts/init_workspace.py创建或修复预期的目录结构。
笔记存放位置
- - 组件特定观察 → .Ubuntu-Encyclopedia/notes/components/<组件名称>.md
- 可复用的Ubuntu模式/陷阱 → .Ubuntu-Encyclopedia/notes/patterns/<主题>.md
- 环境范围的部署/访问信息 → .Ubuntu-Encyclopedia/inventory/*.md
- 缓存的手册页 → .Ubuntu-Encyclopedia/manpages/manpages.ubuntu.com/...
- 缓存的官方文档 → .Ubuntu-Encyclopedia/docs/...
机密/敏感数据
- - 不要在百科全书笔记/清单树中存储明文凭据、API密钥、会话令牌、私有URL、恢复代码或其他机密信息。
- 如果笔记需要提及访问细节,应保持高层面描述,并编辑或省略机密材料。
- 将这些工作区笔记视为操作记忆,而非机密保险库。
资源
- - scripts/initworkspace.py — 创建或修复.Ubuntu-Encyclopedia/目录树。
- scripts/cachemanpage.py — 获取并缓存已查阅的Ubuntu手册页至.Ubuntu-Encyclopedia/manpages/...。
- scripts/cache_doc.py — 获取并缓存已查阅的官方Ubuntu文档页面至.Ubuntu-Encyclopedia/docs/...。
- references/workflow.md — 详细的操作工作流程和证据处理规则。
- references/cache-layout.md — 规范的.Ubuntu-Encyclopedia/目录结构。
- references/topic-map.md — 有用的Ubuntu主题分组,便于快速权威查找。
良好成果
- - 使用缓存或新查阅的手册页/文档回答Ubuntu特定问题,而非依赖猜测。
- 在查阅相关文档后检查实时Ubuntu主机,并记录任何新的本地操作知识。
- 构建不断增长的本地Ubuntu知识缓存,使后续工作更快速、更安全、更有依据。
- 将一次性的Ubuntu发现转化为持久笔记,避免日后从头重新发现。
避免事项
- - 对并非实质性的Ubuntu特定通用shell工作触发本技能。
- 在权威来源易于查阅时,仅凭记忆回答Ubuntu特定问题。
- 将本地观察到的行为视为有保证的权威文档行为。
- 无理由地向工作区倾倒大量低价值文档。
- 在确切行为至关重要时,未查阅相关文档即进行影响重大的实时变更。