with one click
add-command
Use when adding or changing a zlp CLI command
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Use when adding or changing a zlp CLI command
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | add-command |
| description | Use when adding or changing a zlp CLI command |
Use this when adding a new zlp subcommand or changing an existing command's behavior.
Before editing, identify:
If the command can work offline, add it to NO_CLIENT_COMMANDS.
Add or update tests under tests/.
Preferred patterns:
TemporaryDirectory for archive and run rootsunittest.mock for Zulip client behaviorsys.argv rather than shelling out unless testing process-level behaviorWatch the relevant test fail before implementation.
In src/zlp/cli.py:
main()cmd_<command_name>()check(), read_body(), narrow_for(), and format/archive functionsAvoid broad refactors while adding a command.
Update:
README.md command table and examples when user-facing behavior changesMakefile only for common ergonomic workflows, not every CLI flag combinationRun:
make check
For packaging, release, or entry-point changes, also run:
make build
Report any failures with the exact command that failed.
| Mistake | Fix |
|---|---|
Command accidentally requires zuliprc | Add client-free commands to NO_CLIENT_COMMANDS |
| Tests use real Zulip credentials | Mock the client and use temp dirs |
| Output is hard to parse | Prefer stable Markdown, JSON, or TSV |
| README omitted | Update the command table and examples |
| Archive paths are hardcoded | Use args.archive_root and helpers |