prose

GitHub

规范 Static Web Server 项目的各类人类可读文本写作,包括提交信息、CHANGELOG、PR描述、文档及注释。强调事实导向、直接、无修饰词及具体参数引用,确保内容准确且符合项目风格。

.agents/skills/prose/SKILL.md static-web-server/static-web-server

触发场景

编写或编辑 commit message 撰写 CHANGELOG 条目 起草 PR 描述或 Issue 正文 编写 Rustdoc 注释或 CLI 帮助文本 撰写 README 或用户文档

安装

npx skills add static-web-server/static-web-server --skill prose -g -y
更多选项

非标准路径

npx skills add https://github.com/static-web-server/static-web-server/tree/master/.agents/skills/prose -g -y

不安装直接使用

npx skills use static-web-server/static-web-server@prose

指定 Agent (Claude Code)

npx skills add static-web-server/static-web-server --skill prose -a claude-code -g -y

安装 repo 全部 skill

npx skills add static-web-server/static-web-server --all -g -y

预览 repo 内 skill

npx skills add static-web-server/static-web-server --list

SKILL.md

Frontmatter
{
    "name": "prose",
    "description": "Write or edit human-readable text for the Static Web Server (SWS) project — commit messages, CHANGELOG entries, PR descriptions, issue bodies, rustdoc comments, CLI help text, READMEs, and user docs — following project style and conventions. Use whenever producing text a person will read, not only Markdown files."
}

Writing SWS Prose

When to load: writing a commit message, CHANGELOG entry, PR description, issue body, /// doc comment, --help text, README section, or documentation for the static-web-server/docs repo.

Style

  • Fact-focused: state what a thing is and does
  • Direct: no hedging, no buzzwords ("leverage", "seamless", "robust"), no weasel words ("very", "quite", "really")
  • No dramatic terms: "critical", "crucial", "vital", "essential" only when something breaks without it
  • Literal over figurative: "blazing fast" → "serves X req/s at p99 Y ms"; "out of the box" → "by default"; "under the hood" → describe the mechanism
  • Concrete: include the flag, the env var, the TOML key, the header, and the status code
  • Active voice, present tense: "SWS appends Vary: Accept-Encoding", not "the header is appended"
  • Current behavior only in docs and doc comments. History belongs in the CHANGELOG and commit messages
  • Plain characters in code: no homoglyphs or invisible Unicode in identifiers, code, or config examples. Em dashes are fine in prose; in Rust source write them as the character, not a — escape inside a // comment

Bad: "SWS leverages advanced algorithms to enhance delivery." Good: "SWS picks zstd, br, gzip, or deflate from the client's Accept-Encoding q-values."

Commit Messages (docs/COMMITS.md)

<type>(<scope>): <subject>

<body>

<footer>
  • Types: feat, fix, docs, style, refactor, perf, test, chore
  • Scope: the module touched, e.g. server, http2, tls, compression, fs, handler, static_files, control_headers, custom_headers, cors, rewrites, directory_listing. Omit when the change is cross-cutting
  • Subject: imperative, lowercase first letter, no trailing period
  • Body: imperative; the motivation and how behavior differs from before
  • Footer: Fixes #123, and BREAKING CHANGE: <description> for breaking changes
  • Every line ≤ 100 characters

CHANGELOG Entries (CHANGELOG.md)

Keep a Changelog format. Each release groups bullets under the sections already used in the file: ### Breaking Changes, ### New Features, ### Bug Fixes, ### Security & Hardening, ### Performance, ### Refactoring, ### Testing, ### Documentation, ### Maintenance. One bullet per change:

- **Short bold title.** One or two sentences on what changed for users, naming flags, env vars, or TOML keys. ([#758](https://github.com/static-web-server/static-web-server/pull/758) by [@user](https://github.com/user))

Describe the effect on users, not the implementation. For a breaking change, state the old and new behavior.

PR Descriptions

Follow .github/PULL_REQUEST_TEMPLATE.md. Cover: what changes, why (link the issue), how it was tested (commands run), and user-visible effects including new flags and defaults. Note when the docs repo needs an update.

Rustdoc and CLI Help

  • #![deny(missing_docs)]: every public item, field, and variant needs ///
  • The /// on a General field in settings/cli.rs is the --help text. Say what the option does, the accepted values, and the default when it isn't obvious from default_value
  • Module docs (//!) state the module's responsibility and any non-obvious invariant (see etag.rs)
  • Comments explain why: the constraint, the RFC section, the measured cost. Don't restate the code

User Documentation

User docs live in the separate static-web-server/docs repository (src/v3/ for v3, src/v2/ for v2), not in this repo. A feature page contains:

  1. One-sentence summary
  2. Default state and how to toggle it
  3. CLI, env var, and TOML forms:
    static-web-server --compression-static true
    SERVER_COMPRESSION_STATIC=true static-web-server
    
    [general]
    compression-static = true
    
  4. Behavior when enabled and disabled, with an HTTP example (curl -I output)
  5. Interactions with related features

Terminology

  • SWS: Static Web Server; spell out on first mention
  • Root directory: the --root / -d directory being served
  • Pre-compressed / static compression: serving .br, .gz, .zst files from disk
  • On-the-fly / dynamic compression: encoding the response at request time
  • Config file: the TOML file (sws.toml by default, --config-file / -w)
  • Advanced options: TOML-only [advanced] rules (headers, rewrites, redirects, virtual hosts, memory cache)

版本历史

  • a1500d4 当前 2026-10-20 05:08

    细化了写作风格指南,增加了关于字面表达、主动语态和代码中字符的具体要求;明确了 commit message 的格式规范(类型、作用域、主体、页脚);更新了 CHANGELOG 的分组标题和条目格式示例。

  • 21dc11b 2026-08-20 17:42

同 Skill 集合

.agents/skills/code-quality/SKILL.md
.agents/skills/design/SKILL.md
.agents/skills/issue-tracking/SKILL.md
.agents/skills/performance/SKILL.md
.agents/skills/rust-backend/SKILL.md
.agents/skills/security/SKILL.md
.agents/skills/static-file-serving/SKILL.md
.agents/skills/testing/SKILL.md

元信息

文件数
0
版本
a1500d4
Hash
c20755d7
收录时间
2026-08-20 17:42

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-27 09:43
浙ICP备14020137号-1