agentleFS
rakaarwakyrakaarwaky/agents-arwaky/skills/code-quality/fix-markdown-inline-html/SKILL.md

fix-markdown-inline-html

Skill0 starsChanged 54 days agoMITView on GitHub

Fixes Markdown files rejected as HTML, JSX, or MDX. Use when an editor or edit tool refuses a .md file, or markdownlint reports MD033 inline HTML.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read this as a content defect in the file, not as a tool limitation.

    line 52
  2. Very specific:

    Never "fix" it by converting the file to .mdx, and never by stripping the angle brackets out of a type — that deletes information.

    line 78
  3. Distinctive:

    Use it as a pre-commit gate:

    line 89
  4. Distinctive:

    Do not stop at "the tool let me edit it now" — a file can become editable while still carrying a bare bracket that a later edit …

    line 109

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

fix-markdown-inline-html

Rule: A .md file must contain zero angle brackets outside code spans and fenced blocks. Bare <...> is what makes a Markdown file look like HTML, JSX, or MDX.

The symptom

An editor or edit tool refuses the file and says something like:

Editable only in code mode because this file contains HTML, JSX, or MDX.

The same content trips the linter:

FRD.md:557:74 [markdownlint::MD033] Inline HTML [Element: dyn]
FRD.md:315:36 [markdownlint::MD033] Inline HTML [Element: String]

Read this as a content defect in the file, not as a tool limitation. The fix belongs in the file, and the file then becomes editable normally.

Why it happens

Three patterns account for nearly every case:

PatternExampleWhy it is flagged
Unquoted genericsVec<String>, Option<FilePath>, Arc<dyn Trait><String> parses as a tag
Bare comparisonCompletes in < 1s< 1s and a > looks like a tag
Placeholder textSee <file> for detailsLooks like a tag

The trap: a file can be 200 lines of correct backticked generics and still have three bare ones. Backticking is not a stylistic choice here, it is the only thing separating a valid document from a rejected one.

The fix, in order of preference

  1. Wrap it in backticks — `Vec<String>`, `Arc<dyn Trait>`. Correct for code, and it renders as code.
  2. Rewrite it as prose — under 1 s instead of < 1s; less than instead of <. Preferred for a comparison, since a code span reads as code.
  3. Escape the brackets — \<String\>. Last resort: the backslashes are visible in raw text and confuse the next reader.

Never "fix" it by converting the file to .mdx, and never by stripping the angle brackets out of a type — that deletes information.

Find them

python3 scripts/find_bare_angle_brackets.py <file-or-dir>

Exits 1 when it finds any, 0 when clean. It skips fenced blocks, tracks inline code spans, and reports line:column so you can jump straight there. Use it as a pre-commit gate:

python3 scripts/find_bare_angle_brackets.py --quiet docs/ || exit 1

Independent cross-check, when markdownlint runs in the project:

lint-arwaky-cli check <path> | grep MD033

Fix loop

  • Run the script over the file; it exits 1 with a line:column list.
  • For each hit: backtick it, or rewrite it as prose.
  • Re-run the script; it must now print clean and exit 0.
  • Confirm the edit tool accepts the file with no HTML/JSX/MDX warning.
  • If the project runs markdownlint, confirm MD033 is gone from its output.

Do not stop at "the tool let me edit it now" — a file can become editable while still carrying a bare bracket that a later edit reintroduces. The script's exit status is the criterion, not the tool's tolerance.

Other Markdown violations in the same file

An MD033 hit usually arrives alongside other findings. Once the brackets are fixed, the same lint-arwaky-cli check pass will still report:

CodeMeaningFix
MD013Line longer than 80 charsWrap prose; split long table cells
MD060Table pipe style inconsistentAlign columns, or use `---` compact style consistently
MD022Heading not surrounded by blank linesInsert a blank line below
MD058Table not surrounded by blank linesInsert blank lines above and below
MD041First line is not a top-level headingAdd # Title at the top

Fix all of them in the same pass. Leaving known violations in a file you just opened for cleanup is how the next session inherits the same defect.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.