Claude-skill-registry Check Inline Code Formatting
Review inline code in markdown files for proper formatting and syntax highlighting. Check for missing backticks on CLI flags, filenames, and code elements. Verify that inline syntax highlighting (#!groovy) is used appropriately. Use when reviewing documentation or quiz questions.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/check-inline-code" ~/.claude/skills/majiayu000-claude-skill-registry-check-inline-code-formatting && rm -rf "$T"
manifest:
skills/data/check-inline-code/SKILL.mdsource content
Check Inline Code Formatting
Review inline code in markdown files for proper formatting and appropriate use of syntax highlighting.
What to Check
1. Missing Backticks
The following should always be wrapped in backticks:
CLI flags and options:
,-resume
,-profile
,-params-file
, etc.--input
Filenames and paths:
,nextflow.config
,.command.sh
,work/
, etc.modules/
Commands:
,nextflow run
,nextflow log
, etc.docker run
Code elements:
- Variable names:
,params.inputoutputDir - Process names:
SAYHELLO - Operators and methods:
,collect()
,map()view() - Directives:
,container
,publishDirmemory
2. Inline Syntax Highlighting
Use
`#!groovy code` for Groovy/Nextflow code that benefits from syntax colouring.
DO use
for:#!groovy
- Variable interpolation:
`#!groovy ${variable}` - Closures:
or`#!groovy { meta.id }``#!groovy .map { it * 2 }` - Method chains with closures:
`#!groovy channel.of(1,2,3).map { it * 2 }` - String interpolation:
`#!groovy "${greeting}-output.txt"` - Type declarations:
`#!groovy param: String = 'value'`
DO NOT use
for:#!groovy
- Single words or identifiers: use
not`outputDir``#!groovy outputDir` - Simple directives: use
not`container 'uri'``#!groovy container 'uri'` - Plain dot notation: use
not`processName.out``#!groovy processName.out` - Keywords alone: use
not`include``#!groovy include`
The rule: Only use
#!groovy when there's meaningful syntax structure (braces, interpolation, operators) that highlighting will visually enhance. A single word or simple expression gains nothing from syntax highlighting.
3. Consistency
- Similar code references should be formatted the same way throughout a document
- Quiz answer options should have consistent formatting
Examples
Good inline code formatting
Run the workflow with `nextflow run main.nf -resume`. The `#!groovy ${greeting}` variable is interpolated into the string. Set memory with `#!groovy process { withName: 'FOO' { memory = '4.GB' } }`. The `container` directive specifies the Docker image. Access outputs with `processName.out.outputName`.
Bad inline code formatting
<!-- Missing backticks --> Run the workflow with nextflow run main.nf -resume. <!-- Unnecessary #!groovy on single word --> The `#!groovy container` directive specifies the image. <!-- Missing #!groovy on closure --> Transform with `.map { it.toUpperCase() }`.