manpage-sync
Regenerate man pages and shell completion scripts from the shipctl command tree whenever commands, flags, or subcommands change. Use when a new command or flag is added, when the help text changes, or when asked to "update the man pages" or "sync completions".
- License 许可
- MIT
- 最近更新
- 2026-11-06
- Stars
- ★ 18
- Forks
- 1
01 前言 Front Matter
- name
- manpage-sync
- metadata
- { "forged-by": "codex-agent", "last-used": "2026-04-28", "forged-from": "session-2026-04-15", "usage-count": "8", "forged-reason": "Man pages drifted after three consecutive flag additions — users complained that --help and man shipctl showed different defaults" }
- description
- Regenerate man pages and shell completion scripts from the shipctl command tree whenever commands, flags, or subcommands change. Use when a new command or flag is added, when the help text changes, or when asked to "update the man pages" or "sync completions".
03 SKILL.md 正文
Manpage Sync
Regenerate man pages and shell completion scripts to match the current command tree.
Inputs
- Scope:
all(default),man, orcompletions - Output directory for man pages (defaults to
docs/man/) - Output directory for completions (defaults to
completions/)
Steps
-
Build the latest binary
cargo build --release # or: go build -o dist/shipctl ./cmd/shipctlMan page generation requires the actual binary to self-report its command tree.
-
Generate man pages
# Using help2man: help2man --no-discard-stderr ./target/release/shipctl \ -o docs/man/shipctl.1 \ --name "cross-platform deployment CLI" # For each subcommand: help2man --no-discard-stderr "./target/release/shipctl {subcommand}" \ -o "docs/man/shipctl-{subcommand}.1" \ --name "shipctl {subcommand}" # Alternatively, if the binary has built-in man generation: ./target/release/shipctl man --output-dir docs/man/ -
Generate shell completions
./target/release/shipctl completions bash > completions/shipctl.bash ./target/release/shipctl completions zsh > completions/_shipctl ./target/release/shipctl completions fish > completions/shipctl.fish ./target/release/shipctl completions powershell > completions/shipctl.ps1 -
Verify the output
- Run
man -l docs/man/shipctl.1and skim for obvious formatting errors - Spot-check that new flags appear in completions:
grep "{new-flag}" completions/shipctl.bash - Confirm no old flags that were removed still appear
- Run
-
Commit the generated files
git add docs/man/ completions/ git commit -m "docs(manpages): regenerate for $(./target/release/shipctl --version)" -
Update install instructions if a new section or man page was added Edit
docs/install.md→ the "Shell completions" and "Man pages" sections.
Conventions
- Man pages are committed to
docs/man/; they are generated, never hand-edited - Completion scripts are committed to
completions/; same rule - This skill is run in CI after any command-tree change (see
.github/workflows/docs.yml) - Section numbers:
shipctl(1),shipctl-release(1),shipctl-build(1), etc.
Edge Cases
help2mannot installed: Install viabrew install help2man(macOS) orapt-get install help2man(Linux); on CI it is pre-installed.- Subcommand man page is empty: The binary must output
--helptext on stderr forhelp2manto parse; add the--no-discard-stderrflag. - Completion file conflicts with a system package: Rename to
shipctl.bash-completionand instruct users to source it explicitly. - Binary not built yet: Run
cargo build --releasefirst; if the build fails, fix it before trying to regenerate.
04 同仓库更多 Skills
skillforge
Create or update a reusable agent skill. Use when you notice a repeated pattern, when a workflow should be persisted for future sessions, or when asked to forge/create/scaffold a new skill.
skillforge
Create or update a reusable agent skill. Use when you notice a repeated pattern, when a workflow should be persisted for future sessions, or when asked to forge/create/scaffold a new skill.
deploy-preview
Deploy a preview branch to the staging environment for review. Use when a feature branch is ready for visual review, when someone asks to "deploy this for review", or before opening a PR.
component-scaffold
Create a new React component with co-located test, story, and styles. Use when creating new UI components, when asked to scaffold/generate a component, or when building new pages.
bug-triage
Triage a bug report into an actionable GitHub issue with severity, reproduction steps, and assignment. Use when a bug is reported, when error logs need investigation, or when asked to file/triage an issue.
api-endpoint
Scaffold a REST API endpoint with route, controller, validation, and tests. Use when creating new API endpoints, adding resources, or when asked to build a new backend route.