doc-writing-best-practices
中文技术文档的写作规范。涵盖中西文混排的空格与标点、标题层级与代码块标注、表格与列表的取舍、以及"写清为什么"和"示例可直接抄用"的内容要求。在编写或修改 README、设计文档、运维手册、变更说明、注释块等任何面向人阅读的中文技术文档时使用——尤其是产出 Markdown 文件、写提交说明、或整理已有文档时。
- License 许可
- MIT
- 所属仓库
- JinsYin/skills
- 最近更新
- 2026-11-09
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- servarr-health-check
- description
- Use when checking servarr stability, Plex/rclone FUSE hangs, kernel panics, D-state probes, Arr queues, Kometa sync state, recent imports, or whether media automation is healthy.
02 资源文件 12
- 参考文档AGENTS.md7.9 KB
- 参考文档rules/_sections.md1.1 KB
- 参考文档rules/cjk-latin-spacing.md817 B
- 参考文档rules/cjk-number-spacing.md761 B
- 参考文档rules/cjk-punctuation.md894 B
- 参考文档rules/content-example-copy-ready.md1.1 KB
- 参考文档rules/content-why-not-just-what.md1.2 KB
- 参考文档rules/struct-code-fence-language.md929 B
- 参考文档rules/struct-heading-no-skip.md946 B
- 参考文档rules/struct-reference-links.md1.6 KB
- 参考文档rules/struct-table-vs-list.md949 B
- 脚本scripts/build.sh1.5 KB
03 SKILL.md 正文
Servarr Health Check
Overview
Perform a read-only operational health check of servarr focused on the known Plex/Sonarr/Radarr ↔ rclone FUSE failure mode, Kometa tag-sync debounce, and media import flow.
Core principle: verify before reassurance. Do not say “stable”, “no panics”, or “working” until boot continuity, kernel logs, D-state processes, queues, and Kometa state have been checked.
Mandatory First Steps
- Activate/check Serena project onboarding if not already done.
- Use read-only SSH commands only.
- Do not read/probe media file contents through
/media/mRemote,/media/mRemote/mounts/nzbdav, or nzbdav.idspaths. - Do not print Plex tokens, Arr API keys, Discord webhooks, or full secrets.
Standard Check
Run a compact snapshot:
ssh servarr 'printf "=== uptime / boots ===\n"; date; uptime; journalctl --list-boots | tail -5; printf "=== dstate/probes ===\n"; ps -eo pid,ppid,stat,comm,args | awk '\''$3 ~ /D/ || /Plex Media Scan|ffprobe|ffmpeg|Sonarr|Radarr|rclone/ {print}'\'' | head -80; printf "=== kernel hung/panic current boot ===\n"; journalctl -k -b 0 --no-pager | grep -Ei '\''hung_task|blocked for more than|kernel panic|not syncing|I/O error|fuse.*error|rclone'\'' | tail -80 || true; printf "=== arr queues ===\n"; for app_port in radarr:7878 sonarr:8989; do app=${app_port%:*}; port=${app_port#*:}; key=$(grep -oPm1 "(?<=<ApiKey>)[^<]+" /home/xbxd/docker/data/$app/config.xml); echo ---$app---; curl -fsS -H "X-Api-Key: $key" "http://localhost:$port/api/v3/queue?page=1&pageSize=200" | jq -r '\''"queue_records=" + (.records|length|tostring) + " states=" + ([.records[]?.trackedDownloadState] | group_by(.) | map((.[0]//"null")+":"+(length|tostring)) | join(","))'\''; done; printf "=== kometa/hung monitor ===\n"; find /home/xbxd/docker/data/kometa/config/sync-state -maxdepth 3 -type f -printf '\''%TY-%Tm-%Td %TH:%TM:%TS %p size=%s\n'\'' 2>/dev/null | sort || true; tail -20 /var/log/hung-task-monitor.log 2>/dev/null || true'
If context-mode local storage errors, use direct SSH only if the harness allows read-only bash. Never “fix” by probing media files.
Interpret Results
| Signal | Meaning | Response |
|---|---|---|
| Current boot unchanged, high uptime | Good | Mention uptime and no new boot |
| Kernel log empty for hung/panic terms | Good | “No current-boot hung-task/panic evidence” |
D-state Plex Media Scan, ffprobe, or ffmpeg appears |
Yellow/red | Poll briefly; if persistent near hung-task timeout, warn |
| D-state clears within a few polls | Usually OK | Note it cleared and identify item if known |
| Radarr/Sonarr queue > 0 | Not automatically bad | Report states; distinguish downloading/importPending/stuck |
Kometa dirty/<collection> marker recent |
Expected debounce | Do not call stuck unless older than health threshold |
| Kometa processing/drain running | Expected | Report in progress |
| Hung-task monitor shows only old 11:18 panic | Historical | Say no new monitor entries |
Recent Media Flow Check
Use when asked whether automation is working or media was added:
ssh servarr 'bash -s' <<'REMOTE'
set -euo pipefail
since="REPLACE_WITH_UTC_ISO"
for app_port in radarr:7878 sonarr:8989; do
app=${app_port%:*}; port=${app_port#*:}; key=$(grep -oPm1 "(?<=<ApiKey>)[^<]+" /home/xbxd/docker/data/$app/config.xml)
echo "=== $app history since $since ==="
curl -fsS -H "X-Api-Key: $key" "http://localhost:$port/api/v3/history?page=1&pageSize=100&sortKey=date&sortDirection=descending" \
| jq -r --arg since "$since" '.records[]? | select(.date >= $since) | [.date,.eventType,(.movie.title//.series.title//""),(.episode.title//""),(.sourceTitle//""),(.data.importedPath//""),(.data.reason//"")] | @tsv'
done
REMOTE
For Plex recently-added checks, query Plex API metadata only. Do not stat/read media contents beyond directory/symlink metadata.
Known Context
- Root issue was Plex/Sonarr
ffprobe/scanner hangs opening rclone FUSE nzbdav symlink targets. - Bad historical file: Parks and Recreation S04E21 “Bus Tour”; avoid restoring/importing through rclone FUSE without a safer plan.
hung_task_panicnormally resets to1after reboot.- Arr Plex
updateLibraryis intentionally enabled again for Radarr/Sonarr/Lidarr so Plex sees new imports before Kometa labels them. - Kometa custom script uses dirty markers under
/home/xbxd/docker/data/kometa/config/sync-state/and a 120s debounce.
Response Format
Keep the answer concise:
- Green: no reboot, no current D-state probes, no kernel hung-task/panic, queues OK.
- Yellow: transient analyzer, active Kometa debounce, queue activity, or non-fatal Plex warnings.
- Red: new boot, current-boot hung-task/panic, persistent D-state probe, importPending with D-state
ffprobe.
Always include the timestamp and strongest evidence, e.g. uptime, boot start, queue counts, and whether D-state/kernel checks were clean.
Common Mistakes
- Calling Kometa “stuck” while dirty marker mtime is still changing within debounce.
- Declaring stability from uptime alone without checking D-state and kernel logs.
- Touching media contents with
ffprobe,dd,mediainfo,cat, or thumbnail generation. - Printing secrets from config/logs.
- Treating Plex
Unknown metadata type: folderwarnings as the FUSE panic pattern.
04 同仓库更多 Skills
write-great-skill
Workflow and quality bar for agent skills: draft, polish, compress, verify, ship. Use whenever creating or editing a skill (`SKILL.md`, `references/`, `rules/`), or when project conventions route root `CLAUDE.md`/`AGENTS.md` edits here, even if the user only says “改一下这个 skill”.
write-fspec
Derive the 功能规格说明书 (functional spec) from the product prototype and keep it versioned under products/fspec/: Flyway-style V files plus a merged CURRENT.md. Use when a prototype is finalized, changed or backfilled, when a draft V is confirmed or CURRENT.md lags, or when the user mentions 功能规格, 功能规格说明书 or fspec. Not for the feature spec (.scratch/*/spec.md) or DESIGN.md.
version-release
Cut a SemVer release — bump every module's version in lockstep, promote CHANGELOG.md, commit, tag, push to origin. Args `major|minor|patch|<x.y.z>`; none → level inferred from `[Unreleased]`, confirmed with user. Invoke only on explicit request: the user, another skill, or a project convention asking for a release.
ui-ux-best-practices
UI/UX rules for Chinese-language React/Vue admin consoles and their product/design specs. Use when designing, building, reviewing, or refactoring forms, lists, modals/drawers, destructive actions, copy, formats, or console layout.
spring-boot-best-practices
Spring Boot 3 + Java 21 + MyBatis Plus 项目的编码规范与架构纪律。涵盖分层依赖、国密 SM2/SM3/SM4、MyBatis Plus 实体与主键策略、多方言数据库迁移、R/RList/RPage 响应包装、DTO 职责边界、鉴权框架选型(Spring Security / Sa-Token)与声明式权限校验、命名约定、模块 README 文档要求。在编写、审查或重构 Spring Boot 后端代码时使用——尤其是新增 Controller/Service/Mapper、定义 Entity 或 DTO、写数据库迁移、处理加解密与签名、设计 API 契约、或接入鉴权与权限校验时。
setup-rules
Conduct an interactive interview, then install selected agent conventions, adapters, `skillsw`, and sensitive-file read restrictions into a project; `update` refreshes installed items without prompting. Use when the user asks to set up agent rules, or run `update` after `setup-rules` conventions change (e.g. Skill Workflow sync). Not for reviewing or hand-editing `CLAUDE.local.md`.