elixir-writing-docs
Guides writing Elixir documentation with @moduledoc, @doc, @typedoc, doctests, cross-references, and metadata. Use when adding or improving documentation in .ex files.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/anderskev/elixir-writing-docsWhat This Skill Does
The elixir-writing-docs skill serves as an expert technical writing assistant specifically tailored for the Elixir programming language. It leverages the official ExDoc standards to ensure your module, function, and type documentation is consistent, discoverable, and readable. The skill provides architectural guidance on crafting effective @moduledoc, @doc, and @typedoc blocks, emphasizing the 'First-Line Summary Rule' to ensure documentation looks professional when rendered in ExDoc. It helps developers move beyond generic descriptions, guiding them to include essential sections like Examples, Configuration, and Behaviour callbacks while enforcing the use of proper Markdown syntax for cross-references and admonitions.
Installation
You can install this skill by running the following command in your terminal within the OpenClaw environment:
clawhub install openclaw/skills/skills/anderskev/elixir-writing-docs
Use Cases
- Standardizing Documentation: Ensure all team members adhere to the same style guide for module documentation.
- Refactoring Legacy Code: Quickly generate high-quality docstrings for undocumented functions or modules.
- Writing Doctests: Convert ad-hoc examples into valid, testable
iex>snippets that verify code functionality while documenting it. - Onboarding: Help new developers understand how to document configuration requirements and behaviour expectations in Elixir projects.
Example Prompts
- "Look at this module in
lib/payment_processor.exand improve the@moduledocfollowing the First-Line Summary Rule and adding an Examples section." - "I am defining a new behaviour for API clients. Can you suggest a template for the
@moduledocthat includes a section for callbacks?" - "Review my
@docblock forprocess_transaction/2. The current summary is too vague; rewrite it to be concise and indicate the return types."
Tips & Limitations
- Conciseness is Key: Always prioritize the first-line summary. If you find your summary spanning three lines, you are likely missing the core purpose of the unit.
- Doctest Limitations: While the skill provides templates, remember that doctests require the code to be compiled and accessible in the shell environment. Ensure your
mix.exsdependencies are available. - Formatting: Stick to standard Markdown headings. Avoid using
#(H1) for section headers inside@moduledocas ExDoc reserves this for the module name itself; use##(H2) instead. - Consistency: If you have multiple modules in the same project, use this skill to establish a common layout for configuration and error return types.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-anderskev-elixir-writing-docs": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Related Skills
tutorial-docs
Tutorial patterns for documentation - learning-oriented guides that teach through guided doing
fetch-pr-feedback
Fetch review comments from a PR and evaluate with receive-feedback skill
swift-testing-code-review
Reviews Swift Testing code for proper use of
rust-testing-code-review
Reviews Rust test code for unit test patterns, integration test structure, async testing, mocking approaches, and property-based testing. Covers Rust 2024 edition changes including async fn in traits for mocks,
explanation-docs
Explanation documentation patterns for understanding-oriented content - conceptual guides that explain why things work the way they do