Works with the AI Agents you already use
invisible char audit
```js // access control function check(user) { if (user.role !== "admin" ) { return false; } // admin path return true; } ``` Those are the same function printed twice.
Free
invisible char audit
Example session with this skill installed
python scripts/audit.py fixtures/vulnerable
- Read your context and instructions
- Compiled the invisible char audit
target fixtures/vulnerable
scanned 6 files, 1.0 KB
score 2/100 grade F
critical 5 high 6 medium 3 low 0
FINDINGS
[critical] IV-002 Invisible instructions hidden in Unicode tag characters
at hidden_instructions.md:5:39 U+E0020 TAG SPACE
char '\U000e0020'
This line ends with 35 tag characters that render as nothing but
decode to ASCII that a model will read: ' this sentence was
invisible to you'.
fix: Delete the tag characters.
Connects securely to your tools. The creator never sees your data.
About this skill
Your diff does not show what your compiler reads
There is a class of attack that needs no exploit, no dependency, and no memory corruption. It needs a character that occupies no width.
// access control
function check(user) {
if (user.role !== "admin" ) { return false; } // admin path
return true;
}
Those are the same function printed twice. The bytes differ by two bidirectional control characters, U+202E and U+202D, and between them they reorder the line: the display shows a rejected branch while the parser reads something else.
This is Trojan Source, CVE-2021-42574, disclosed in 2021. It has never been fixed in any language, because it is not a bug in a language — it is a difference between how text is laid out and how text is read. Editors, diff views, and code review all render the line the attacker chose.
The variant that matters now
U+E0020 through U+E007F are the Unicode tag block. Each one encodes an ASCII character, offset by 0xE0000. Every mainstream renderer draws them as nothing at all. A language model reads them as text.
That asymmetry is the whole attack. A paragraph of tag characters is invisible in every editor, every diff, every review UI — and an instruction in plain ASCII to whatever reads the file next.
This skill does not just report that tag characters are present. It decodes the run and prints what it says:
score 2/100 grade F
critical 5 high 6 medium 3 low 0
FINDINGS
[critical] IV-002 Invisible instructions hidden in Unicode tag characters
at hidden_instructions.md:5:39 U+E0020 TAG SPACE
This line ends with 35 tag characters that render as nothing but
decode to ASCII that a model will read: ' this sentence was
invisible to you'.
A human sees an empty gap at the end of a sentence. The payload becomes evidence instead of a warning about an unknown.
What else it finds
| id | class | why it matters |
|---|---|---|
| IV-001 | Bidi controls (U+202A–U+202E, U+2066–U+2069) | Display order and parse order diverge. |
| IV-002 | Unicode tag block | Encodes ASCII, renders as nothing. Hidden instructions. |
| IV-003 | Zero-width, mid-file BOM, soft hyphen | Splits tokens, defeats grep, breaks equality. |
| IV-004 | Space lookalikes (NBSP, thin, ideographic) | Never equals U+0020; breaks comparison and indentation. |
| IV-006 | Variation selectors outside emoji | Invisible modifiers; pairs carry data. |
| IV-007 | Raw C0/C1 control characters | Terminate strings, drive terminals. |
| IV-009 | Homoglyph in an identifier | pаssword with Cyrillic а is a different name. |
| IV-010 | One identifier, several scripts | The impostor pattern. |
| IV-012 | Hostname mixing Latin with lookalike scripts | Typo-squat structure. |
| IV-013 | UTF-16 file | Rejected or mangled by toolchains; diffs as binary. |
| IV-014 | Invalid UTF-8 | Content is an approximation; failed bytes may be deliberate. |
Every finding carries the codepoint, its Unicode name, the line, the column, what the character does, and the fix:
[critical] IV-009 Homoglyph inside an identifier
at homoglyph.py:2:16 U+0430 CYRILLIC SMALL LETTER A
'а' renders as 'a' but is CYRILLIC SMALL LETTER A.
The token reads as 'check_password' and is not it.
Proof it works, and proof it stays quiet
A scanner that flags legitimate text is worse than no scanner, because it teaches its reader to close the report. So the package ships both controls, and both are regenerated by a script rather than hand-written:
| Target | Score | What it shows |
|---|---|---|
fixtures/vulnerable/ — six real techniques | 2/100 F | All six detected, with line and column |
fixtures/clean/ — Chinese, Arabic RTL, emoji ZWJ, accents | 100/100 A | Zero findings |
| Four unrelated real projects | 100 / 100 / 100 / 90 | No false positives |
| One project with a genuinely GBK-encoded log | 82/100 B | Correctly flagged as invalid UTF-8 |
Getting to that second row took three real fixes, and they are documented in the code because each one was a judgement call:
Homoglyph matching requires a letter. The first version mapped U+2013 EN DASH to -, so every range like 20–30K in a document became a critical finding. Punctuation is not part of an identifier; a dash cannot shadow a name.
U+3000 is suppressed on lines that already contain CJK. Full-width space is how Chinese and Japanese text is indented and aligned. Reporting it produced 62 findings on one resume template and buried everything else.
ZWJ, ZWNJ and U+FE0F are suppressed inside emoji sequences, keycaps like 1️⃣ included. That is joinery, not padding.
fixtures/clean/ exists specifically to keep those three fixes honest: if a future change breaks one, the clean control stops scoring 100.
Severity comes from the container, not only from the character
A soft hyphen in a Markdown paragraph is a paste accident. The same byte inside a Python identifier means the name you are reading is not the name the interpreter resolves. The base weight is promoted in code and markup, demoted in prose.
Scoring follows the same logic: 0–100 with a letter grade, capped at 55 while any critical finding stands, and per-severity penalties are capped so sixty trivial low findings cannot outrank one live bidi override. Before those caps, that exact case scored 13/100 — worse than a file with a working backdoor.
Cleaning mode
python scripts/audit.py ./suspect.js --clean-out ./suspect.clean.js
Writes a copy with the listed characters removed, prints exactly what it removed, and never overwrites the input:
wrote ./suspect.clean.js
removed U+200B ZERO WIDTH SPACE x2
removed U+00AD SOFT HYPHEN x1
Then diff the two files. That diff is the real deliverable, because it shows you what was hidden rather than telling you something was.
Look up a codepoint
$ python scripts/audit.py --explain U+E0041
U+E0041 TAG LATIN CAPITAL LETTER A
class tag character — encodes ASCII 'A'
$ python scripts/audit.py --explain U+0430
U+0430 CYRILLIC SMALL LETTER A
class confusable — reads as 'a'
What it cannot do
- It does not render text. It reads codepoints. It cannot predict what a specific editor, terminal, or compiler version will draw or accept — and that difference is exactly where the attacker lives.
- The homoglyph table is a curated subset, the letters that actually appear in impostors. A codepoint absent from the table is not evidence of safety.
- It cannot judge intent. A bidi control in a right-to-left localisation file is not an attack. The finding means "look here", never "this is malicious".
- It cannot compare two files for visual equivalence.
--clean-outgives you the clean copy; the diff is your job.
What to avoid
- Do not report the score without the characters. "Grade F" is noise.
U+202E at line 42is actionable. - Do not fix a file by hand after a hit. There is usually a second character a few bytes away. Use
--clean-outand diff. - Do not strip before you read. If a tag block was hiding an instruction, what it said should change your response to the entire document.
When to reach for it
A snippet pasted from a blog, a chat, or a model that "does not work" though it looks identical to the working version. A pull request from outside the team. A document an agent is about to read. A package downloaded rather than written. A SyntaxError on a line that looks correct. A string comparison returning false for two strings that print the same.
No dependencies. Python 3.8+, standard library only. No network, no pip install, no execution of the target.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.
Does not render text: it reads codepoints, so it cannot predict what a specific editor, terminal or compiler version will draw or accept.
The homoglyph table is a curated subset of the Unicode confusables list - the letters that actually appear in impostors. A codepoint absent from the table is not evidence of safety.
Cannot judge intent: a bidi control in a right-to-left localisation file is not an attack. Findings mean 'look here', never 'this is malicious'.
Cannot compare two files for visual equivalence; --clean-out gives you the clean copy and the diff is the reader's job.
The fixture corpus is the regression test, not a fuzzer: it proves six techniques are detected and that legitimate CJK, Arabic, emoji and accents score 100.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 9 days ago
- Free with an Agensi account
- Software
Python 3.8+ (standard library only)
Permissions
Read Files: the only access this skill needs. It opens source, config and text files under the path you point it at, and never writes to them. Terminal / Shell: it is invoked as a Python script. It does not spawn subprocesses and never runs anything from the target. Write Files: used only by --clean-out, which writes the clean copy to a path you name yourself. It refuses to overwrite its input. Network Access: none. The skill makes no network calls of any kind. Environment Variables: none read.