AGENT SKILL

devex-cli-and-errors

Use when designing or reviewing a command-line interface or the errors any developer tool prints: stdout versus stderr, exit codes, --help with examples, --json and --plain output, NO_COLOR, --no-input, --dry-run, --force, config precedence, flag naming, telemetry and DO_NOT_TRACK, typo suggestions, shell completion, stable error codes with --explain, error severity levels, or keeping CLI, API and UI errors in one shape. Triggers on CLI design, command line guidelines, clig, error message design, Rust diagnostics, exit codes, machine-readable output. Companion to the other developer-experience skills.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 5
Forks
3

01 前言 Front Matter

name
devex-cli-and-errors
description
Use when designing or reviewing a command-line interface or the errors any developer tool prints: stdout versus stderr, exit codes, --help with examples, --json and --plain output, NO_COLOR, --no-input, --dry-run, --force, config precedence, flag naming, telemetry and DO_NOT_TRACK, typo suggestions, shell completion, stable error codes with --explain, error severity levels, or keeping CLI, API and UI errors in one shape. Triggers on CLI design, command line guidelines, clig, error message design, Rust diagnostics, exit codes, machine-readable output. Companion to the other developer-experience skills.

03 SKILL.md 正文

Developer Experience: Command-Line Interfaces and Error Messages

Part 2 of 9 of the Developer Experience Blueprint (plugin developer-experience), covering: CLI; Error messages. Sibling skills: devex-principles-and-feedback-loops, devex-api-sdk-and-docs, devex-interfaces-onboarding-and-agents, devex-surface-placement, devex-editor-and-desktop-surfaces, devex-mobile-and-web-surfaces, devex-non-developers-and-visual-design, devex-reference. A reference into a sibling is written Section name → skill.

Currency: the blueprint is dated Oct 23, 2026; its evidence base and the AI-tooling claims age fastest, so re-check those first.

Evidence grades used throughout: A = peer-reviewed or large study, B = credible practitioner or single study, C = vendor or opinion. Thin evidence is flagged where it occurs, and collected under Where the evidence is weak or conflicting in devex-reference.

CLI

The spec below follows the Command Line Interface Guidelines (read through a condensed copy, since clig.dev itself could not be fetched).

Area Rule
Output streams Primary data to stdout; messages, progress and errors to stderr
Exit codes 0 on success, non-zero on failure; use distinct codes for usage errors, not-found and transient failures, and document them
Help -h/--help on every command; lead with examples; show the most common flags first; suggest the next command
Color and TTY Color and spinners only on a TTY; honor NO_COLOR and a --no-color flag
Machine output --json for stable structured output; --plain for line-oriented text; never change field names without a version bump
Interactivity Prompt only on a TTY; --no-input disables all prompts; never require a prompt for something a flag can supply
Safety --dry-run for destructive or remote actions; confirm dangerous operations; --force skips confirmation
Config precedence Flags, then environment variables, then project config, then user config, then defaults; print the effective value on request
Speed Respond within about 100 ms; print something before slow work begins; show progress for anything longer
Naming Verb-noun or noun-verb, picked once and applied everywhere; no ambiguous abbreviations; short flags only for the most common options
Compatibility Additive changes only inside a major version; warn before removing anything
Telemetry Opt-in, documented, disclosed on first run, and off when DO_NOT_TRACK is set

Typo and discovery help. Suggest the closest command for a misspelling, offer shell completion for bash, zsh and fish, and ship a man page or help topic for each concept.

Agent-friendly extras. JSON output, semantic exit codes, no required prompts and self-describing commands make a CLI easy for AI agents to drive. This pattern is supported by weak, practitioner-only evidence, but it costs little and also helps scripts.

Error messages

An error is the most-read text in your product: eye-tracking work finds developers spend roughly 13–25% of task time reading errors, and a study of compiler messages found many unhelpful. The Rust compiler is the best-documented model (diagnostics guide).

  1. Say what failed, in the user's terms, in one line, before any detail.
  2. Point at the exact place (file, line, column, or the offending flag or field) and show the code or input.
  3. Say why when the cause is not obvious.
  4. Give the fix, as a command or a code change; mark suggestions as safe to auto-apply or as needing review, as Rust's suggestion applicability levels do.
  5. Give a stable code (for example E0382) that links to a longer explanation, and support --explain <code>.
  6. Separate severity levels (error, warning, note, help) and keep warnings rare enough that people read them.
  7. Never lead with a stack trace. Put it behind a flag and write the location of the log file in the message.
  8. Keep the same shape for CLI, API and UI errors so that people learn it once.

For API errors add a machine-readable type, a human message, a request_id for support and a docs link. An elm-style friendly tone helps, but clarity matters more than personality.

One study found that adding LLM-generated explanations to errors did not help; fix the message itself before adding a layer on top of it.

04 同仓库更多 Skills

the-vibey-project
the-vibey-project/vibey

white-paper-writing

Use when writing white papers, technical reports, policy documents, thought leadership pieces, or any long-form authoritative document. Triggers on requests to write, structure, outline, or review white papers, technical reports, position papers, policy briefs, or evidence-driven arguments. Also use for B2B content marketing strategy, technical documentation requiring authority, academic-style reports, or any document that must educate while persuading. Use when someone asks "how should I structure this" for a long-form document.

★ 5
the-vibey-project
the-vibey-project/vibey

prose-technical-mechanics

Use when editing or writing prose at a technical/mechanical level: choosing between Anglo-Saxon and Latinate diction, placing information in topic vs stress positions, writing periodic vs cumulative sentences, handling sentence rhythm, punctuation as logic, transitions, paragraph structure, or phonesthetics. Use when someone wants to understand WHY prose works or doesn't, not just surface-level style advice. Triggers on word choice, sentence structure, emphasis, rhythm, diction, or any deep writing mechanics question.

★ 5
the-vibey-project
the-vibey-project/vibey

prose-mechanics

Use when writing, editing, or analyzing prose style; when trying to avoid generic AI-sounding writing; when applying specific prose styles such as journalistic, academic, narrative, KJV biblical, Hemingway plain, Latinate/Jamesian, Orwellian, Augustan, Victorian, Early Modern (Bacon, Browne, Milton), or free indirect discourse; or when coaching someone on writing voice and mechanics. Triggers on any request to improve, analyze, or write in a specific prose style, to fix "AI-sounding" writing, to make prose more vivid or concrete, to vary sentence rhythm, or to understand how a particular writer achieves their effects.

★ 5
the-vibey-project
the-vibey-project/vibey

narrative-structure

Use when structuring stories, pitches, presentations, white papers, or any persuasive narrative; analyzing the hero's journey in fiction or non-fiction; applying StoryBrand for business communication; designing narrative arcs for thought leadership; or understanding Vogler, Snyder, Propp, or Campbell frameworks. Triggers on any narrative structure, storytelling, pitch structure, StoryBrand, hero's journey, three-act structure, Freytag, Save the Cat, narrative arc, or "how should I structure this story/pitch/presentation" request.

★ 5
the-vibey-project
the-vibey-project/vibey

legal-brief-writing

Use when writing legal briefs, motions, or any court filing; when analyzing judicial cognition and persuasion; when applying elite brief-writing techniques from Roberts, Clement, Kagan, Garner; or when structuring legal arguments for maximum persuasion. Also use for autistic/neurodivergent advocates who need to understand how their natural communication style maps to elite legal advocacy. Triggers on any legal writing, brief drafting, motion preparation, or legal argument structuring request.

★ 5
the-vibey-project
the-vibey-project/vibey

journal-publishability-criteria

Use whenever a research paper, article or preprint is being written, revised, reviewed or published, and specifically before every publication of docs/paper.md. Covers what legitimate journals actually gate on, in order of gating — the editor's desk screen (scope, novelty, package problems), what reviewers judge (methodological soundness, claims the evidence can carry, statistical and qualitative reporting), EQUATOR reporting guidelines, the ICMJE authorship criteria, COPE's view of text recycling, the near-universal generative-AI policy (no AI author, disclosure, author responsibility), TOP 2025 transparency standards, how to verify a journal is legitimate, submitting without an institution, and a pre-submission checklist. Triggers on requests to evaluate, review, prepare or submit a paper, to judge publishability, to write a declarations or data-availability section, to disclose AI use, or to check a journal.

★ 5