Skip to content
Back to skills

Doc Refactor

ASecurity

Refactor documents — simplify without losing information, visualize flows with sequenceDiagram.

  • 192 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 4, 2026
ai-agentsrefactoring

Security analysis

A100/100

Scanned September 4, 2026

npx -y skills add sd0xdev/sd0x-harness --skill doc-refactor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Doc Refactor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Doc Refactor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sd0xdev-doc-refactor-sd0x-harness/badge)](https://www.skillsdirectory.com/skills/sd0xdev-doc-refactor-sd0x-harness)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: doc-refactor
description: "Refactor documents — simplify without losing information, visualize flows with sequenceDiagram."
allowed-tools: Read, Grep, Glob, Edit, Agent
---

# Document Refactoring

## Trigger

- Keywords: refactor doc, simplify document, doc-refactor, condense document

## When NOT to Use

- Code refactoring (use `/simplify` or `/refactor`)
- Document review without changes (use `/codex-review-doc`)
- Writing new documents (use `/tech-spec` or `/create-request`)

## Agent Dispatch

Dispatch to the dedicated `doc-refactor` agent:

```
Agent({
  description: "Refactor document — simplify without losing information",
  subagent_type: "doc-refactor",
  prompt: `Refactor the document at: $ARGUMENTS
Follow the task steps and simplification standards defined in this skill.`
})
```

## Task

For the file specified by `$ARGUMENTS`:

1. **Analyze original content**
   - Count lines
   - Identify core information vs redundancy

2. **Refactor**
   - Long paragraphs -> tables
   - Steps -> sequenceDiagram
   - Duplicates -> single source

3. **Validate**
   - Key information preserved
   - Line count reduced

## Simplification Standards

| File Type | Target Lines |
|-----------|-------------|
| CLAUDE.md | < 50 |
| rules/*.md | < 30 |
| agents/*.md | < 50 |

## Output

```markdown
## Refactoring Result

- Original: X lines
- Simplified: Y lines (-Z%)

## Changes

- <summary>
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.