/install dgent
dgent — de-agent your code
Clean AI tells from code and commit messages. Runs as git hooks automatically, or on-demand via CLI.
When to use
- Before committing code written by an AI agent
- When asked to "clean up" or "de-agent" output
- To check if code has AI naming patterns, catch-rethrow, section headers, or noise comments
- To check if a commit message has AI vocabulary, emoji, or trailers
Quick check a file
dgent run --json \x3Cfile>
Returns JSON with clean, fixes[], flags[], and output (cleaned content). Exit codes: 0 = clean or fixes applied, 1 = flags found.
Quick check — exit code only
dgent run --check \x3Cfile>
Silent. Exit 0 if clean or fixes applied, 1 if flags found. Use in pre-commit scripts.
Scan entire directory
dgent scan --json [dir]
Returns JSON with per-file results. Use before committing multi-file changes.
Fix a file in place
dgent run --fix \x3Cfile>
Applies all deterministic fix rules (strip trailers, emoji, section headers) and writes back.
Check a commit message
echo "your message" | dgent run --json --commit-msg -
Stdin with short non-code input auto-detects as commit-msg. Returns fixes (emoji, trailers) and flags (AI vocabulary).
Get the full rule catalog
dgent rules --json
Returns every rule with name, phase, type, enabled status, and complete pattern lists. Use this to know exactly what to avoid.
Patterns to avoid
These trigger flags (from dgent rules --json):
Commit message words: enhance, streamline, comprehensive, utilize, leverage, facilitate, robust, optimize
Commit message phrases: "this commit", "this change", "in order to", "aims to", "is designed to"
Naming suffixes: Manager, Handler, Processor, Service, Factory, Builder, Validator, Controller, Orchestrator, Coordinator
Identifier length: over 40 characters
Catch-rethrow: catch (e) { console.error(e); throw e; } — either handle the error or let it propagate
Suppress a specific flag
// dgent-ignore flag-naming
class DataProcessor { ... } // not flagged
Supports // dgent-ignore, // dgent-ignore-next-line, // dgent-ignore \x3Crule1> \x3Crule2>.
Workflow for agents
- Write code
- Run
dgent run --json \x3Cfile>on each modified file - Fix any flags (rename identifiers, remove catch-rethrow, etc.)
- Run
echo "commit message" | dgent run --json --commit-msg -on the message - Fix any message flags (remove AI vocabulary, rephrase)
- Commit — dgent hooks will clean trailers and emoji automatically
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install dgent - After installation, invoke the skill by name or use
/dgent - Provide required inputs per the skill's parameter spec and get structured output
What is dgent?
De-agent your code. Run dgent to check files and commit messages for AI tells before committing — flags naming patterns, catch-rethrow, AI vocabulary, emoji,... It is an AI Agent Skill for Claude Code / OpenClaw, with 98 downloads so far.
How do I install dgent?
Run "/install dgent" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is dgent free?
Yes, dgent is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does dgent support?
dgent is cross-platform and runs anywhere OpenClaw / Claude Code is available (darwin, linux).
Who created dgent?
It is built and maintained by Cojac (@itscodejac); the current version is v0.1.4.