{"slug": "claude-crash-course-snippets", "title": "Claude Crash Course Snippets", "summary": "A developer shared a collection of Claude AI prompts and workflows for building a crypto price CLI tool, refactoring React code, and creating custom subagents for code review and commit messages. The snippets include instructions for fetching CoinGecko API data, adding a favorites feature with localStorage, and setting up Playwright for testing.", "body_md": "CLI Project Prompt \n\n```\nCreate a Node script(index.js) that fetches the top 5 crypto prices from the CoinGecko API and prints them in a clean table — name, current price, 24-hour change. Keep the code clean and organized.\n```\n\n Readability Refactor \n\n```\nRefactor this for readability and maintainability. Split it into\nfocused ES modules: an api module for the CoinGecko fetch, a format\nmodule for the price and change helpers, and a table module for the\nprinting. Keep the output identical and don't add any dependencies.\n```\n\n Config Coin Count \n\n```\nMake the number of coins configurable via a command line argument. Default to 5 if no argument is given. For example, `node index.js 10` should show the top 10.\n```\n\n Prop Drill Fix \n\n``` js\nLook at the @App.jsx file and let me know how we could refactor this project to not prop-drill the Homepage. What are your suggestions?\n```\n\n Favorites Feature \n\n```\nI want a favorites feature that let's us star coins from the list, filter to show only favorites, and persist with localStorage. How would you implement this?\n```\n\n Git Commit Message SKill \n\n```\nCreate a project-scoped skill called commit-msg. The workflow:\n\n1. Check that there are staged changes with git diff --staged. If nothing is staged, stop and tell me to stage first.\n2. Read the staged diff.\n3. Generate a commit message in this format:\n\n   type(scope): short subject\n\n   - bullet of what changed\n   - bullet of why\n\n4. Run git commit with that message.\n\nTypes: feat, fix, refactor, chore, docs, style, test. Subject under 60 characters. Body bullets optional but encouraged. Never include a Co-Authored-By trailer.\n\nTrigger when I say \"write a commit message\", \"generate a commit\", \"commit my changes\", or run /commit-msg.\n```\n\n Playwirght MCP Install \n\n```\nclaude mcp add -s user playwright -- npx @playwright/mcp@latest\n```\n\n Playwright Test \n\n```\nUse Playwright to open the project and then click the star icon on the first coin in the list. Then click the favorites filter. Tell me if the starred coin is the only one showing, and take a screenshot.\n```\n\n Use Explore Subagent \n\n```\nUse the Explore agent to map the data flow in this project. Where does the coin data come from? What components consume it? How does state move through the app after our recent refactor? Report back with a summary.\n```\n\n Custom Subagent \n\n```\nCreate a project-scoped subagent called code-reviewer. It should review the current uncommitted changes in this project and check for:\n\n- Dead code or unused imports\n- console.log statements left in\n- Missing key props on lists in React\n- Accessibility misses (missing alt text, missing aria labels on icon buttons)\n- Hardcoded values that should be env vars or constants\n- Anything that breaks the patterns in CLAUDE.md\n\nIt should produce a markdown report with findings, grouped by severity. It should NOT make any edits — just report.\n\nTrigger it when I say \"review my code\", \"run the reviewer\", or /code-reviewer.\n```\n\n", "url": "https://wpnews.pro/news/claude-crash-course-snippets", "canonical_source": "https://gist.github.com/bradtraversy/9937e0ecfc8a5b269ce6a885636670dc", "published_at": "2026-06-11 23:11:41+00:00", "updated_at": "2026-06-24 13:10:59.742685+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "large-language-models", "ai-tools", "ai-agents"], "entities": ["Claude", "CoinGecko", "Node.js", "React", "Playwright", "localStorage", "ES modules", "MCP"], "alternates": {"html": "https://wpnews.pro/news/claude-crash-course-snippets", "markdown": "https://wpnews.pro/news/claude-crash-course-snippets.md", "text": "https://wpnews.pro/news/claude-crash-course-snippets.txt", "jsonld": "https://wpnews.pro/news/claude-crash-course-snippets.jsonld"}}