agentleFS
EnigmaWUEnigmaWU/MyCodeAgentSkills/doc-with-usage-example/SKILL.md

doc-with-usage-example

Skill4 starsChanged 3 months agoMITView on GitHub

WHEN/WHERE/WHO: [Scheduling: Use when: the user asks to create or update documentation. Applies to: markdown documents, READMEs, guides, and runbooks] HOW: [Structural: Helps with: producing docs that always include 5W1H context and a copy-exec Usage Example] WHY: [Scheduling: Prevents ambiguous docs by requiring 5W1H context and a copy-exec Usage Example.]

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When this skill is activated, first load skill-common and apply the shared conventions it defines: canonical section order, frontmatter …

    line 13
  2. Distinctive:

    Transfer Check: Verify the workflow still works for READMEs, runbooks, and operational guides.

    line 51
  3. Distinctive:

    Stop Rule: If the environment, expected result, or command details are unclear, stop and ask before drafting the document.

    line 52
  4. Very specific:

    Always include a section titled exactly ## Usage Example.

    line 55
  5. Distinctive:

    Ensure examples are executable as written (no placeholder-only commands unless explicitly labeled).

    line 56
  6. Distinctive:

    Keep examples aligned with the documented environment and paths.

    line 57
  7. Distinctive:

    If details are missing or conflicting, do not guess.

    line 58
  8. Distinctive:

    If anything is unclear, missing, or conflicting, stop and ask the developer before proceeding.

    line 61
  9. Very specific:

    Add ## Usage Example with at least one copy-exec command block and brief expected result.

    line 66
  10. Distinctive:

    Do the 5W1H sections and the example agree on paths, commands, and behavior?

    line 76

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Document with Usage Example

Common Contract (Load First)

When this skill is activated, first load skill-common and apply the shared conventions it defines: canonical section order, frontmatter rules, anti-pattern guidance, and the Review In Mind loop in review-in-mind. This skill adds only domain-specific rules below.

Who

Developers, maintainers, and agents who create or revise technical documentation.

What

Produce documentation that is immediately actionable by always including a Usage Example section users can copy and execute, while organizing core context with the 5W1H structure.

When

  • The user asks to create, draft, or update documentation.
  • The document explains how to use a command, script, API, or workflow.
  • The user needs higher confidence through runnable examples.

Where

  • Markdown docs such as README.md, docs/*.md, and operational guides.
  • Chat responses when no target file path is provided.

Why

  • 5W1H keeps documentation complete and understandable.
  • A copy-exec Usage Example reduces ambiguity and speeds adoption.
  • Concrete examples increase confidence more than abstract instructions.

Inputs

  • Target document path or output destination.
  • Topic/workflow that the document must explain.
  • Required commands, parameters, and expected results.

Output (Logical Evidence)

A document section set that includes:

  • 5W1H coverage: Who, What, When, Where, Why, How.
  • A dedicated ## Usage Example section with copy-exec snippets.

Optimization Readiness

  • Failure Signals: The document lacks a usage example, examples are not executable, 5W1H coverage is incomplete, or the example drifts away from the documented environment.
  • Evidence To Collect: Draft docs, usage snippets, consistency checks, and examples showing how the copy-exec section improved comprehension or execution readiness.
  • Safe Mutation Boundaries: Refine 5W1H prompts, usage-example structure, and validation guidance without changing the core requirement to include an executable example.
  • Acceptance Criteria: Accept revisions only if the final document includes a clear Usage Example, keeps the narrative aligned with the example commands, and remains executable as written.
  • Rejected Revision Handling: Record non-executable examples, placeholder-only commands, and missing-5W1H drafts so they are not repeated.
  • Transfer Check: Verify the workflow still works for READMEs, runbooks, and operational guides.
  • Stop Rule: If the environment, expected result, or command details are unclear, stop and ask before drafting the document.

Constraints (Logical Boundaries)

  • Always include a section titled exactly ## Usage Example.
  • Ensure examples are executable as written (no placeholder-only commands unless explicitly labeled).
  • Keep examples aligned with the documented environment and paths.
  • If details are missing or conflicting, do not guess.

One More Thing

If anything is unclear, missing, or conflicting, stop and ask the developer before proceeding.

How (Structural Workflow)

  1. Gather the minimum context: audience, goal, environment, and expected outcome.
  2. Draft the document using 5W1H headings (Who/What/When/Where/Why/How).
  3. Add ## Usage Example with at least one copy-exec command block and brief expected result.
  4. Validate consistency between narrative steps and the example commands.
  5. Deliver to the requested file or return in chat.

Review In Mind (ReviewInMindGenie)

Execute the common review loop in review-in-mind before delivering.

Review lens for this skill:

  • Does the doc include a copy-executable Usage Example with expected results?
  • Do the 5W1H sections and the example agree on paths, commands, and behavior?
  • Would a new developer succeed by following only the doc?

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.