### Install Dependencies and Validate Content Source: https://stevekinney.com/courses/ai-development/cursor-environment-configuration Use these commands to install project dependencies and validate the content. Ensure your environment is set up correctly before proceeding with edits. ```bash bun install bun run content:validate ``` -------------------------------- ### Subagent Prompt - Better Example Source: https://stevekinney.com/courses/ai-development/subagent-anti-patterns Provide specific instructions and expected output format for subagents. This example details the type of information and references required. ```text Ask a read-only subagent to inspect authentication tests. Return confirmed gaps only, with file references and the exact regression each test should cover. ``` -------------------------------- ### Verify Claude Code Setup Source: https://stevekinney.com/courses/ai-development/installing-claude-code Run these commands to verify that Claude Code is installed correctly and to check for common environment and authentication problems. ```bash claude --version ``` ```bash claude doctor ``` -------------------------------- ### Plan Implement Verify Prompt Pattern Example Source: https://stevekinney.com/courses/ai-development/plan-implement-verify Example of the Plan, Implement, Verify prompt structure. Use this pattern for tasks that touch multiple files, have security or data risk, require tests, or could be solved in multiple ways. ```text Goal: Add validation for expired invite tokens. Plan: First inspect the token validation path and the closest tests. Summarize the smallest implementation path before editing. Implement: Write the failing regression test first. Then make the smallest production change that passes it. Verify: Run bun test:unit -- src/lib/server/invitations.test.ts and bun run lint. Stop: If a command fails for an unrelated reason, stop and report the command, output, and likely cause instead of changing unrelated files. ``` -------------------------------- ### Cursor Project Configuration Files Source: https://stevekinney.com/courses/ai-development/installing-cursor Example structure for project-level Cursor configuration files, including rules and skills directories. ```text .cursor/ rules/ architecture.mdc testing.mdc mcp.json ``` -------------------------------- ### GitHub Actions Workflow Example Source: https://stevekinney.com/courses/ai-development/integrating-with-github-actions This example outlines a strategy for handling CI failures. It suggests opening a pull request only for test configuration issues, otherwise commenting with a diagnosis and the failing command. ```text When CI fails, inspect the failing job. Open a pull request only if the fix is confined to test configuration. Otherwise, comment with the diagnosis and the failing command. ``` -------------------------------- ### Skill Example Source: https://stevekinney.com/courses/ai-development/cursor-skills Demonstrates a procedural skill for executing a defined workflow. ```text Run the release readiness process and produce the shipping checklist. ``` -------------------------------- ### Example Automation Prompt Source: https://stevekinney.com/courses/ai-development/cursor-automations This example outlines the conditions and actions for an automation triggered by a failed workflow run on the main branch. It specifies when to open a pull request, what commands to run for verification, and when to report findings without making changes. ```text When a workflow run fails on the main branch, inspect the failing job logs and open a pull request only if the fix is confined to test configuration. Run bun run lint and the failing test command. If the failure is product code or requires a dependency change, report the diagnosis without editing files. ``` -------------------------------- ### Install Cursor CLI on Linux/macOS Source: https://stevekinney.com/courses/ai-development/installing-cursor Use this command to install the Cursor command-line interface on Linux or macOS systems. ```bash curl https://cursor.com/install -fsS | bash ``` -------------------------------- ### Install Cursor CLI on Windows Source: https://stevekinney.com/courses/ai-development/installing-cursor Use this PowerShell command to install the Cursor command-line interface on Windows systems. ```powershell irm 'https://cursor.com/install?win32=true' | iex ``` -------------------------------- ### Original Notepad Content Example Source: https://stevekinney.com/courses/ai-development/cursor-notepads This is an example of content that might have been stored in a deprecated Cursor Notepad. It outlines a set of actions to be taken when editing API routes. ```plaintext When editing API routes, use zod validation, return typed errors, update tests, and run bun test:unit. ``` -------------------------------- ### Example Permission Rules Source: https://stevekinney.com/courses/ai-development/claude-code-permissions Illustrates how to define specific rules for tool and parameter access. Use narrow rules for better control. ```plaintext Bash(bun test:*) Read(src/**) Edit(src/**) Agent(model:opus) ``` -------------------------------- ### Rule Example Source: https://stevekinney.com/courses/ai-development/cursor-skills Illustrates a simple constraint-based rule for agent behavior. ```text Always add regression tests for bug fixes. ``` -------------------------------- ### Subagent Prompt - Bad Example Source: https://stevekinney.com/courses/ai-development/subagent-anti-patterns Avoid vague prompts for subagents. This example shows a prompt that lacks specificity and a clear expected output. ```text Have a subagent look into this. ``` -------------------------------- ### Example Cloud Agent Prompt Structure Source: https://stevekinney.com/courses/ai-development/cursor-background-agents Use cloud prompts that define scope, verification, and stop conditions for agent tasks. This example specifies the exact files to update, acceptance criteria, and conditions for stopping the agent. ```plaintext Update the invite-token validation path only. Acceptance criteria: - Expired tokens return the same public error shape as revoked tokens. - A regression test fails before the implementation and passes afterward. - Run bun test:unit -- src/lib/server/invitations.test.ts and bun run lint. Stop and report the blocker if dependency installation fails or if an unrelated test failure appears. ``` -------------------------------- ### Install Claude Code via WinGet Source: https://stevekinney.com/courses/ai-development/installing-claude-code Install Claude Code using the WinGet package manager on Windows. ```powershell winget install Anthropic.ClaudeCode ``` -------------------------------- ### Plan Mode for Decision Making Source: https://stevekinney.com/courses/ai-development/claude-code-thinking Use plan mode to force decisions into the open before starting edits, especially when multiple design options exist. This prompt guides Claude to outline the smallest change and compare implementation paths without editing files. ```plaintext Plan the smallest change that adds account-level rate limits. Compare middleware and service-layer implementations. Name the files each path would touch. Do not edit files. ``` -------------------------------- ### Install Claude Code via Native Installer (macOS/Linux) Source: https://stevekinney.com/courses/ai-development/installing-claude-code Use this command to install Claude Code on macOS and Linux systems using the native installer script. ```bash curl -fsSL https://claude.ai/install.sh | bash ``` -------------------------------- ### Cursor Skill File Structure Source: https://stevekinney.com/courses/ai-development/installing-cursor Example structure for a Cursor skill file within the project's .cursor/skills directory. ```text .cursor/ skills/ release-checklist/ SKILL.md ``` -------------------------------- ### Start Interactive Agent Session Source: https://stevekinney.com/courses/ai-development/cursor-cli Run 'agent' within a repository to start an interactive terminal session. This mode supports Agent, Plan, and Ask modes, and allows resuming or continuing previous sessions. ```bash agent ``` -------------------------------- ### Install Claude Code via Native Installer (Windows PowerShell) Source: https://stevekinney.com/courses/ai-development/installing-claude-code Use this command to install Claude Code on Windows systems using PowerShell. ```powershell irm https://claude.ai/install.ps1 | iex ``` -------------------------------- ### Migrate Notepad Content to Project Rule Source: https://stevekinney.com/courses/ai-development/cursor-notepads Transform Notepad content into a scoped project rule by defining its description, applicable file globs, and applying it when necessary. This example shows how to convert a general instruction into a specific rule for API route validation. ```yaml --- description: API route testing and validation expectations. globs: - 'src/routes/api/**/*.ts' alwaysApply: false --- When editing API routes, validate inputs at the boundary, return the existing typed error shape, update the closest regression test, and run the targeted unit test command before reporting completion. ``` -------------------------------- ### Example Project Rule Configuration Source: https://stevekinney.com/courses/ai-development/cursor-rules This rule applies to server-side TypeScript files. It mandates updating or adding the closest unit test before implementation and running specific commands before reporting completion. Set 'alwaysApply' to false for intelligent application. ```yaml --- description: Testing expectations for server-side TypeScript changes. globs: - 'src/**/*.ts' alwaysApply: false --- When changing server-side TypeScript, update or add the closest unit test before implementation. Run the targeted test command and the repository lint command before reporting completion. ``` -------------------------------- ### Install Claude Code via Homebrew Source: https://stevekinney.com/courses/ai-development/installing-claude-code Install Claude Code using the Homebrew package manager on macOS. ```bash brew install --cask claude-code ``` -------------------------------- ### Security Review Prompt Example Source: https://stevekinney.com/courses/ai-development/cursor-bugbot-and-security-review When using Security Agents, specify the threat model to focus the review on specific risks like authorization bypasses and secret exposure. Ignore style issues and cite exact files for fixes. ```text Review this pull request for authorization bypasses and secret exposure. Ignore style issues. Cite exact files and propose the smallest fix for confirmed security issues. ``` -------------------------------- ### Agent Mode Prompt Example Source: https://stevekinney.com/courses/ai-development/interacting-with-cursor Agent mode can search the repository, read and edit files, run shell commands, and use configured tools. Provide a verifiable finish line for the agent's task, including steps like writing tests, implementing fixes, and running verification commands. ```plaintext Add validation for invalid invite tokens. Write the failing test first, implement the fix, then run the targeted test and the repository lint command. Stop if either command fails for an unrelated reason. ``` -------------------------------- ### Approve Plan Handoff Source: https://stevekinney.com/courses/ai-development/claude-code-plan-mode This is an example of a good handoff for implementing a plan, specifying which option to use, the order of operations, and stop conditions. ```plaintext Implement option B only. Write the regression test first. Run the targeted test and bun run lint. Stop on unrelated failures. ``` -------------------------------- ### Git and Bun Commands for Version Control Source: https://stevekinney.com/courses/ai-development/cursor-checkpoints Use these commands to manage your project's version control and run tests. Ensure your working tree is clean before starting risky agent tasks. ```bash git status --short ``` ```bash git diff ``` ```bash bun run lint ``` ```bash bun run test:unit ``` -------------------------------- ### Prompt for Environment Verification Source: https://stevekinney.com/courses/ai-development/cursor-environment-configuration Instruct the agent to verify the cloud environment before making edits. This prevents debugging in a broken setup. ```plaintext Before editing, verify the cloud environment by running bun run content:validate. If setup fails, stop and report the failing command and output. ``` -------------------------------- ### Plan Mode Prompt Example Source: https://stevekinney.com/courses/ai-development/interacting-with-cursor Plan mode is for research before edits, especially when a request involves multiple designs, unknown files, or security implications. Name the decision you need and specify the desired output, such as comparing implementation paths and listing touched files. ```plaintext Plan the smallest change that adds Slack notifications to failed imports. Compare the two likely implementation paths and list the files each path touches. Do not edit files. ``` -------------------------------- ### Add and Inspect MCP Servers via CLI Source: https://stevekinney.com/courses/ai-development/claude-code-mcp Use these CLI commands to manage MCP servers. The `add` command is for adding new servers, `list` to view existing ones, `get` for details, and `remove` to delete them. ```bash claude mcp add ``` ```bash claude mcp list ``` ```bash claude mcp get ``` ```bash claude mcp remove ``` -------------------------------- ### Chat Prompt Example Source: https://stevekinney.com/courses/ai-development/interacting-with-cursor Chat is useful for questions, debugging, and design discussions. It can use open files, selected code, and documentation references. Ask for citations when you need to understand the source of an answer. ```plaintext Explain how authentication is wired in this project. Use file references and do not propose changes yet. ``` -------------------------------- ### Dated Model Selection Claim Example Source: https://stevekinney.com/courses/ai-development/cursor-model-selection When documenting model selection rules, date the claim to ensure its relevance over time, as model availability and provider routing change frequently. ```text As of 2026-06-23, use Cursor Auto for default implementation work and escalate to the strongest available reasoning model for architecture reviews. ``` -------------------------------- ### Prompting Tool Use Restrictions Source: https://stevekinney.com/courses/ai-development/claude-code-mcp Explicitly define the scope and limitations of tool usage within prompts to ensure security and prevent unintended actions. This example restricts the GitHub MCP server to read-only operations. ```plaintext Use the GitHub MCP server only to read the pull request checks and comments. Do not post comments or update labels. ``` -------------------------------- ### Background Subagent Return Format Source: https://stevekinney.com/courses/ai-development/cursor-subagents When using background subagents, specify a clear return format to ensure parallel work provides value. This example defines the expected return content. ```text Return only: findings, file references, and whether the main task should stop. ``` -------------------------------- ### Specifying Relevant Context and Goal in Cursor Source: https://stevekinney.com/courses/ai-development/cursor-context Use a short context contract at the top of prompts to define relevant files, existing tests, rules, and the specific goal. This saves search time and guides the model on which evidence to prioritize. ```markdown Relevant context: - The public API is in @src/lib/server/invitations.ts. - Existing validation tests are in @src/lib/server/invitations.test.ts. - Follow @.cursor/rules/testing.mdc. Goal: Reject expired invite tokens with the same error shape used by revoked tokens. ``` -------------------------------- ### Example of a Denied Action Message Source: https://stevekinney.com/courses/ai-development/claude-code-hook-control-flow When a hook blocks an action, provide a clear and precise message in stderr to inform the agent and human user about the reason and the next steps. ```text Denied: generated files under applications/website/.generated must not be edited directly. Change the source generator and rerun the content build. ``` -------------------------------- ### Inline Edit Prompt Example Source: https://stevekinney.com/courses/ai-development/interacting-with-cursor Use inline edit for surgical changes to selected code. Prompts should be narrow and specific to the selected code block. ```plaintext Convert this function to return a discriminated union. Do not change the call sites. ``` -------------------------------- ### Investigative Shell Commands Source: https://stevekinney.com/courses/ai-development/claude-code-and-bash-scripts Provides examples of safe, bounded commands suitable for investigation. These commands are designed to be non-destructive and provide specific information without hanging or mutating broad state. ```bash rg "expired token" src tests ``` ```bash git status --short ``` ```bash bun test src/lib/server/invitations.test.ts ``` -------------------------------- ### Custom Subagent Definition Source: https://stevekinney.com/courses/ai-development/cursor-subagents Define a custom subagent by specifying its name, description, model, and read-only status. This example shows a 'test-auditor' agent. ```yaml --- name: test-auditor description: Find missing regression coverage for a described bug. model: auto readonly: true --- Inspect the changed files and closest tests. Report missing coverage with file references. Do not edit files. ``` -------------------------------- ### TDD Prompt for Claude Code Source: https://stevekinney.com/courses/ai-development/test-driven-development-with-claude Use this prompt structure to guide Claude Code through a TDD workflow. It clearly defines the bug, the task (write failing test, then implement smallest fix), and verification steps. ```plaintext Bug: Expired invite tokens are accepted. Task: Write the failing regression test first in the closest test file. Then implement the smallest production change that makes it pass. Verification: Run bun test:unit -- src/lib/server/invitations.test.ts and bun run lint. Stop: If either command fails for an unrelated reason, stop and report the failure instead of editing unrelated files. ``` -------------------------------- ### Initial Repository Orientation Request Source: https://stevekinney.com/courses/ai-development/claude-code-session-management Use this read-only request for new repositories to gauge Claude's understanding of build, test, lint, and release commands. Ensure Claude does not invent commands and cite the files used. ```text Read this repository and summarize the build, test, lint, and release commands. Do not edit files. Cite the files you used. ``` -------------------------------- ### Enter Plan Mode Prompt Source: https://stevekinney.com/courses/ai-development/claude-code-plan-mode Use this prompt to initiate plan mode for researching and comparing implementation options without editing files. ```plaintext Enter plan mode. Research the smallest safe way to add refresh-token rotation. Compare at most two implementation paths. Do not edit files. ``` -------------------------------- ### Targeted Prompt with File References Source: https://stevekinney.com/courses/ai-development/cost-management Use file references and specify relevant files to keep context small and focused. Avoid scanning unrelated routes unless necessary for implementation. ```plaintext Read @src/lib/server/invitations.ts and the closest tests. Do not scan unrelated routes unless the implementation requires it. ``` -------------------------------- ### Project Instructions in CLAUDE.md Source: https://stevekinney.com/courses/ai-development/claude-dot-md Defines durable project guidance, including package management and linting steps. Keep this file concise and link to deeper documentation. ```markdown # Project Instructions - Use Bun for package management. - Run `bun run lint` and the closest test before reporting completion. - Do not edit generated files directly. ``` -------------------------------- ### Importing AGENTS.md in CLAUDE.md Source: https://stevekinney.com/courses/ai-development/claude-dot-md Demonstrates how to import other files like AGENTS.md when Claude Code does not read them directly. This ensures a single shared instruction source. ```markdown @AGENTS.md ``` -------------------------------- ### Minimal Skill Configuration Source: https://stevekinney.com/courses/ai-development/cursor-skills Provides the essential metadata for a Cursor Skill, including its name and a brief description of its purpose. ```yaml --- name: release-check description: Verify package release readiness before publishing. --- Read the package manifest, changelog, generated exports, and test commands. Run the documented verification commands. Stop and report the exact blocker if a command fails. ``` -------------------------------- ### Preserve Compaction State with Pre-Compact Hook Source: https://stevekinney.com/courses/ai-development/claude-code-hook-examples Utilize a pre-compact hook to write a status file containing goal, changed files, completed checks, remaining checks, and blockers. This serves as a safety net for long sessions and should not be the sole state store. ```text goal, changed files, completed checks, remaining checks, blockers ``` -------------------------------- ### OAuth-backed MCP Server Login/Logout CLI Source: https://stevekinney.com/courses/ai-development/claude-code-mcp Commands for managing authentication with OAuth-backed MCP servers. Use `login` to authenticate and `logout` to end the session. ```bash claude mcp login ``` ```bash claude mcp logout ``` -------------------------------- ### Session Handoff: Git Status and Diffs Source: https://stevekinney.com/courses/ai-development/claude-code-session-management When transitioning work between Claude Code and other tools, summarize the filesystem state using git commands. This allows the next tool to continue from the current branch, tests, and files. ```shell git status --short ``` ```shell git diff --stat ``` ```shell git diff ``` -------------------------------- ### Fallback Model Configuration Source: https://stevekinney.com/courses/ai-development/claude-code-model-selection Configure fallback models to ensure reliability. Fallbacks should preserve task intent and not silently downgrade critical reviews. ```bash claude --model opus --fallback-model sonnet ``` -------------------------------- ### Import Instructions from Other Files in Claude Code Source: https://stevekinney.com/courses/ai-development/referencing-files-in-claude-code Use `@path` references within `CLAUDE.md` files to import shared instructions from other Markdown files. This avoids duplicating guidance across multiple documents. ```markdown @AGENTS.md @docs/testing.md ``` -------------------------------- ### Default Model Alias Configuration Source: https://stevekinney.com/courses/ai-development/claude-code-model-selection Use 'sonnet' for routine tasks and 'opusplan' for planning complex changes. Specify the alias and date for reproducibility. ```text As of 2026-06-23, use `sonnet` for routine implementation and `opusplan` for planning complex changes before execution. ``` -------------------------------- ### Scoped Rule with Paths Source: https://stevekinney.com/courses/ai-development/claude-dot-md Illustrates how to define rules with frontmatter, such as 'paths', to attach the rule to relevant files. API routes must validate input at the boundary. ```yaml --- paths: - 'src/routes/api/**/*.ts' --- API routes must validate input at the boundary and return the shared error shape. ``` -------------------------------- ### Manage Agent Sessions Source: https://stevekinney.com/courses/ai-development/cursor-cli Useful commands for managing interactive agent sessions, including listing available sessions, resuming a previous session, or continuing the latest one. ```bash agent ls ``` ```bash agent resume ``` ```bash agent --continue ``` -------------------------------- ### Execute Agent Request with Cloud Hand-off Source: https://stevekinney.com/courses/ai-development/cursor-cli Prepend '&' to an agent request to hand off the task to the cloud. This is useful for longer-running or more intensive agent operations. ```bash & refactor the auth module ``` -------------------------------- ### Skill Folder Structure Source: https://stevekinney.com/courses/ai-development/cursor-skills Defines the standard directory layout for a project skill, including SKILL.md, scripts, references, and assets. ```tree .cursor/skills/ release-check/ SKILL.md scripts/ references/ assets/ ``` -------------------------------- ### List Existing Git Worktrees Source: https://stevekinney.com/courses/ai-development/git-worktrees Displays all active Git worktrees for the current repository. ```git git worktree list ``` -------------------------------- ### Custom Command File Path Source: https://stevekinney.com/courses/ai-development/claude-code-commands This is the file path for a custom command in older Claude Code lesson formats. ```text .claude/commands/review.md ``` -------------------------------- ### Using Opus Planning Alias Source: https://stevekinney.com/courses/ai-development/claude-code-thinking The `opusplan` alias is recommended for larger changes as it uses the more capable Opus model for planning and a less expensive model for implementation. Always review the plan before proceeding with edits. ```plaintext Use opusplan. Produce the plan first and wait for approval before editing. ``` -------------------------------- ### Automation Pattern with Print Mode Source: https://stevekinney.com/courses/ai-development/cursor-cli Utilize print mode for specific, narrow checks like code review. Output findings with file paths as requested. Avoid building hidden release systems; use agent for reasoning about results of script-driven processes. ```bash agent -p "Review this diff for missing tests. Output only findings with file paths." ``` -------------------------------- ### Navigate and Run Agent in Worktree Source: https://stevekinney.com/courses/ai-development/git-worktrees Changes the directory to the worktree and executes an agent command. This isolates agent activity to the worktree's branch. ```bash cd ../project-feature claude ``` ```bash agent ``` -------------------------------- ### Reference Directories in Claude Code Source: https://stevekinney.com/courses/ai-development/referencing-files-in-claude-code Use `@` followed by a directory path to inspect conventions or patterns within a specific directory. This is helpful for understanding project structure and established practices. ```markdown Inspect @src/routes/api/ for existing error response conventions. ``` -------------------------------- ### Run Targeted Test Command Source: https://stevekinney.com/courses/ai-development/claude-code-and-bash-scripts Instructs Claude to execute a specific test command from package.json. If the test fails, it should report the command and failure before proceeding to edit files. This ensures repeatable testing and clear error reporting. ```bash Run the targeted test command from package.json. If it fails, report the command and failure before editing files. ``` -------------------------------- ### Bugbot Review Guidance Source: https://stevekinney.com/courses/ai-development/cursor-bugbot-and-security-review Follow up on Bugbot findings by verifying issues in the code and closest tests. Fix only confirmed issues and explain why invalid findings are dismissed. ```text For each Bugbot finding, verify whether the issue is real by reading the changed code and the closest tests. Fix only confirmed issues. If a finding is invalid, explain why with file references. ``` -------------------------------- ### Asking Specific Tradeoff Questions Source: https://stevekinney.com/courses/ai-development/claude-code-thinking Instead of vague requests, ask specific tradeoff questions that give Claude a clear task for its reasoning. This prompt asks for implementation paths, failure modes, and verification commands. ```plaintext List the two smallest implementation paths, the failure modes of each, and the verification command that would prove the chosen path works. ``` -------------------------------- ### Warn on Dangerous Bash Commands Source: https://stevekinney.com/courses/ai-development/claude-code-hook-examples Implement a permission or pre-tool hook to require user approval for potentially destructive bash commands like deploy, delete, or force-push. The hook blocks the command and provides a specific reason for denial. ```text Denied: command matches a production deployment pattern. Ask the user for explicit approval with the exact command. ``` -------------------------------- ### Run Prompt in Print Mode Source: https://stevekinney.com/courses/ai-development/cursor-cli Execute a single prompt and exit using the '-p' flag. This mode is safest for read-only operations. Explicitly use documented flags for file modification and ensure a clean working tree. ```bash agent -p "Summarize the staged diff and list test gaps." ``` -------------------------------- ### Explicit Explanation for Dangerous Operations Source: https://stevekinney.com/courses/ai-development/claude-code-and-bash-scripts Requires an explicit explanation and user approval before executing commands that delete files, change branches, or write to external services. This ensures safety and prevents accidental data loss or unintended side effects. ```bash Before running any command that deletes files, changes branches, or writes to an external service, explain the command and wait for approval. ``` -------------------------------- ### Custom Agent Configuration Source: https://stevekinney.com/courses/ai-development/claude-code-sub-agents Defines a custom agent named 'regression-finder' with specific tools, model, and permission mode. Use this to configure agents for specialized tasks. ```yaml --- name: regression-finder description: Find the closest missing regression test for a described bug. tools: - Read - Grep - Glob model: sonnet permissionMode: plan --- Inspect the changed files and closest tests. Return missing coverage with file references. Do not edit files. ``` -------------------------------- ### Execute External Script Hook Source: https://stevekinney.com/courses/ai-development/cursor-hooks Use this pattern to delegate complex logic to an external script. The hook itself remains simple, focusing on the integration point. Ensure the script is checked into your repository if it needs to run in Cloud Agents. ```shell bun scripts/check-generated-file-edit.ts "$CURSOR_FILE" ``` -------------------------------- ### Cursor MCP Configuration Files Source: https://stevekinney.com/courses/ai-development/mcp-for-claude-code-and-cursor These are the default locations for Cursor's MCP configuration files. ```plaintext .cursor/mcp.json ``` ```plaintext ~/.cursor/mcp.json ``` -------------------------------- ### Reference Images with File Context in Claude Code Source: https://stevekinney.com/courses/ai-development/referencing-files-in-claude-code When working with visual elements like screenshots, tie the request back to specific files using `@path` references. This helps Claude understand the context of UI bugs or visual regressions. ```markdown Compare this screenshot to @src/lib/components/checkout-form.svelte. Fix the spacing regression and run the component test. ``` -------------------------------- ### Add a New Git Worktree Source: https://stevekinney.com/courses/ai-development/git-worktrees Creates a new working directory for a specified branch. Ensure the target directory does not already exist. ```git git worktree add ../project-feature feature/agent-experiment ``` -------------------------------- ### Request Citations for Investigation in Claude Code Source: https://stevekinney.com/courses/ai-development/referencing-files-in-claude-code For investigation tasks, explicitly ask Claude to cite the files and functions used in its explanation. This ensures transparency and allows for verification of the information provided. ```markdown Explain where billing webhooks are handled. Cite the files and functions you used. Do not edit files. ``` -------------------------------- ### Project-Scoped Claude Code MCP Configuration Source: https://stevekinney.com/courses/ai-development/mcp-for-claude-code-and-cursor For servers that are part of repository development, use a project-scoped configuration file. ```plaintext .mcp.json ``` -------------------------------- ### Run Cursor Agent in Print Mode Source: https://stevekinney.com/courses/ai-development/installing-cursor Execute the Cursor agent in print mode for automation tasks, such as reviewing staged changes. File modifications require explicit flags like --force or --yolo. ```bash agent -p "Review the staged changes for correctness." ``` -------------------------------- ### Prompt Claude After Compaction Source: https://stevekinney.com/courses/ai-development/claude-code-compaction After compacting a Claude Code session, use this prompt to have Claude restate the goal, changed files, remaining tasks, and verification commands. Ensure Claude does not edit files. ```plaintext Restate the goal, files changed, remaining tasks, and verification commands. Do not edit files. ``` -------------------------------- ### Reference Specific Files in Claude Code Source: https://stevekinney.com/courses/ai-development/referencing-files-in-claude-code Use `@` followed by the file path to explicitly tell Claude which files are relevant for a task. This is useful for tasks involving specific code logic or tests. ```markdown Read @src/lib/server/invitations.ts and @src/lib/server/invitations.test.ts. Add the missing expired-token regression test before editing production code. ``` -------------------------------- ### Prompting Claude to Show Failing Assertions Source: https://stevekinney.com/courses/ai-development/test-driven-development-with-claude Instruct Claude to run the test and display the failing assertion before modifying production code. This prevents the agent from writing tests that already pass. ```plaintext After writing the regression test, run it and show the failing assertion before changing production code. ``` -------------------------------- ### Claude Code Skill Structure Source: https://stevekinney.com/courses/ai-development/claude-code-commands This is the directory structure for a Claude Code Skill, which is the modern way to package reusable workflows. ```text .claude/skills/code-review/ SKILL.md ``` -------------------------------- ### Block Generated File Edits with PreToolUse Hook Source: https://stevekinney.com/courses/ai-development/claude-code-hook-examples Use a PreToolUse hook to prevent edits within generated directories. The hook triggers a script to deny modifications to files in these paths. ```json { "hooks": { "PreToolUse": [ { "matcher": "Edit|Write|MultiEdit", "hooks": [ { "type": "command", "command": "bun scripts/deny-generated-edits.ts" } ] } ] } } ``` -------------------------------- ### Remove a Git Worktree Source: https://stevekinney.com/courses/ai-development/git-worktrees Deletes a Git worktree and its associated working directory. Ensure you are not currently in the worktree being removed. ```git git worktree remove ../project-feature ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.