Skip to content

feedback(code-quality-plugin): code-lint ships unrendered {{ if PROJECT_TYPE }} conditionals #2265

Description

@laurigates

Skill

code-quality-plugin/skills/code-lint/SKILL.md (observed at cached version 1.22.0)

Category

Bug — the skill body ships templating syntax that nothing renders, so the agent receives it verbatim.

Description

Invoking code-quality-plugin:code-lint via the Skill tool returns the SKILL.md body with unrendered template conditionals. Claude Code does not process {{ if ... }} / {{ endif }}, so all four language branches arrive at once and the agent has to pick one by hand.

The body also carries shell-parameter-expansion placeholders (${1:-.}, ${2:+--fix}, ${3:+--check}) that are documentation of intent rather than runnable commands — they only work if something substitutes $1/$2/$3, and nothing does.

Net effect: a skill whose entire job is "run the right linter" hands the agent four mutually-exclusive linter recipes plus placeholder syntax, and leaves both the language selection and the flag substitution as an exercise.

Evidence

Verified directly in the cached skill source, not just in the tool output:

$ grep -n '{{ if\|{{ endif\|PROJECT_TYPE' \
    ~/.claude/plugins/cache/laurigates-claude-plugins/code-quality-plugin/1.22.0/skills/code-lint/SKILL.md
36:{{ if PROJECT_TYPE == "python" }}
42:{{ endif }}
45:{{ if PROJECT_TYPE == "node" }}
50:{{ endif }}
53:{{ if PROJECT_TYPE == "rust" }}
58:{{ endif }}
61:{{ if PROJECT_TYPE == "go" }}
66:{{ endif }}

$ grep -no '\${[12][:-][^}]*}' <same file>
38:${1:-.}
38:${2:+--fix}
39:${1:-.}
...

PROJECT_TYPE is never assigned anywhere in the skill — there is no step that detects the language and binds it.

The rendered Context block was also empty in this run:

- Package files: (Bash completed with no output)
- Pre-commit config: (Bash completed with no output)

so even the detection signal the conditionals would presumably branch on came back blank.

Impact

Mild, not blocking. In the session that surfaced this I inferred the Python branch correctly and ran ruff check / ruff format --check without trouble. Filing because the failure is silent: a less careful pass could run the Node or Go branch, or paste ${1:-.} into a shell. It also costs tokens to emit three irrelevant language branches every invocation.

Context: a polyglot workspace (laurigates/comfyui-nodes) with no ruff config at the root, which is exactly the case where "which linter applies here?" is a real question the skill could answer and currently punts on.

Suggested Action

Any of these would resolve it; the first is the smallest change:

  1. Replace the pseudo-template with an explicit decision table — "detect the language this way → run these commands" — so the branch selection is stated as instructions rather than unprocessed syntax.
  2. Have the skill resolve PROJECT_TYPE itself as a first step (the Context block already tries to detect package files; bind the result and reference it in prose).
  3. Delegate to the existing scriptscripts/detect-and-fix.sh is already referenced further down the same skill and does auto-detection properly. Leading with it would make the language branches unnecessary.

Also worth a general sweep: if {{ if ... }} appears in other SKILL.md bodies across the marketplace it will have the same problem, and a lint rule for unrendered template syntax in skill bodies would catch it once rather than per-skill.


Filed via /session-endfeedback-plugin:feedback-session.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AihEc2RuPSe9qUpbDx4SyJ

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsession-feedbackFeedback from session analysis

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions