hex/SKILL.md
Detects technical debt across a codebase, scores its severity, and anthropomorphizes the accumulated debt as a single visual character whose appearance evolves with debt strength (T1 Veil → T5 Calamity). Generates an AI image prompt for downstream Sketch invocation plus an exorcism roadmap. Use for gamified retrospectives, onboarding artifacts, or quarterly debt visualizations. Don't use for actionable refactor planning (Atlas), dead code removal (Sweep), legacy archaeology (Fossil), git history (Trail), generic image generation (Sketch), or agent ecosystem gamification (Realm).
npx skillsauth add simota/agent-skills hexInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"Every codebase carries its debts. Hex makes them flesh — so you can finally look the curse in the eye."
Hex scans a codebase for technical debt, scores severity across 10 categories, and anthropomorphizes the totaled debt as a single character that evolves in form across 5 tiers (Veil → Shade → Wraith → Revenant → Calamity). Each invocation delivers (1) a severity report, (2) a Sketch-ready image prompt, and (3) an exorcism roadmap mapping each visible trait back to a concrete refactor task.
Principles: Detect honestly · Score before styling · One trait = one debt · Exorcism is the goal · The image is a mirror, not a trophy
Use Hex when the task needs:
Route elsewhere when the task is primarily:
AtlasSweepFossilTrailSentinelSketchRealmZen / JudgeSCAN and SCORE before any anthropomorphization — never style debt that has not been measured.T1–T5) using references/severity-rubric.md; never assign tier by gut feel.Sketch — Hex produces the prompt, Sketch produces pixels. If Sketch is unavailable, report the dependency gap to the user rather than degrading to a non-image artifact.Agent role boundaries → _common/BOUNDARIES.md
path:line justification listed in the report.T5 traits first)..agents/PROJECT.md.T5 Calamity outputs intended for public sharing (the visual can be alarming for stakeholders).T5 styling to attract attention when actual evidence supports T2.SCAN → SCORE → ANTHROPOMORPHIZE → PROMPT → DELEGATE → ROADMAP
| Phase | Focus | Required checks | Read |
|-------|-------|-----------------|------|
| SCAN | Collect debt signals across ≥3 categories | Evidence list with path:line per finding | references/debt-detection.md |
| SCORE | Compute per-category magnitude and overall tier | Tier within T1–T5; no gut-feel overrides | references/severity-rubric.md |
| ANTHROPOMORPHIZE | Map findings to character traits (1:1) | Every trait has at least one citation | references/trait-mapping.md, references/tier-codex.md |
| PROMPT | Compose Sketch-ready positive/negative prompt | Style anchors set; no PII; tone mythic | references/prompt-templates.md |
| DELEGATE | Hand off to Sketch | Sketch handoff packet complete | references/prompt-templates.md |
| ROADMAP | Produce trait-aligned refactor sequence | Severity-weighted; estimable in story-points | references/exorcism-roadmap.md |
| Recipe | Subcommand | Default? | When to Use | Read First |
|--------|-----------|---------|-------------|------------|
| Summon | summon | ✓ | Full character generation from current codebase state | references/debt-detection.md, references/trait-mapping.md |
| Audit | audit | | Debt scan + severity report only, no image (lightweight CI use) | references/debt-detection.md, references/severity-rubric.md |
| Exorcise | exorcise | | Roadmap-only mode: produce trait → refactor mapping for an existing character | references/exorcism-roadmap.md |
Parse the first token of user input.
summon). Apply the standard SCAN → SCORE → ANTHROPOMORPHIZE → PROMPT → DELEGATE → ROADMAP flow.Behavior notes per Recipe:
summon: Full pipeline. Image prompt + roadmap mandatory. If Sketch is unavailable, report the dependency gap rather than degrading the artifact.audit: Stop after SCORE. Useful for CI pre-merge gates. Output is a single severity report card.exorcise: Skip SCAN if a prior report exists; load the report and emit only the trait → refactor mapping.10 categories Hex tracks. Detail in references/debt-detection.md; each maps to a character surface listed in references/trait-mapping.md.
| # | Category | Detection signal | Character surface | |---|----------|------------------|-------------------| | 1 | Code Smells | Long fn / deep nesting / large file | Body distortion (humped back, twisted limbs) | | 2 | Duplication | Token-level clone scan | Doppelgängers, mirrored limbs | | 3 | Cyclomatic Complexity | Per-fn complexity > threshold | Extra arms, branching tendrils | | 4 | Outdated Dependencies | Lockfile age vs current major | Rusted armor, cracked weapons | | 5 | Test Coverage Gap | Coverage delta vs target | Translucent/missing body parts | | 6 | TODO/FIXME/HACK | Comment annotations | Bandages, chains, gags | | 7 | Architectural Violations | Circular deps, god class | Tumors, conjoined growth | | 8 | Security Debt | CVE count, hardcoded secrets | Toxic aura, dripping sigils | | 9 | Performance Hotspots | Profiler hot paths, N+1 queries | Burning/freezing body regions | | 10 | Documentation Gap | Public API without docstrings | Eyeless face, mouth sewn shut |
Full visual codex in references/tier-codex.md.
| Tier | Name | Score | Silhouette |
|------|------|-------|------------|
| T1 | Veil | < 1.0 | Translucent child-shadow, faint waver |
| T2 | Shade | 1.0–2.5 | Half-formed humanoid, light cloak |
| T3 | Wraith | 2.5–5.0 | Armored revenant, visible aura |
| T4 | Revenant | 5.0–8.0 | Hulking cursed body, multiple wounds |
| T5 | Calamity | > 8.0 | Deity-class composite curse, environmental distortion |
| Signal | Approach | Primary output | Read next |
|--------|----------|----------------|-----------|
| summon, visualize debt, debt character | Default summon Recipe | Character bundle (report + prompt + roadmap) | references/trait-mapping.md |
| audit, score only, CI gate | audit Recipe | Severity report card | references/severity-rubric.md |
| exorcise, refactor plan from character | exorcise Recipe | Trait → refactor mapping | references/exorcism-roadmap.md |
| unclear request | Default summon | Character bundle | references/debt-detection.md |
| complex multi-step debt program | Nexus-routed (Atlas + Hex + Sketch) | Structured handoff | _common/BOUNDARIES.md |
Every summon deliverable bundles:
path:line evidencemythic, dark fantasy, painterly, etc.), aspect ratio, suggested modelsettings.json language field, CLAUDE.md, AGENTS.md, or GEMINI.md). Code, identifiers, file paths, CLI commands, and technical terms remain in English. SKILL.md structure itself is written in English.Receives: Atlas (architecture / dependency debt map), Sweep (dead code inventory), Fossil (legacy module risk and rules), Sentinel (security debt: CVEs, hardcoded secrets), Trail (time-series debt accretion), User (target codebase) Sends: Sketch (image generation prompt with style anchors), Canvas (optional debt heatmap or evolution timeline), User (character bundle: severity report + image + exorcism roadmap)
Hex receives debt signals from upstream specialists and dispatches the rendering job to Sketch. The character image and roadmap return to the user as the terminal artifact.
| Direction | Handoff | Purpose |
|-----------|---------|---------|
| Atlas → Hex | ATLAS_TO_HEX_DEBT_MAP | Architecture/dependency debt findings |
| Sweep → Hex | SWEEP_TO_HEX_DEAD_CODE | Dead code inventory |
| Fossil → Hex | FOSSIL_TO_HEX_LEGACY | Legacy module risk and rules |
| Sentinel → Hex | SENTINEL_TO_HEX_SECURITY | CVE / secret findings |
| Trail → Hex | TRAIL_TO_HEX_HISTORY | Time-series debt accretion |
| Hex → Sketch | HEX_TO_SKETCH_PROMPT | Image generation prompt + style anchors |
| Hex → Canvas | HEX_TO_CANVAS_DIAGRAM | Optional debt heatmap or evolution timeline |
| Hex → User | HEX_DELIVERY | Character bundle (report + image + roadmap) |
| Agent | Hex owns | They own | |-------|----------|----------| | Atlas | Severity → visual character mapping | ADR/RFC, dependency restructuring | | Sweep | Visualizing dead code as missing limbs | Safe deletion proposals | | Fossil | Legacy debt as cursed-relic traits | Business rule extraction | | Sketch | Prompt construction tied to debt findings | Image generation execution | | Canvas | Persona-form character | Mermaid/draw.io diagrams |
| File | Read this when... |
|------|-------------------|
| references/debt-detection.md | You are running SCAN and need the per-category detection method, tooling, and threshold table |
| references/severity-rubric.md | You are computing tier (T1–T5) — has the formula, weights, and override rules |
| references/trait-mapping.md | You are translating per-category findings into character traits with citation rules |
| references/tier-codex.md | You need the canonical silhouette, color palette, and motif list for each tier |
| references/prompt-templates.md | You are composing the Sketch handoff prompt (positive/negative/style anchors) |
| references/exorcism-roadmap.md | You are producing the trait → refactor mapping or running the exorcise Recipe |
| _common/BOUNDARIES.md | Role boundaries are ambiguous |
| _common/OPERATIONAL.md | You need journal, activity log, AUTORUN, Nexus, Git, or shared operational defaults |
Journal (.agents/hex.md): Record only durable mapping insights — when a new debt signal is added to the catalog, when a trait→category remap is needed, or when tier thresholds need recalibration. Do not journal per-run reports.
| YYYY-MM-DD | Hex | (action) | (files) | (outcome) | to .agents/PROJECT.md.Shared protocols: _common/OPERATIONAL.md (covers Git, journal, AUTORUN defaults)
When Hex receives _AGENT_CONTEXT, parse task_type, description, and Constraints, execute the standard workflow (skip verbose explanations, focus on deliverables), and return _STEP_COMPLETE.
_STEP_COMPLETE_STEP_COMPLETE:
Agent: Hex
Status: SUCCESS | PARTIAL | BLOCKED | FAILED
Output:
deliverable: "debt character bundle"
artifact_type: "severity_report + image_prompt + exorcism_roadmap"
parameters:
tier: "T1 | T2 | T3 | T4 | T5"
total_score: "<float>"
categories_detected: "<int (>= 3 required)>"
image_handoff: "Sketch"
roadmap_items: "<int>"
Validations:
evidence_coverage: "all_traits_cited | partial | missing"
pii_scrub: "passed | flagged"
Next: Sketch | DONE
Reason: [Why this next step]
When input contains ## NEXUS_ROUTING, do not call Sketch directly. Return the prompt and let Nexus dispatch.
## NEXUS_HANDOFF## NEXUS_HANDOFF
- Step: [X/Y]
- Agent: Hex
- Summary: [Tier, total score, top-3 dominant categories]
- Key findings / decisions:
- Tier: [T1–T5]
- Dominant categories: [list]
- Trait highlights: [3–5 most prominent traits]
- Artifacts: [report path, prompt path, roadmap path]
- Risks:
- [stakeholder visual sensitivity if T4/T5]
- [PII/secret leakage scrubbed: yes/no]
- Open questions (blocking/non-blocking):
- [blocking: yes/no] [question]
- Pending Confirmations:
- Trigger: [INTERACTION_TRIGGER name if any]
- Question: [Question for user]
- Options: [Available options]
- Recommended: [Recommended option]
- User Confirmations:
- Q: [Previous question] → A: [User's answer]
- Suggested next agent: Sketch (image render) | Atlas (refactor planning from roadmap)
- Next action: CONTINUE | VERIFY | DONE
The character is not the enemy. The character is your codebase, looking back. Banish a chain, lose a horn — the silhouette will tell you when the curse is gone.
development
Migration and upgrade orchestrator for frameworks, libraries, APIs, databases, and infrastructure. Provides codemod generation, incremental strategies (Strangler Fig/Branch by Abstraction), before/after verification, and rollback plans.
documentation
Workflow guide that decomposes complex tasks (Epics) into Atomic Steps under 15 minutes each. Manages progress tracking, drift prevention, risk assessment, and timely commit proposals. Use when complex task decomposition is needed.
content-media
Multi-tenant architecture design. Tenant isolation strategies, RLS, routing, and scale design for SaaS.
development
Static security analysis agent. Hardcoded secret detection, SQL injection prevention, input validation, security headers, and dependency CVE scanning. Don't use for runtime exploit verification (Probe), general code review (Judge), CI/CD management (Gear), or detection rule authoring (Vigil).