Corelight Recognized as a Leader in the 2025 Gartner® Magic Quadrant™ for Network Detection and Response
Corelight Recognized as a Leader in the 2025 Gartner® Magic Quadrant™ for Network Detection and Response
START HERE
WHY CORELIGHT
SOLUTIONS
CORELIGHT LABS
Detect and disrupt evasive threats with high-fidelity, multi-layered detection.
SERVICES
ALLIANCES
USE CASES
Detect advanced attacks with Corelight
Corelight announces cloud enrichment for AWS, GCP, and Azure
Corelight's partner program
10 Considerations for Implementing an XDR Strategy
2025 Gartner® Magic Quadrant™ for NDR
September 16, 2025 by Keith J. Jones
How AI can transform even Microsoft's own documentation to meet its style standards.
As a security researcher at Corelight, I produce a significant amount of technical documentation. Much of this documentation ends up in GitHub repositories or gets deployed to our Corelight sensors, where consistency and clarity are crucial. Writing technical documentation that meets style guide standards can be incredibly time-consuming, especially when you're juggling multiple projects and deadlines.
That's why I developed the llm-styleguide-helper tool—to speed up the time it takes me to write technical documentation that meets professional standards. After seeing how much time it saved me, I wanted to share it as open source so that others can also accelerate their documentation efforts.
Style guides are essential for maintaining consistency in technical documentation; however, manually applying them can be time-consuming and prone to errors. What if you could automate this process using AI? That's exactly what the llm-styleguide-helper tool does - it combines the power of Vale linting with AI to automatically fix style guide violations.
The tool operates through a sophisticated pipeline that scans documents for style violations and generates AI prompts to fix them. You can then manually copy these prompts to your favorite large language model (LLM), or use the --gemini flag to automatically process the corrections through Google’s Gemini CLI. Gemini was chosen for the automatic mode because it is the only online LLM I am aware of that does not require an API key, which can be costly and has no bounds, plus I already use Gemini for other work at Corelight. The methodology introduced here can be adapted to any organization's style guide or writing standards, making it a versatile solution for technical documentation teams.
The llm-styleguide-helper is part of the LLM-Ninja collection of AI-powered tools for document processing and LLM integration. More about LLM-Ninja and other LLM tricks can be found in some of the prior blogs I wrote:
Traditional style guide compliance involves:
This process is not only tedious but also prone to human error and inconsistency. Even Microsoft's own documentation (example below) isn't immune to style guide violations.
The llm-styleguide-helper is a Python script that revolutionizes this process by:
The tool offers two distinct workflows. I will discuss the manual mode first, which can be used with any LLM, followed by an automatic mode that utilizes Gemini to automatically correct the style of your input text.
The tool generates detailed prompts that you can copy and paste into ChatGPT, Claude, or any other LLM of your choice. This gives you full control over the AI model, allowing you to review changes before applying them.
When you run the tool in manual mode, it creates .prompt files next to each of your original documents. These prompt files contain:
For example, if you have a file called README.md, the tool will create README.md.prompt. You can then:
This approach provides you with complete control over which AI model to use, allowing you to review and edit changes before applying them.
The beauty of manual mode is that you can iteratively refine your documents until you're satisfied with the results. Here's how:
This manual iteration process gives you complete control over the refinement cycle. You can decide when to stop based on your quality requirements, and you can even manually edit the LLM's suggestions before applying them.
Use the --gemini flag to automatically process your documents through Google's Gemini CLI. This provides a fully automated workflow that handles the entire process from detection to final correction.
When you use the --gemini flag, the tool:
This creates a fully automated iterative refinement process that continues until your document meets the style guide standards. The tool intelligently stops when it detects no further improvements for 3 consecutive iterations, preventing infinite loops.
The tool is specifically designed to work with Microsoft's open-sourced style guide. Microsoft's style guide is comprehensive and well-maintained, making it an excellent choice for technical documentation. The tool leverages Microsoft's extensive vocabulary definitions and style rules to provide accurate and consistent corrections.
Let's examine how this tool can enhance even Microsoft's official documentation. Using their own SECURITY.md file as an example:
Running Vale on Microsoft's SECURITY.md reveals 26 style violations:
Here's what Vale's output looks like:
The output shows multiple types of issues:
With the llm-styleguide-helper, we can automatically fix these issues:
The tool processes the file through 4 iterations:
The AI automatically transformed the content:
Here's the full wdiff comparison showing every change made by the AI:
This comprehensive diff shows how the AI systematically addressed every style violation, from removing first-person pronouns to standardizing terminology and improving clarity.
The beauty of this approach is its versatility. This methodology can be applied to any type of content that needs style guide compliance:
Many open source projects have inconsistent documentation. The tool can:
Technical documentation often suffers from:
The AI can automatically:
Content creators can use this tool to:
Research and technical writing can benefit from:
The tool operates through a sophisticated pipeline:
The tool requires:
Basic setup:
Important: If you plan to use the automatic Gemini processing (with the --gemini flag), you'll need to install and configure Gemini CLI:
This will prompt you to sign in with your Google account and grant permissions for Gemini.
You'll need to create a .vale.ini configuration file in your project root. This file tells Vale to use the Microsoft style guide and how to process your files:
After creating this file, run vale sync to download the required style files.
Note: The BlockIgnores line tells Vale to ignore any ... tags that LLMs might add to their output, so we don't style the AI's thinking process.
Note: Vale’s alert levels are “suggestion”, “warning”, and “error”, in increasing severity. If you only wish to see warnings and errors, you can change the “MinAlertLevel” to “warning”. If you only want to see errors, change “MinAlertLevel” to “error”
The script offers several command-line options to customize its behavior:
Basic usage (manual mode):
Automatic processing with a specific model:
Using a custom Vale configuration:
The llm-styleguide-helper demonstrates how AI can transform the tedious task of style guide compliance into an automated, efficient process. By combining the precision of linting tools with the intelligence of large language models, we can achieve consistent, professional-quality documentation at scale.
Whether you're maintaining open source documentation, creating user guides, or writing technical content, this tool can help ensure your content meets Microsoft's high standards of style and consistency. The fact that it can improve even Microsoft's own documentation speaks to its effectiveness and potential impact.
As we move toward more automated content creation and editing workflows, tools like this will become essential for maintaining quality and consistency across all types of written content that follow Microsoft's style guide.
Tagged With: Corelight, Network Security Monitoring, NDR, microsoft, featured, AI, large language model, llm