Remove custom skills - #86
Conversation
Greptile OverviewGreptile SummaryThis PR migrates from a custom skill implementation to pre-built skills installed via Major changes:
Key improvements:
Issues found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Install as CLI Install
participant Skills as skills.ts
participant Providers as providers.ts
participant AgentMCPs as agent-mcps.ts
participant Agents as agents/index.ts
participant Config as Config System
User->>Install: bunx oh-my-opencode-slim install
Install->>User: Ask configuration questions
User->>Install: Provide answers (Antigravity, OpenAI, skills)
alt Install Skills Enabled
Install->>Skills: installSkill(skill)
Skills->>Skills: npx skills add <repo>
Skills->>Skills: Run postInstallCommands
Skills-->>Install: Installation result
end
Install->>Providers: generateLiteConfig(config)
Providers->>Skills: Get RECOMMENDED_SKILLS
Skills-->>Providers: Return skill list
Providers->>AgentMCPs: Get DEFAULT_AGENT_MCPS
AgentMCPs-->>Providers: Return MCP defaults
Providers->>Providers: createAgentConfig for each agent
Providers->>Providers: buildPreset with skills & MCPs
Providers-->>Install: Return config object
Install->>Config: writeLiteConfig(config)
Config-->>Install: Config written
Note over User,Config: Runtime: Agent Initialization
Config->>Agents: createAgents(config)
Agents->>AgentMCPs: getAgentMcpList(agentName)
AgentMCPs-->>Agents: Return MCP list
Agents->>Skills: getSkillPermissionsForAgent(agentName)
Skills-->>Agents: Return skill permissions
Agents->>Agents: applyDefaultPermissions with skill rules
Agents-->>Config: Return agent definitions
|
| } catch (error) { | ||
| console.error(`Failed to install skill: ${skill.name}`); | ||
| return false; |
There was a problem hiding this comment.
Error details are lost when installation fails - only the skill name is logged. Consider logging the actual error for debugging.
| } catch (error) { | |
| console.error(`Failed to install skill: ${skill.name}`); | |
| return false; | |
| } catch (error) { | |
| console.error(`Failed to install skill: ${skill.name}`, error); | |
| return false; | |
| } |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/cli/skills.ts
Line: 50:52
Comment:
Error details are lost when installation fails - only the skill name is logged. Consider logging the actual error for debugging.
```suggestion
} catch (error) {
console.error(`Failed to install skill: ${skill.name}`, error);
return false;
}
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.b215ebe to
303e235
Compare
303e235 to
267dfa8
Compare
| console.log(`Running post-install commands for ${skill.name}...`); | ||
| for (const cmd of skill.postInstallCommands) { | ||
| console.log(`> ${cmd}`); | ||
| const [command, ...cmdArgs] = cmd.split(' '); |
There was a problem hiding this comment.
splitting commands with split(' ') doesn't handle quoted arguments or arguments with spaces. Commands like npm install -g "my package" will break.
| const [command, ...cmdArgs] = cmd.split(' '); | |
| const [command, ...cmdArgs] = cmd.match(/(?:[^\s"]+|"[^"]*")+/g)?.map(arg => arg.replace(/^"|"$/g, '')) ?? []; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/cli/skills.ts
Line: 75:75
Comment:
splitting commands with `split(' ')` doesn't handle quoted arguments or arguments with spaces. Commands like `npm install -g "my package"` will break.
```suggestion
const [command, ...cmdArgs] = cmd.match(/(?:[^\s"]+|"[^"]*")+/g)?.map(arg => arg.replace(/^"|"$/g, '')) ?? [];
```
How can I resolve this? If you propose a fix, please make it concise.* Remove custom skills * Cleanups
* Remove custom skills * Cleanups
Migrating to pre-built skills