Agent skill

Doc Writer

by moq in moq/Moq.AutoMocker

Guidelines for producing accurate and maintainable documentation for Moq.AutoMocker.

MITAuto-check passedDevelopment

Install Doc Writer

skills CLI
$ npx skills add moq/Moq.AutoMocker --skill doc-writer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install moq/Moq.AutoMocker doc-writer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/moq/Moq.AutoMocker.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/doc-writer .claude/skills/doc-writer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
doc-writer
GitHub stars
429
Token cost
~2.7k tokens
SKILL.md length
779 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Guidelines for producing accurate and maintainable documentation for Moq.AutoMocker.

  • Works in 9 steps: Title and Introduction — H1 title, when… → Features — Bullet list of key capabilities → Usage — Basic usage with simple example,… → …
  • Updating API docs
  • SKILL.md covers Documentation Overview, Markdown Conventions, Source Generator Documentation and Code Example Standards, plus 4 more sections
  • Reaches nuget.org

What it does

Doc Writer is an agent skill from moq/Moq.AutoMocker. Guidelines for producing accurate and maintainable documentation for Moq.AutoMocker. Use when writing or updating API docs, source generator docs, tutorials, README content, or any documentation in the docs/ folder.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Technical documentation and Brand voice and tone. The repository describes itself as: An auto-mocking IoC container for Moq. The licence is MIT.

When your agent uses it

  • Updating API docs
  • Source generator docs
  • Any documentation in the docs/ folder

Example prompts

  • “Use the doc-writer skill to guideline for producing accurate and maintainable documentation for Moq.AutoMocker”
  • “/doc-writer”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Title and Introduction — H1 title, when it activates, what it generates, primary value
  2. Features — Bullet list of key capabilities
  3. Usage — Basic usage with simple example, then advanced scenarios
  4. Generated Extension Methods — Document the actual API generated with method signatures
  5. How It Works — Internal mechanism explanation and integration with AutoMocker
  6. Advanced Usage — Complex scenarios, type variations, working with dependencies
  7. Disabling the Generator — MSBuild property configuration with .csproj example
  8. Troubleshooting — Common issues with solutions
  9. Best Practices — Practical, actionable guidance with code examples

What it can do on your machine

Read from SKILL.md and the folder at commit 8f36ce3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown, csharp and xml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • nuget.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Doc Writer loads about 2.7k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 779 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from moq/Moq.AutoMocker at commit 8f36ce3, republished under its MIT licence (© moq). 779 words, ~2,734 tokens.

Download SKILL.mdSave it as .claude/skills/doc-writer/SKILL.md (or your agent's skills folder).
name
doc-writer
description
Guidelines for producing accurate and maintainable documentation for Moq.AutoMocker. Use when writing or updating API docs, source generator docs, tutorials, README content, or any documentation in the docs/ folder.

Documentation Writer Skill

This skill provides guidelines for AI coding agents to help maintainers produce accurate and easy-to-maintain documentation for the Moq.AutoMocker project. The docs/ folder contains the official documentation, and this skill helps ensure consistent, high-quality documentation.

Documentation Overview

Repository Structure

Location: docs/ Audience: .NET developers using Moq.AutoMocker for unit testing Format: Markdown files API Reference: Auto-generated from XML doc comments (do not edit manually)

Documentation Categories
docs/
├── Moq.AutoMock.md                      # Assembly overview (auto-generated)
├── PackageValidation.md                 # Package validation guide
├── SourceGenerators.md                  # Source generators overview
├── Moq.AutoMock/                        # API reference (auto-generated)
│   ├── AutoMocker.md
│   ├── AutoMocker/                      # AutoMocker member docs
│   ├── MockExtensions.md
│   ├── MockExtensions/
│   ├── ObjectGraphContext.md
│   └── ObjectGraphContext/
├── Moq.AutoMock.Resolvers/             # Resolver API reference (auto-generated)
│   ├── IMockResolver.md
│   ├── MockResolver.md
│   ├── LazyResolver.md
│   ├── EnumerableResolver.md
│   └── ...
└── SourceGenerators/                    # Hand-written generator docs
    ├── UnitTestGenerator.md
    ├── OptionsExtensionGenerator.md
    ├── FakeLoggingExtensionGenerator.md
    ├── ApplicationInsightsExtensionGenerator.md
    └── KeyedServicesExtensionGenerator.md
What NOT to Edit

Files in docs/Moq.AutoMock/ and docs/Moq.AutoMock.Resolvers/ are auto-generated from XML doc comments by xmldocmd. They contain the marker:

<!-- DO NOT EDIT: generated by xmldocmd for Moq.AutoMock.dll -->

Do not manually edit these files. Instead, update the XML doc comments in the source .cs files and regenerate.

Markdown Conventions

Frontmatter

Documentation files in this project do not use frontmatter. Start directly with an H1 heading.

Headings
  • Use H1 (#) for the page title only (one per file)
  • Use H2 (##) for major sections
  • Use H3 (###) for subsections
  • Do not skip heading levels
Code Blocks

Always include a language identifier:

markdown
```csharp
var mocker = new AutoMocker();
var service = mocker.CreateInstance<MyService>();
```

For XML/MSBuild configuration:

markdown
```xml
<PropertyGroup>
  <EnableMoqAutoMockerOptionsGenerator>false</EnableMoqAutoMockerOptionsGenerator>
</PropertyGroup>
```

For JSON configuration:

markdown
```json
{
  "ConnectionStrings": {
    "mydb": "Host=localhost;Database=mydb"
  }
}
```
Tables

Use standard Markdown tables with alignment:

markdown
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Value    | Value    | Value    |

Use relative links for internal documentation:

markdown
[AutoMocker API Reference](Moq.AutoMock/AutoMocker.md)
[Source Generators](SourceGenerators.md)
[Learn more →](SourceGenerators/UnitTestGenerator.md)

Source Generator Documentation

File Location

Place source generator docs in docs/SourceGenerators/:

GeneratorFile
Unit TestUnitTestGenerator.md
OptionsOptionsExtensionGenerator.md
Fake LoggingFakeLoggingExtensionGenerator.md
Application InsightsApplicationInsightsExtensionGenerator.md
Keyed ServicesKeyedServicesExtensionGenerator.md
Required Sections

All source generator documentation must include these sections in order:

  1. Title and Introduction — H1 title, when it activates, what it generates, primary value
  2. Features — Bullet list of key capabilities
  3. Usage — Basic usage with simple example, then advanced scenarios
  4. Generated Extension Methods — Document the actual API generated with method signatures
  5. How It Works — Internal mechanism explanation and integration with AutoMocker
  6. Advanced Usage — Complex scenarios, type variations, working with dependencies
  7. Disabling the Generator — MSBuild property configuration with .csproj example
  8. Troubleshooting — Common issues with solutions
  9. Best Practices — Practical, actionable guidance with code examples
Introduction Template
markdown
# [Name] Extension Generator

When your test project references `[Package.Name]`, this generator creates
`[MethodName]()` extension method(s) for `AutoMocker` that [primary benefit].
Features Template
markdown
## Features

- Automatically generates when `[Package.Name]` is referenced
- [Key capability 1]
- [Key capability 2]
- [Integration benefit]
Disabling Generator Template

All extension generators follow this MSBuild property pattern:

xml
<PropertyGroup>
  <EnableMoqAutoMocker[GeneratorName]Generator>false</EnableMoqAutoMocker[GeneratorName]Generator>
</PropertyGroup>

Known properties:

  • EnableMoqAutoMockerOptionsGenerator
  • EnableMoqAutoMockerFakeLoggingGenerator
  • EnableMoqAutoMockerApplicationInsightsGenerator
  • EnableMoqAutoMockerKeyedServicesGenerator
Troubleshooting Template
markdown
## Troubleshooting

### Extension Method Not Available

1. Verify `[Required.Package]` is referenced in your test project
2. Check that the generator is not disabled in your `.csproj`
3. Rebuild the project to trigger generator execution
Updating the Overview

After creating or updating generator documentation, update docs/SourceGenerators.md:

  1. Update generator count in introduction if needed
  2. Add/update numbered section with:
    • Link to detailed docs
    • One-sentence description
    • Key Features (3-4 bullets)
    • Quick Example (5-10 lines)
    • "Learn more →" link

Code Example Standards

Use MSTest by Default
csharp
[TestClass]
public class MyServiceTests
{
    [TestMethod]
    public void Test_DescriptiveScenario()
    {
        // Arrange
        AutoMocker mocker = new();
        
        // Act
        var service = mocker.CreateInstance<MyService>();

        // Assert
        Assert.AreEqual(expected, actual);
    }
}
Code Style Requirements
  • Use modern C# syntax (target-typed new, var)
  • Keep examples under 30 lines
  • Use realistic domain names (EmailSender, NotificationService, etc.)
  • Include using statements when relevant
  • Add comments only for non-obvious behavior
  • Use // Arrange, // Act, // Assert comments in test examples
  • Show both basic and advanced usage patterns
Framework-Specific Examples

When showing framework-specific content, use tables or separate code blocks:

FrameworkDetectionAttributes Used
MSTestReferences Microsoft.VisualStudio.TestTools.UnitTesting[TestMethod]
xUnitReferences xunit.core[Fact]
NUnitReferences nunit.framework[Test]
TUnitReferences TUnit.Core[Test] (async)

Writing Style Guidelines

Show full SKILL.md (318 more words)Show less
Voice and Tone
  • Use second person ("you") when addressing the reader
  • Use active voice ("Create a mock" not "A mock is created")
  • Use imperative mood for instructions ("Add the attribute" not "You should add the attribute")
  • Be concise but complete
  • Be professional but approachable
Terminology

Use consistent terminology throughout:

PreferredAvoid
AutoMockerauto mocker, Auto Mocker
mockfake, stub (unless technically accurate)
source generatorcode generator, analyzer
extension methodhelper method (for generated methods)
CreateInstance<T>()create instance, build (when referring to the method)
GetMock<T>()get mock (when referring to the method)
Formatting Conventions
  • Use bold for UI elements and important terms on first use
  • Use backticks for code references inline: types, methods, properties, parameters
  • Use "→" for "learn more" navigation links
  • Use ✅ and ❌ for correct/incorrect examples
  • Spell out numbers under 10, use digits for 10+

Project-Specific Context

  • Package: All source generators ship in the Moq.AutoMock NuGet package (not separate packages)
  • Namespace: Generated code is in the Moq.AutoMock namespace
  • Target: Extension methods extend the AutoMocker class
  • Frameworks: Supports MSTest, xUnit, NUnit, and TUnit
  • Default State: All generators are enabled by default
  • Activation: Most generators activate when specific NuGet packages are referenced
  • Target Frameworks: netstandard2.0 and netstandard2.1

Updating the README

The project README.md at the repository root contains:

  • Badge links (CI, NuGet)
  • Quick-start usage examples
  • Links to the docs/ folder

When making significant documentation changes, ensure the README links and descriptions remain accurate. Keep README examples minimal — point readers to docs/ for details.

Common Patterns

Diagnostic Error Documentation
markdown
### AMG0001: Test class must be partial

**Error:** When using `[ConstructorTests]`, your test class must be declared as `partial`.

```csharp
// ❌ Error
[ConstructorTests(TargetType = typeof(MyClass))]
public class MyClassTests { }

// ✅ Correct
[ConstructorTests(TargetType = typeof(MyClass))]
public partial class MyClassTests { }

### Feature with Before/After Examples

Show the problem, then the solution:

```markdown
**Without** the generator, you'd write this manually:

```csharp
// 20+ lines of boilerplate...

With the generator, just add one attribute:

csharp
[ConstructorTests(TargetType = typeof(MyService))]
public partial class MyServiceTests { }

### Cross-Referencing

End pages with a "See also" section linking to:
- Related generator documentation
- AutoMocker API reference
- NuGet package page
- GitHub repository

```markdown
## See Also

- [AutoMocker API Reference](../Moq.AutoMock/AutoMocker.md)
- [Source Generators Overview](../SourceGenerators.md)
- [Moq.AutoMock on NuGet](https://www.nuget.org/packages/Moq.AutoMock)

Testing Documentation

Before submitting documentation:

  1. Verify links: Ensure all internal links resolve to existing files
  2. Validate code: Confirm all code examples compile and are consistent with current API
  3. Check structure: Verify required sections are present and in order
  4. Review formatting: Ensure Markdown renders correctly
  5. Analyze source: Cross-reference generator docs against the actual source code in Moq.AutoMocker.Generators/ and test examples in GeneratorTests/

© moq, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/doc-writer of moq/Moq.AutoMocker.

Open the folder on GitHubat commit 8f36ce3

Compare with similar skills

Doc Writer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Doc Writer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Doc Writer this skillmoq/Moq.AutoMocker429—~2.7kAutomated safety check: PassMIT
Writing Styletimmo001/system-bridge356—~3.3kAutomated safety check: PassApache-2.0
Writing Stylepydantic/monty8.6k—~3.2kAutomated safety check: PassMIT
Agent Stylepchalasani/claude-code-tools2k—~1.4kAutomated safety check: PassMIT
Writing Guidelinesrohitg00/pro-workflow2.9k—~593Automated safety check: PassNone
Writing Styleumputun/cc-thingz484—~1.3kAutomated safety check: PassMIT

Similar skills

  • Writing Style

    timmo001/system-bridge

    Write commit messages, PR and issue text and comments, docs (README), code comments, and user-facing strings (notifications, UI labels, toasts, error messages) in the project owner's voice: concise…

    356 GitHub stars~3.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Writing Style

    pydantic/monty

    Official

    How to write prose that reads like human technical documentation rather than LLM output.

    8.6k GitHub stars~3.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Agent Style

    pchalasani/claude-code-tools

    Literature-backed English technical-prose writing rules (agent-style, 21 rules).

    2k GitHub stars~1.4k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Writing Guidelines

    rohitg00/pro-workflow

    Apply clear-writing standards to any prose the agent produces - READMEs, docs, UI copy, error messages, commit and PR text, release notes.

    2.9k GitHub stars~593 tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Writing Style

    umputun/cc-thingz

    A skill your agent uses for technical communication - GitHub/GitLab tickets, PR/MR descriptions, issue comments, code review comments, commit messages.

    484 GitHub stars~1.3k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Documentation Patterns

    yonatangross/orchestkit

    Technical documentation patterns for READMEs, ADRs, API docs (OpenAPI 3.1), changelogs, and writing style guides.

    289 GitHub stars~830 tokensUpdated yesterday
    DevelopmentAuto-check passed

Categories

Questions about Doc Writer

What does Doc Writer do?

Guidelines for producing accurate and maintainable documentation for Moq.AutoMocker. AutoMocker.AutoMocker.

When should I use Doc Writer?

Doc Writer fits situations like: updating API docs; source generator docs; any documentation in the docs/ folder.

How do I install Doc Writer in Claude Code?

Run `npx skills add moq/Moq.AutoMocker --skill doc-writer -a claude-code`. Or copy the skill folder (.github/skills/doc-writer in moq/Moq.AutoMocker) into .claude/skills/doc-writer in your project. Claude Code loads it when a task matches its description.

How do I install Doc Writer in Codex?

Run `npx skills add moq/Moq.AutoMocker --skill doc-writer -a codex`. Or copy the skill folder (.github/skills/doc-writer in moq/Moq.AutoMocker) into .agents/skills/doc-writer in your project. Codex loads it when a task matches its description.

Can I use Doc Writer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add moq/Moq.AutoMocker --skill doc-writer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/doc-writer, .gemini/skills/doc-writer, .github/skills/doc-writer and .opencode/skills/doc-writer in your project.

What does Doc Writer need to run?

SKILL.md names no scripts, command-line tools or credentials: Doc Writer is instructions for the agent only.

Does Doc Writer access the network?

SKILL.md names 1 domain. In commands or code: nuget.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Doc Writer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Doc Writer use?

Doc Writer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Doc Writer use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Doc Writer?

Skills that share tags, products or a category with Doc Writer: Writing Style (timmo001/system-bridge, 356 stars), Writing Style (pydantic/monty, 8.6k stars), Agent Style (pchalasani/claude-code-tools, 2k stars) and Writing Guidelines (rohitg00/pro-workflow, 2.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Doc Writer?

moq (a GitHub organization) maintains it in moq/Moq.AutoMocker, which has 429 GitHub stars. The repository was last updated on October 5, 2026.

Source: moq/Moq.AutoMocker on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.