How Humanizer Detects and Rewrites Passive Voice in Your Writing
Humanizer identifies passive-voice constructions using a regex pattern defined in SKILL.md and automatically transforms them into active voice by rearranging the subject, verb, and agent components.
The blader/humanizer repository provides an AI-powered writing assistant that specifically targets passive voice to improve clarity and concision. According to the source code, this tool implements a dedicated language-editing skill that recognizes passive constructions through pattern matching and suggests active-voice alternatives. This capability is fully integrated into the agent plugin system, allowing seamless access through structured natural language prompts.
Detection Pattern in SKILL.md
The core detection logic resides in SKILL.md, which defines a regular expression that matches typical passive-voice syntax. The pattern identifies constructions containing auxiliary verbs (was, were, is, are, been) followed by a past participle and an optional agent phrase introduced by "by".
When processing text, Humanizer scans for these grammatical markers to flag sentences where the subject receives the action rather than performing it. This regex-based approach enables precise identification without requiring heavy natural language processing pipelines, making the detection both fast and deterministic.
The Three-Step Transformation Workflow
Once Humanizer detects a passive construction, it executes a structured transformation process:
-
Pattern Matching – The system applies the regex from
SKILL.mdto locate auxiliary verbs and past participles within the sentence structure. -
Component Extraction – Humanizer parses the sentence to extract three critical elements: the original subject (the recipient), the verb phrase (including the auxiliary and past participle), and the agent phrase (the actor performing the action).
-
Sentence Restructuring – The tool rearranges these components to place the agent as the new subject, converts the verb to active form, and positions the original subject as the direct object, producing a clear, active-voice sentence.
Implementation Files and Architecture
The passive-voice functionality is distributed across three key files in the repository:
-
SKILL.md– Contains the complete pattern definition, including the specific regex logic and transformation rules for converting passive to active voice. -
.claude-plugin/plugin.json– Registers the skill within the agent ecosystem, enabling the system to recognize commands related to passive voice removal and active voice rewriting. -
README.md– Provides high-level documentation describing the editing capabilities, including explanations of how the passive-voice rewrite feature improves readability and engagement.
Practical Usage Examples
The following examples demonstrate how to invoke the passive-voice rewrite functionality through the Humanizer skill interface. These interactions assume the skill is installed in a compatible agent environment.
Basic Rewrite Request:
user: |
Please rewrite this sentence in active voice:
"The report was prepared by the analyst."
assistant: |
The analyst prepared the report.
Paragraph Improvement:
user: |
Can you improve this paragraph?
"The data was collected by the team, and the results were analyzed."
assistant: |
The team collected the data, and they analyzed the results.
Explanation Mode:
user: |
Explain why this sentence is passive and make it active:
"The novel was written by the author."
assistant: |
The sentence is passive because the subject ("The novel") receives the action rather than performing it.
Active rewrite: "The author wrote the novel."
Summary
- Humanizer detects passive voice using a regex pattern in
SKILL.mdthat targets auxiliary verbs (was,were,is,are,been) combined with past participles and agent phrases. - The transformation engine extracts the subject, verb, and agent, then rearranges them to create active-voice sentences that are more concise and engaging.
- The skill is registered in
.claude-plugin/plugin.jsonand documented inREADME.md, making it accessible to compatible AI agents. - Users can trigger rewrites through natural language prompts, receiving either direct transformations or explanatory feedback about the grammatical changes.
Frequently Asked Questions
What regex pattern does Humanizer use to detect passive voice?
Humanizer uses a pattern defined in SKILL.md that matches the auxiliary verbs was, were, is, are, or been when followed by a past participle and optionally the word "by" introducing the agent. This regex identifies the structural markers of passive construction without requiring complex syntactic parsing.
How does Humanizer restructure passive sentences into active voice?
The system extracts three components from the passive sentence: the agent (actor), the verb phrase, and the original subject (recipient). It then rearranges these elements to place the agent first as the new subject, converts the verb to active form, and positions the original subject as the object, effectively reversing the sentence structure to emphasize who is performing the action.
Where is the passive voice skill registered in the codebase?
The skill registration occurs in .claude-plugin/plugin.json, which configures the agent to recognize commands related to passive voice detection and active voice rewriting. This file ensures the Humanizer skill is properly exposed to the agent framework, allowing users to invoke the functionality through natural language requests.
Can Humanizer explain why a sentence is passive?
Yes, when requested, Humanizer can provide explanatory mode responses that identify which component of the sentence receives the action rather than performing it. The system clarifies that passive voice obscures the actor by making the object of the action the grammatical subject, then demonstrates the active rewrite to show clearer attribution of the action.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →