From 1bb46270a9fc0a05e409804ab7950056384bf24b Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 7 Apr 2026 08:23:17 -0400 Subject: [PATCH] chore(skills/crush-config): improve crush config skill (#2556) --- internal/skills/builtin/crush-config/SKILL.md | 165 +++++++++--------- 1 file changed, 81 insertions(+), 84 deletions(-) diff --git a/internal/skills/builtin/crush-config/SKILL.md b/internal/skills/builtin/crush-config/SKILL.md index b4b86e24fe9252331cce866c2c0310f5dfda237a..9520647b7a4669319041a7e9bfb716a2104b714d 100644 --- a/internal/skills/builtin/crush-config/SKILL.md +++ b/internal/skills/builtin/crush-config/SKILL.md @@ -16,75 +16,47 @@ Crush uses JSON configuration files with the following priority (highest to lowe ```json { "$schema": "https://charm.land/crush.json", - "options": {} + "models": {}, + "providers": {}, + "mcp": {}, + "lsp": {}, + "options": {}, + "permissions": {}, + "tools": {} } ``` The `$schema` property enables IDE autocomplete but is optional. -## Common Configurations +## Common Tasks -### Project-Local Skills +- Add a custom provider: add an entry under `providers` with `type`, `base_url`, `api_key`, and `models`. +- Disable a builtin or local skill: add the skill name to `options.disabled_skills`. +- Add an MCP server: add an entry under `mcp` with `type` and either `command` (stdio) or `url` (http/sse). -Add a relative path to keep project-specific skills alongside your code: +## Model Selection ```json { - "options": { - "skills_paths": ["./skills"] - } -} -``` - -> [!IMPORTANT] -> Keep in mind that the following paths are loaded by default, so they DO NOT NEED to be added to `skill_paths`: -> -> * `.agents/skills` -> * `.crush/skills` -> * `.claude/skills` -> * `.cursor/skills` - -### LSP Configuration - -```json -{ - "lsp": { - "go": { - "command": "gopls", - "env": { - "GOTOOLCHAIN": "go1.24.5" - } + "models": { + "large": { + "model": "claude-sonnet-4-20250514", + "provider": "anthropic", + "max_tokens": 16384 }, - "typescript": { - "command": "typescript-language-server", - "args": ["--stdio"] + "small": { + "model": "claude-haiku-4-20250514", + "provider": "anthropic" } } } ``` -### MCP Servers +- `large` is the primary coding model; `small` is for summarization. +- Only `model` and `provider` are required. +- Optional tuning: `reasoning_effort`, `think`, `max_tokens`, `temperature`, `top_p`, `top_k`, `frequency_penalty`, `presence_penalty`, `provider_options`. -```json -{ - "mcp": { - "filesystem": { - "type": "stdio", - "command": "node", - "args": ["/path/to/mcp-server.js"] - }, - "github": { - "type": "http", - "url": "https://api.githubcopilot.com/mcp/", - "headers": { - "Authorization": "Bearer $GH_PAT" - } - } - } -} -``` - -### Custom Provider +## Custom Providers ```json { @@ -105,59 +77,90 @@ Add a relative path to keep project-specific skills alongside your code: } ``` -### Tool Permissions +- `type` (required): `openai`, `openai-compat`, or `anthropic` +- `api_key` supports `$ENV_VAR` syntax. +- Additional fields: `disable`, `system_prompt_prefix`, `extra_headers`, `extra_body`, `provider_options`. -```json -{ - "permissions": { - "allowed_tools": ["view", "ls", "grep", "edit"] - } -} -``` - -### Disable Built-in Tools +## LSP Configuration ```json { - "options": { - "disabled_tools": ["bash", "sourcegraph"] + "lsp": { + "go": { + "command": "gopls", + "env": { "GOTOOLCHAIN": "go1.24.5" } + }, + "typescript": { + "command": "typescript-language-server", + "args": ["--stdio"] + } } } ``` -### Disable Skills +- `command` (required), `args`, `env` cover most setups. +- Additional fields: `disabled`, `filetypes`, `root_markers`, `init_options`, `options`, `timeout`. + +## MCP Servers ```json { - "options": { - "disabled_skills": ["crush-config"] + "mcp": { + "filesystem": { + "type": "stdio", + "command": "node", + "args": ["/path/to/mcp-server.js"] + }, + "github": { + "type": "http", + "url": "https://api.githubcopilot.com/mcp/", + "headers": { + "Authorization": "Bearer $GH_PAT" + } + } } } ``` -`disabled_skills` disables skills by name, including both builtin skills and -skills discovered from disk paths. +- `type` (required): `stdio`, `sse`, or `http` +- Additional fields: `env`, `disabled`, `disabled_tools`, `timeout`. -### Debug Options +## Options ```json { "options": { - "debug": true, - "debug_lsp": true + "skills_paths": ["./skills"], + "disabled_tools": ["bash", "sourcegraph"], + "disabled_skills": ["crush-config"], + "tui": { + "compact_mode": false, + "diff_mode": "unified", + "transparent": false + }, + "auto_lsp": true, + "debug": false, + "debug_lsp": false, + "attribution": { + "trailer_style": "assisted-by", + "generated_with": true + } } } ``` -### Attribution Settings +> [!IMPORTANT] +> The following skill paths are loaded by default and DO NOT NEED to be added to `skills_paths`: +> `.agents/skills`, `.crush/skills`, `.claude/skills`, `.cursor/skills` + +Other options: `context_paths`, `progress`, `disable_notifications`, `disable_auto_summarize`, `disable_metrics`, `disable_provider_auto_update`, `disable_default_providers`, `data_directory`, `initialize_as`. + +## Tool Permissions ```json { - "options": { - "attribution": { - "trailer_style": "assisted-by", - "generated_with": true - } + "permissions": { + "allowed_tools": ["view", "ls", "grep", "edit"] } } ``` @@ -167,9 +170,3 @@ skills discovered from disk paths. - `CRUSH_GLOBAL_CONFIG` - Override global config location - `CRUSH_GLOBAL_DATA` - Override data directory location - `CRUSH_SKILLS_DIR` - Override default skills directory - -## Provider Types - -- `openai` - For OpenAI or OpenAI-compatible APIs that route through OpenAI -- `openai-compat` - For non-OpenAI providers with OpenAI-compatible APIs -- `anthropic` - For Anthropic-compatible APIs