Repository navigation
refactor: normalize skill entry point file name to uppercase SKILL.md - #715
Conversation
haiphucnguyen
commented
Sep 11, 2026
- Update materialization tests to expect the entry point to be named SKILL.md
- Adjust UI components (AgentMessageList, MessageComponents, AgentsSettingsSection) to use the normalized path
- Add new i18n keys for skill call labeling across all locales
- Improve ClaudeAgent status messages with concise model hints
- Refactor ExternalAgentTemplate to copy top‑level entry point as SKILL.md, preserving case‑insensitive matching and ensuring uniqueness
- Update materialization tests to expect the entry point to be named SKILL.md - Adjust UI components (AgentMessageList, MessageComponents, AgentsSettingsSection) to use the normalized path - Add new i18n keys for skill call labeling across all locales - Improve ClaudeAgent status messages with concise model hints - Refactor ExternalAgentTemplate to copy top‑level entry point as SKILL.md, preserving case‑insensitive matching and ensuring uniqueness
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical and moderate findings affect skill persistence, materialization determinism, and tool-call labeling.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Normalizes skill entry-point files to SKILL.md while updating Claude status messaging, skill-call UI, localization, and tests.
Changes:
- Standardize skill materialization and editing paths.
- Add Claude status hints and localized skill-call labels.
- Update UI layout and materialization tests.
File summaries
| File | Reviewed changes and findings |
|---|---|
shared/src/main/kotlin/io/askimo/core/agent/ExternalAgentTemplate.kt |
Normalizes copied entry points. Moderate (3 votes): duplicate case variants can be copied nondeterministically. |
shared/src/main/kotlin/io/askimo/core/agent/ClaudeAgent.kt |
Adds model/status reporting. Nit (1 vote): add coverage for new status branches. |
desktop-shared/src/main/resources/i18n/messages.properties |
Adds skill-call translations. |
desktop-shared/src/main/resources/i18n/messages_zh_TW.properties |
Adds skill-call translations. |
desktop-shared/src/main/resources/i18n/messages_zh_CN.properties |
Adds skill-call translations. |
desktop-shared/src/main/resources/i18n/messages_vi_VN.properties |
Adds skill-call translations. |
desktop-shared/src/main/resources/i18n/messages_pt_BR.properties |
Adds skill-call translations. |
desktop-shared/src/main/resources/i18n/messages_ko_KR.properties |
Adds skill-call translations. |
desktop-shared/src/main/resources/i18n/messages_ja_JP.properties |
Adds skill-call translations. |
desktop-shared/src/main/resources/i18n/messages_fr.properties |
Adds skill-call translations. |
desktop-shared/src/main/resources/i18n/messages_es.properties |
Adds skill-call translations. |
desktop-shared/src/main/resources/i18n/messages_de.properties |
Adds skill-call translations. |
desktop-shared/src/main/kotlin/io/askimo/ui/settings/AgentsSettingsSection.kt |
Uses uppercase entry paths. Critical (1 vote): existing lowercase entries can result in duplicate files and nondeterministic edits. |
desktop-shared/src/main/kotlin/io/askimo/ui/chat/MessageComponents.kt |
Displays skill tool calls. Moderate (1 vote each): broad startsWith("skill") matching misclassifies tools, and arguments may not identify the skill. |
desktop-shared/src/main/kotlin/io/askimo/ui/agent/AgentMessageList.kt |
Adjusts streaming layout spacing. |
cli/src/test/kotlin/io/askimo/core/skills/ExternalAgentTemplateMaterializeSkillTest.kt |
Updates and expands materialization tests. |
Review details
Suppressed comments (3)
desktop-shared/src/main/kotlin/io/askimo/ui/chat/MessageComponents.kt:1762
- The heuristic documentation identifies
toolName(for exampleskills-skills-pptx) as the skill identifier, but this label prefersarguments. The Claude pipeline populates that field from the first input value, so it can be an arbitrary invocation argument or empty rather than the skill name; native calls can therefore display the wrong label. UsetoolCall.toolNamehere, or parse a named skill field explicitly.
stringResource("tool.call.skill.label", toolCall.arguments ?: toolCall.toolName)
desktop-shared/src/main/kotlin/io/askimo/ui/chat/MessageComponents.kt:1679
startsWith("skill")classifies every tool whose name merely begins with that text (for exampleskill_searchorskill-manager) as a native skill. That causes this UI to rename unrelated tools and suppress their argument details, so their actual name and inputs are lost. Match only the exact Claude-native names/prefix documented above.
private fun String.isSkillToolCall(): Boolean = startsWith("skill", ignoreCase = true)
shared/src/main/kotlin/io/askimo/core/agent/ClaudeAgent.kt:157
- The new status behavior is not exercised by the existing Claude tests:
ClaudeStreamJsonEventParserTestverifies field extraction, but no test invokesClaudeAgent.parseStdoutLinewith developer mode active/inactive. Add focused coverage for the non-dev model hint, the full dev-mode diagnostic, and an init event without a model so regressions in these user-visible branches are caught.
val model = event.fields["model"] as? String
if (AppConfig.developer.enabled && AppConfig.developer.active) {
// Dev mode: surface everything useful for debugging how the CLI is
// actually running — model, permission mode, tool/MCP counts, cwd.
val toolCount = (event.fields["tools"] as? String)
?.let { ClaudeStreamJsonEventParser.parseArray(it).size }
val mcpCount = (event.fields["mcp_servers"] as? String)
?.let { ClaudeStreamJsonEventParser.parseArray(it).size }
val permissionMode = event.fields["permissionMode"] as? String
val cwd = event.fields["cwd"] as? String
onStatus(
buildString {
append("init")
model?.let { append(" | model=$it") }
permissionMode?.let { append(" | permission=$it") }
toolCount?.let { append(" | tools=$it") }
mcpCount?.let { append(" | mcp=$it") }
cwd?.let { append(" | cwd=$it") }
},
)
} else if (!model.isNullOrBlank()) {
// Non-dev: just a brief, low-noise hint of which model answered.
onStatus("model: $model")
- Files reviewed: 16/16 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
Three unresolved moderate findings remain in MessageComponents.kt and AgentsSettingsSection.kt.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (2)
desktop-shared/src/main/kotlin/io/askimo/ui/chat/MessageComponents.kt:1679
toolCallRowis also used for regular/MCP tool calls, whose names are arbitrary, sostartsWith("skill")will misclassify tools such asskill_lookup(and hide their arguments) as Claude Skill calls. Restrict this predicate to the native forms documented here (for example exactSkill/skillorskill-/skills-prefixes) so unrelated tools keep the normal rendering.
private fun String.isSkillToolCall(): Boolean = startsWith("skill", ignoreCase = true)
desktop-shared/src/main/kotlin/io/askimo/ui/settings/AgentsSettingsSection.kt:663
- This recomputes the exact entry-file path when
absolutePathchanges, but the editor'srawSkillMdBodyandbodystate are still remembered only byskill.relativePathbelow. Selecting the same virtual skill after its lowercase/uppercase entry variant changes can therefore display and save the previous file's contents rather than the newly resolved file; include the resolved path in the editor state keys (or key the whole editor by it).
val skillMdRelativePath = remember(skill.relativePath, skill.absolutePath) {
deriveSkillMdRelativePath(skill, AskimoHome.skillsDir())
}
- Files reviewed: 19/19 changed files
- Comments generated: 1
- Review effort level: Lite
| Text( | ||
| text = toolCall.toolName, | ||
| text = if (isSkillCall) { | ||
| stringResource("tool.call.skill.label", toolCall.arguments ?: toolCall.toolName) |