tui_cli/opencode/skills/markdown-codeblock/SKILL.md
Use when the user wants to highlight code in markdown files, including inline code highlighting with {lang} prefix syntax, code blocks with language fences and titles, and transformer marks for diffs, highlights, focus, errors, and warnings. Always read this skill file when inserting code blocks or inline code in markdown.
npx skillsauth add efterklang/dotfiles markdown-codeblockInstall 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.
Apply to code wrapped in single backticks:
`{python} print("Hello")`
`{javascript} console.log("x")`
`{html} <div></div>`
`{rust} fn main() {}`
`{shell} echo "hi"`
Do NOT use {lang} prefix on triple-backtick code blocks.
Use language name in opening fence. Optionally add filename after language:
def greet(name):
return f"Hello, {name}!"
const add = (a: number, b: number): number => a + b;
The default number of backticks for code blocks is 3. When there are nested code blocks inside the content, the outer code block's backticks increase by one per nesting level. If there are multiple layers of nesting, continue adding backticks accordingly.
For example, if the inner content contains triple backticks, use 4 backticks for the outer wrapper:
```typescript
// Your code example here that might contain ``` in it
```
If the inner content has 4 backticks, use 5 for the outer, and so on.
Add marks in comments after #. Use marks to draw attention or add semantic meaning:
| Mark | When to Use |
| --- | --- |
| # [!code --] | Show code removal (before → after comparisons) |
| # [!code ++] | Show code addition (before → after comparisons) |
| # [!code highlight] | Emphasize important or key lines |
| # [!code word:term] | Highlight specific identifier, keyword, or term |
| # [!code focus] | De-emphasize surrounding code, focus on one section |
| # [!code error] | Mark lines with errors, invalid code, or exceptions |
| # [!code warning] | Mark lines with warnings, deprecations, or cautions |
let x = 5; // [!code --]
let x = 10; // [!code ++]
def calculate(items):
total = 0
for item in items: # [!code highlight]
total += item.price
return total # [!code highlight]
// [!code word:interface]
interface User {
id: number; // [!code word:id]
name: string; // [!code word:name]
}
// [!code focus]
func (s *Service) Process() error {
return s.validate()
}
func (s *Service) validate() error {
// validation logic
}
const result = JSON.parse(userInput); // [!code error]
try {
await riskyOperation(); // [!code error]
} catch (e) {
handleError(e); // [!code warning]
}
tools
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.