How this skill is triggered — by the user, by Claude, or both
Slash command
/codeweaver:setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!--
name: codeweaver-setup version: 1.0.0 description: Reconfigure CodeWeaver settings (provider, credentials, repository) trigger: command commands:
You are helping a user reconfigure their CodeWeaver installation. This might be because:
Guide the user through updating their CodeWeaver configuration. Be efficient since they've likely been through this before.
Start with a brief greeting and ask what they want to change:
Let's reconfigure CodeWeaver.
What would you like to update?
1. Embedding provider (switch between Voyage/FastEmbed/other)
2. API credentials (update or add API key)
3. Repository/project path
4. All of the above (fresh setup)
Enter the number or describe what you need.
Based on their response, skip to the relevant section(s) below.
If they want to change providers:
Current Options:
Which provider would you like to use? (voyage/fastembed)
If switching TO Voyage from FastEmbed, proceed to step 3 (API key). If switching FROM Voyage to FastEmbed, offer to remove the old API key.
If they need to update credentials:
For Voyage AI:
Enter your Voyage AI API key (get one at https://voyage.ai):
Validation: Test the key before saving by assigning it inline so it doesn't need to be exported first:
VOYAGE_API_KEY="<key-provided-by-user>" \
curl --fail-with-body -sS \
-H "Authorization: Bearer ${VOYAGE_API_KEY}" \
-H "Content-Type: application/json" \
https://api.voyageai.com/v1/models
If valid, update userConfig. If invalid, explain and ask to retry.
For FastEmbed:
FastEmbed doesn't require an API key - it runs locally.
If they need to change the repository:
# Detect current git root
git rev-parse --show-toplevel 2>/dev/null || pwd
Ask for confirmation or new path:
Current repository: {repo_path}
Would you like to use a different path? (yes/no)
If yes:
Enter the full path to your repository:
Validate the path exists and is accessible.
After any configuration change, ask about reindexing:
Configuration updated!
Would you like me to reindex your repository now?
(Recommended after changing providers or repositories)
(yes/no)
If yes, trigger an explicit reindex (using --standalone to force indexing regardless of whether the server is running):
cw index --standalone --project {repo_path}
Show progress and results.
After changes, test that everything works:
Testing the new configuration...
Run a simple search:
find_code("function definition")
If successful:
✓ Configuration updated successfully!
Your new settings:
- Provider: {provider_name}
- Repository: {repo_path}
- Status: Ready
CodeWeaver is working correctly with your new configuration.
Write the configured flag if it doesn't already exist (handles both fresh setup and retry after a failed initial onboarding):
mkdir -p "${CLAUDE_PLUGIN_DATA}/state/codeweaver"
touch "${CLAUDE_PLUGIN_DATA}/state/codeweaver/.configured"
Then confirm success:
🎉 Setup complete!
Need to change anything else? Run /codeweaver:setup again anytime.
Users might only want to change one thing. Support these scenarios:
Update API key only:
Change repository only:
Switch provider:
Handle common issues:
Invalid API key:
Repository path doesn't exist:
Indexing fails:
Search test fails:
cw doctorUser interrupts mid-setup: Safe to restart - changes are applied incrementally.
Multiple repositories: Offer to index the new one or switch between them.
Downgrade from Voyage to FastEmbed: Mention that local embeddings may have slightly different results, but this is normal.
API key expires: Clear messaging about getting a new key, link to provider.
Setup is successful when:
Mention related commands that might be useful:
Related commands:
- /codeweaver:setup - Run this setup again (you're here now)
- cw doctor - Diagnose configuration issues
- cw index --project {path} - Reindex manually
- cw status - Check if MCP server is running
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub knitli/toolshed --plugin codeweaver