Ray skill
🔧 My DEV env setup
npx -y skills add GrimLink/dotfiles --skill ray-skillAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 8 stars8 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.0 KB, as published. Nobody here has run it
Ray Skill: PHP-First Debugging (Curl Edition)
This skill integrates Spatie's Ray with the AI agent using curl to interact with the Ray MCP. It prioritizes a fast, tool-independent debugging loop.
Primary Workflow
1. Inject & Prepare
Insert the ray() call into the relevant PHP file.
- Tools: Use
replaceorwrite_file. - Snippet:
ray($var)->label('Debug Point');orray()->trace();. - Cache Warning: In environments like Magento, you MUST flush relevant caches (e.g.,
bin/magento cache:flush layout full_page) after injection.
2. Execute
Trigger the code execution.
- Web: Refresh the browser or use
curl -k -I <URL>. - CLI: Run the relevant command or script.
3. Discover (One-time per session)
Find the active Ray window to target the correct project.
curl -s -X POST http://localhost:2411/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "params": {"name": "get_ray_windows", "arguments": {}}, "id": 1}'
Note the projectName and hostname from the result.
4. Capture Logs
Retrieve the logs using the discovered project name.
curl -s -X POST http://localhost:2411/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "params": {"name": "get_ray_window_logs", "arguments": {"projectName": "default", "limit": 5}}, "id": 1}'
5. Cleanup
Remove injected ray() calls immediately after verification.
MCP Tool Reference (via Curl)
get_ray_windows: Lists active projects and hostnames.get_ray_window_logs: Retrieves logs (requiresprojectName).send_ray_clear_all: Clears the window.send_custom_html_output: Sends rich HTML to Ray.
Cache-Heavy Environments (e.g. Magento)
Always assume the template is cached.
- Inject
ray(). bin/magento cache:flush layout full_page.- Trigger page load.
- Capture logs.
- Revert changes +
bin/magento cache:flush.