### Example Questions for Claude Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Provides example questions to ask Claude about its capabilities, features, limitations, and specific workflows like MCP integration or Amazon Bedrock configuration. ```markdown > can Claude Code create pull requests? ``` ```markdown > how does Claude Code handle permissions? ``` ```markdown > what slash commands are available? ``` ```markdown > how do I use MCP with Claude Code? ``` ```markdown > how do I configure Claude Code for Amazon Bedrock? ``` ```markdown > what are the limitations of Claude Code? ``` -------------------------------- ### Start Claude Code Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Navigates to your project directory and starts the Claude Code interactive session. ```bash cd your-awesome-project claude ``` -------------------------------- ### Code Exploration Prompts Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Examples of prompts to guide Claude in exploring and understanding code, such as analyzing database schemas or identifying product trends. ```bash > analyze the database schema > build a dashboard showing products that are most frequently returned by our UK customers ``` -------------------------------- ### Project Navigation and Setup Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Shows the basic bash commands for navigating project directories and initiating the Claude Code tool. ```bash cd /path/to/project claude ``` -------------------------------- ### Setup Task Example: Reading Configuration Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/templates/prp_task.md An example of a setup task to read a Python configuration file, understand its structure, find specific patterns, and note implementation details like the use of pydantic. ```bash READ src/config/settings.py: - UNDERSTAND: Current configuration structure - FIND: Model configuration pattern - NOTE: Config uses pydantic BaseSettings ``` -------------------------------- ### Getting Help in Claude Code Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Instructions on how to access help resources within Claude Code and external community channels. ```markdown - Type `/help` or ask "how do I..." - Documentation: You're here! Browse other guides - Community: Join our [Discord](https://www.anthropic.com/discord) for tips and support ``` -------------------------------- ### Ask Claude Code About Project Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Examples of questions to ask Claude Code to understand your project's functionality, technologies, entry points, and folder structure. ```text > what does this project do? > what technologies does this project use? > where is the main entry point? > explain the folder structure ``` -------------------------------- ### Setup Task Example: Reading Tests Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/templates/prp_task.md An example of a setup task to read a Python test file, understand the testing patterns, find fixture setup approaches, and note the use of specific libraries like pytest-asyncio. ```bash READ tests/test_models.py: - UNDERSTAND: Test pattern for models - FIND: Fixture setup approach - NOTE: Uses pytest-asyncio for async tests ``` -------------------------------- ### Start Claude Code Session Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Initiates an interactive Claude Code session in your terminal. Navigate to your project directory first. ```bash cd /path/to/your/project claude ``` -------------------------------- ### Step-by-step Task Execution Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Provides examples of breaking down complex tasks into sequential steps for Claude Code to execute, such as database operations and API endpoint creation. ```bash > 1. create a new database table for user profiles > 2. create an API endpoint to get and update user profiles > 3. build a webpage that allows users to see and edit their information ``` -------------------------------- ### Install Claude Code Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Installs the Claude Code CLI globally using npm. Requires Node.js 18 or newer. ```bash npm install -g @anthropic-ai/claude-code ``` -------------------------------- ### Refactor Code Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Guides on refactoring legacy code to modern standards. Includes identifying deprecated usage, getting recommendations, applying changes safely, and verifying the refactoring. ```shell > find deprecated API usage in our codebase ``` ```shell > suggest how to refactor utils.js to use modern JavaScript features ``` ```shell > refactor utils.js to use ES2024 features while maintaining the same behavior ``` ```shell > run tests for the refactored code ``` -------------------------------- ### Command Chaining Example Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md Demonstrates how to chain multiple commands together for a streamlined development workflow, from project setup to pull request creation. ```bash /prime-core /prp-planning-create "feature description" /api-contract-define "using PRPs/feature-prd.md" /prp-base-create "using both previous files" /prp-base-execute PRPs/feature-implementation.md /smart-commit "feat: add new feature" /create-pr ``` -------------------------------- ### Correct Command Chaining Example Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md Illustrates the correct way to chain commands for a feature implementation, starting from planning and progressing through definition and creation. ```bash # RIGHT - each command builds on the previous /prp-planning-create "user authentication with social login" /api-contract-define "create API for authentication described in PRPs/user-auth-prd.md" /prp-base-create "implement authentication using PRPs/user-auth-prd.md and PRPs/contracts/user-auth-api-contract.md" ``` -------------------------------- ### Install Claude Code (Native) Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Installs Claude Code using a shell script. Supports macOS, Linux, WSL, and Windows PowerShell. ```sh curl -fsSL claude.ai/install.sh | bash ``` ```powershell irm https://claude.ai/install.ps1 | iex ``` -------------------------------- ### Essential Claude Code Commands Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md A table summarizing key Claude Code commands for daily use, including starting sessions, running one-time tasks, continuing conversations, Git operations, and exiting the tool. ```APIDOC Command: `claude` Description: Start interactive mode. Example: `claude` Command: `claude "task"` Description: Run a one-time task. Example: `claude "fix the build error"` Command: `claude -p "query"` Description: Run one-off query, then exit. Example: `claude -p "explain this function"` Command: `claude -c` Description: Continue most recent conversation. Example: `claude -c` Command: `claude -r` Description: Resume a previous conversation. Example: `claude -r` Command: `claude commit` Description: Create a Git commit. Example: `claude commit` Command: `/clear` Description: Clear conversation history. Example: `> /clear` Command: `/help` Description: Show available commands. Example: `> /help` Command: `exit` or Ctrl+C Description: Exit Claude Code. Example: `> exit` ``` -------------------------------- ### Image Analysis with Claude Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Learn how to provide images to Claude for analysis, including methods for adding images to the conversation and example prompts for image-related queries. ```markdown 1. Drag and drop an image into the Claude Code window 2. Copy an image and paste it into the CLI with ctrl+v (Do not use cmd+v) 3. Provide an image path to Claude. E.g., "Analyze this image: /path/to/your/image.png" ``` ```bash > What does this image show? > Describe the UI elements in this screenshot > Are there any problematic elements in this diagram? > Here's a screenshot of the error. What's causing it? > This is our current database schema. How should we modify it for the new feature? > Generate CSS to match this design mockup > What HTML structure would recreate this component? ``` -------------------------------- ### Quick Setup Command for GitHub App Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/github_actions.md This command initiates the setup process for the Claude GitHub app and required secrets, guiding the user through the necessary steps for integration. ```bash /install-github-app ``` -------------------------------- ### Common Claude Code Workflows Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Examples of advanced workflows supported by Claude Code, including refactoring, writing unit tests, updating documentation, and performing code reviews. ```text > refactor the authentication module to use async/await instead of callbacks > write unit tests for the calculator functions > update the README with installation instructions > review my changes and suggest improvements ``` -------------------------------- ### Start Claude Code in a Project Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Illustrates how to navigate to a project directory and start the Claude Code application. ```bash cd your-awesome-project claude ``` -------------------------------- ### JUnit 5 Test Example with AssertJ and Mockito Source: https://github.com/wirasm/prps-agentic-eng/blob/development/claude_md_files/CLAUDE-JAVA-GRADLE.md Provides an example of unit testing a UserService class using JUnit 5, AssertJ for fluent assertions, and Mockito for mocking dependencies. Includes setup, test cases for success and failure scenarios. ```java // JUnit 5 + AssertJ + Mockito import org.junit.jupiter.api.*; import static org.assertj.core.api.Assertions.*; import static org.mockito.Mockito.*; @DisplayName("UserService") class UserServiceTest { @Mock private UserRepository userRepository; @InjectMocks private UserService userService; @BeforeEach void setUp() { MockitoAnnotations.openMocks(this); } @Test @DisplayName("should return user when valid ID provided") void should_ReturnUser_When_ValidIdProvided() { // Given Long userId = 1L; User expectedUser = User.builder() .id(userId) .name("John Doe") .build(); when(userRepository.findById(userId)) .thenReturn(Optional.of(expectedUser)); // When Optional result = userService.findById(userId); // Then assertThat(result) .isPresent() .hasValue(expectedUser); verify(userRepository).findById(userId); } @Test @DisplayName("should throw exception when ID is null") void should_ThrowException_When_IdIsNull() { // When/Then assertThatThrownBy(() -> userService.findById(null)) .isInstanceOf(IllegalArgumentException.class) .hasMessage("User ID cannot be null"); } } ``` -------------------------------- ### Work with Tests Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md A guide to adding tests for uncovered code. Includes identifying untested code, generating test scaffolding, adding meaningful test cases, and running/verifying tests. ```shell > find functions in NotificationsService.swift that are not covered by tests ``` ```shell > add tests for the notification service ``` ```shell > add test cases for edge conditions in the notification service ``` ```shell > run the new tests and fix any failures ``` -------------------------------- ### Use Git with Claude Code Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Examples of conversational Git commands that can be used with Claude Code, such as checking changed files, committing, creating branches, viewing history, and resolving merge conflicts. ```text > what files have I changed? > commit my changes with a descriptive message > create a new branch called feature/quickstart > show me the last 5 commits > help me resolve merge conflicts ``` -------------------------------- ### Start Claude Code in a project Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Navigates to a project directory and starts the Claude Code application. ```bash cd your-awesome-project claude ``` -------------------------------- ### Start Claude Code in a Project Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Navigates to a project directory and starts the Claude Code application. ```bash cd your-awesome-project claude ``` -------------------------------- ### Pipe Data Through Claude Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Demonstrates piping data into Claude for processing and capturing the output. This example pipes build error information to Claude for root cause analysis. ```bash cat build-error.txt | claude -p 'concisely explain the root cause of this build error' > output.txt ``` -------------------------------- ### API Integration Test Example Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md An example of how to test backend API integration, specifically simulating a POST request to like a post. ```curl curl -X POST http://localhost:8000/api/posts/123/like ``` -------------------------------- ### Python SDK Basic Usage Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/build_with_claude_code.md Provides an example of using the Claude Code SDK in Python, including installation, prerequisites, and basic asynchronous query execution. It demonstrates how to collect and print messages from the SDK. ```bash pip install claude-code-sdk ``` ```python import anyio from claude_code_sdk import query, ClaudeCodeOptions, Message async def main(): messages: list[Message] = [] async for message in query( prompt="Write a haiku about foo.py", options=ClaudeCodeOptions(max_turns=3) ): messages.append(message) print(messages) anyio.run(main) ``` -------------------------------- ### Standard Installation of Claude Code Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Installs Claude Code globally using npm. It's recommended not to use sudo for installation. ```bash npm install -g @anthropic-ai/claude-code ``` -------------------------------- ### Install Claude Code Native Binary (macOS, Linux, WSL) Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Installs Claude Code using a shell script. Supports installing the stable, latest, or a specific version. ```bash # Install stable version (default) curl -fsSL https://claude.ai/install.sh | bash # Install latest version curl -fsSL https://claude.ai/install.sh | bash -s latest # Install specific version number curl -fsSL https://claude.ai/install.sh | bash -s 1.0.58 ``` -------------------------------- ### Native Binary Installation (macOS, Linux, WSL) Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Provides commands to install Claude Code using a native binary installation script via curl. Supports installing the stable, latest, or a specific version. ```bash # Install stable version (default) curl -fsSL https://claude.ai/install.sh | bash # Install latest version curl -fsSL https://claude.ai/install.sh | bash -s latest # Install specific version number curl -fsSL https://claude.ai/install.sh | bash -s 1.0.58 ``` -------------------------------- ### Native Binary Installation (macOS, Linux, WSL) Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Installs Claude Code using a native binary installation script via curl. Supports stable and latest versions. ```bash # Install stable version (default) curl -fsSL https://claude.ai/install.sh | bash # Install latest version curl -fsSL https://claude.ai/install.sh | bash -s latest ``` -------------------------------- ### Debugging Tools Installation and Usage Source: https://github.com/wirasm/prps-agentic-eng/blob/development/claude_md_files/CLAUDE-PYTHON-BASIC.md Shows how to install and use debugging tools like `ipdb`, `memory-profiler`, `line-profiler`, and `rich` for enhanced debugging capabilities. ```bash # Interactive debugging with ipdb # uv add --dev ipdb # Add breakpoint: import ipdb; ipdb.set_trace() # Memory profiling # uv add --dev memory-profiler # uv run python -m memory_profiler script.py # Line profiling # uv add --dev line-profiler # Add @profile decorator to functions # Debug with rich traceback # uv add --dev rich # In code: from rich.traceback import install; install() ``` -------------------------------- ### Install Claude Code via npm Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Shows the standard method for installing Claude Code globally using npm. It includes a warning against using sudo. ```sh npm install -g @anthropic-ai/claude-code ``` -------------------------------- ### Project Initialization and Onboarding Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md Commands for setting up the project environment and understanding its structure. `/prime-core` loads project context, while `/onboarding` provides an overview. ```bash /prime-core /onboarding ``` -------------------------------- ### Real Example: Like Button - Construction Manual Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md Creates a detailed construction manual for implementing the like button feature, integrating architectural plans and API specifications for step-by-step guidance. ```bash /prp-base-create "implement like button feature using architecture from PRPs/like-button-prd.md and API specifications from PRPs/contracts/like-button-api-contract.md" ``` -------------------------------- ### JSON Output Example Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/build_with_claude_code.md Example of requesting JSON output from Claude Code to get structured data and metadata. ```bash $ claude -p "How does the data layer work?" --output-format json ``` -------------------------------- ### Basic Claude Code Commands Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Demonstrates fundamental commands and interaction patterns for using Claude Code, including analyzing codebases, explaining components, and tracing processes. ```markdown > give me an overview of this codebase > explain the main architecture patterns used here > what are the key data models? > how is authentication handled? > find the files that handle user authentication > how do these authentication files work together? > trace the login process from front-end to database ``` -------------------------------- ### Command Usage Guide Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md Provides guidance on when to use various project commands, such as planning, defining API contracts, base creation, spec creation, and task creation. ```bash /prp-planning-create "vague idea" /api-contract-define "architectural plans" /prp-base-create "new feature" /prp-spec-create "modify existing code" /prp-task-create "small, focused change" /prp-task-execute /task-list-init ``` -------------------------------- ### Example Use Cases for Claude Code GitHub Actions Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/github_actions.md Demonstrates how to use Claude Code GitHub Actions for various development tasks like creating pull requests from issues, getting implementation help, and fixing bugs. These examples show the interaction patterns with Claude within GitHub issues and PRs. ```markdown @claude implement this feature based on the issue description ``` ```markdown @claude how should I implement user authentication for this endpoint? ``` ```markdown @claude fix the TypeError in the user dashboard component ``` -------------------------------- ### Ask Claude Code About Capabilities Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Questions to inquire about Claude Code's own features and how to use specific functionalities like slash commands or Docker integration. ```text > what can Claude Code do? > how do I use slash commands in Claude Code? > can Claude Code work with Docker? ``` -------------------------------- ### Real Example: Like Button - API Contract Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md Defines API contracts for the like button feature, specifying endpoints for liking, unliking, and analytics, along with real-time update mechanisms. ```bash /api-contract-define "create API contracts for the like button feature specified in PRPs/like-button-prd.md, including real-time updates and analytics" ``` -------------------------------- ### Real Example: Like Button - Master Architect Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md Initiates the architectural planning for a social media like button feature, including real-time updates and analytics. This generates a comprehensive PRD document. ```bash /prp-planning-create "social media like button with real-time updates and analytics tracking" ``` -------------------------------- ### Add Claude to Build Script Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Integrates Claude Code into a project's build script for automated linting or code review. This example shows how to add a 'lint:claude' script to package.json. ```json { "scripts": { "lint:claude": "claude -p 'you are a linter. please look at the changes vs. main and report any issues related to typos. report the filename and line number on one line, and a description of the issue on the second line. do not return any other text.'" } } ``` -------------------------------- ### Build New Feature: Implementation Plan Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md Creates a detailed implementation plan (construction manual) for a feature, using both architectural plans and API specifications. It includes step-by-step instructions and necessary context. ```bash /prp-base-create "implement user profile feature using PRPs/user-profile-prd.md architecture and PRPs/contracts/user-profile-api-contract.md specifications" ``` -------------------------------- ### Format TypeScript Files with Prettier Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/hooks.md This `PostToolUse` hook automatically formats TypeScript files after they are edited or written. It checks the file extension and applies `prettier --write` if it's a `.ts` file. ```json { "hooks": { "PostToolUse": [ { "matcher": "Edit|MultiEdit|Write", "hooks": [ { "type": "command", "command": "jq -r '.tool_input.file_path' | { read file_path; if echo \"$file_path\" | grep -q '\\.ts$' ; then npx prettier --write \"$file_path\"; fi; }" } ] } ] } } ``` -------------------------------- ### Create Pull Requests Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Steps for creating well-documented pull requests. Covers summarizing changes, generating a PR, refining the description, and adding testing details. ```shell > summarize the changes I've made to the authentication module ``` ```shell > create a pr ``` ```shell > enhance the PR description with more context about the security improvements ``` ```shell > add information about how these changes were tested ``` -------------------------------- ### Standard Installation of Claude Code Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Shows the command to install Claude Code globally using npm. It also includes a warning against using `sudo` and a note about potential automatic migration. ```bash npm install -g @anthropic-ai/claude-code cd your-awesome-project claude ``` -------------------------------- ### PreToolUse Hook Configuration for Bash Commands Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/hooks.md This JSON configuration sets up a `PreToolUse` hook that specifically targets 'Bash' tool calls. It registers a command to log the executed Bash command and its description. ```json { "hooks": { "PreToolUse": [ { "matcher": "Bash", "hooks": [ { "type": "command", "command": "jq -r '\"\(.tool_input.command) - \(.tool_input.description // \"No description\")\"' >> ~/.claude/bash-command-log.txt" } ] } ] } } ``` -------------------------------- ### Log Bash Commands with jq Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/hooks.md This hook logs the command and its description to a file whenever a Bash tool is used. It uses `jq` to parse the tool input and append the formatted string to `~/.claude/bash-command-log.txt`. ```bash jq -r '"\(.tool_input.command) - \(.tool_input.description // "No description")"' >> ~/.claude/bash-command-log.txt ``` -------------------------------- ### Desktop Notification for User Input Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/hooks.md This `Notification` hook triggers a desktop notification using `notify-send` whenever Claude Code requires user input. The matcher is empty, meaning it applies to all notification events. ```json { "hooks": { "Notification": [ { "matcher": "", "hooks": [ { "type": "command", "command": "notify-send 'Claude Code' 'Awaiting your input'" } ] } ] } } ``` -------------------------------- ### PRPs-agentic-eng Project Structure Source: https://github.com/wirasm/prps-agentic-eng/blob/development/CLAUDE.md This snippet outlines the directory and file structure of the PRPs-agentic-eng project. It highlights the locations of Claude commands, tool permissions, PRP templates, runner scripts, AI documentation, and framework-specific examples. ```plaintext PRPs-agentic-eng/ .claude/ commands/ # 28+ Claude Code commands settings.local.json # Tool permissions PRPs/ templates/ # PRP templates with validation scripts/ # PRP runner and utilities ai_docs/ # Curated Claude Code documentation *.md # Active and example PRPs claude_md_files/ # Framework-specific CLAUDE.md examples pyproject.toml # Python package configuration ``` -------------------------------- ### Handle Documentation Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Guidance on adding and updating code documentation. Includes identifying undocumented code, generating documentation, reviewing and enhancing it, and verifying its quality. ```shell > find functions without proper JSDoc comments in the auth module ``` ```shell > add JSDoc comments to the undocumented functions in auth.js ``` ```shell > improve the generated documentation with more context and examples ``` ```shell > check if the documentation follows our project standards ``` -------------------------------- ### Python Script for File Path Validation Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/hooks.md A Python script embedded within a command that reads JSON input from stdin. It extracts the 'file_path' from the 'tool_input' object and checks if it contains any of the specified sensitive file patterns. It returns an exit code of 2 if sensitive, and 0 otherwise. ```python import json, sys data=json.load(sys.stdin) path=data.get('tool_input',{}).get('file_path','') sys.exit(2 if any(p in path for p in ['.env', 'package-lock.json', '.git/']) else 0) ``` -------------------------------- ### Make a Code Change with Claude Code Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md A prompt to instruct Claude Code to add a 'hello world' function to a main file. Claude will find the file, propose changes, seek approval, and then make the edit. ```text > add a hello world function to the main file ``` -------------------------------- ### Install Claude Code (Native Installer) Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_deployment.md Installs the stable, latest, or a specific version of Claude Code using a native installer script. This method is recommended for macOS, Linux, WSL, and Windows PowerShell. ```bash # Install stable version (default) curl -fsSL https://claude.ai/install.sh | bash # Install latest version curl -fsSL https://claude.ai/install.sh | bash -s latest # Install specific version number curl -fsSL https://claude.ai/install.sh | bash -s 1.0.58 ``` ```powershell # Install stable version (default) irm https://claude.ai/install.ps1 | iex # Install latest version & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) latest # Install specific version number & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 1.0.58 ``` -------------------------------- ### File Protection Hook Configuration Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/hooks.md This JSON configuration defines a 'PreToolUse' hook that intercepts 'Edit', 'MultiEdit', or 'Write' commands. It executes a Python script to check if the target file path contains sensitive indicators like '.env', 'package-lock.json', or '.git/'. If sensitive, it exits with code 2, otherwise 0. ```json { "hooks": { "PreToolUse": [ { "matcher": "Edit|MultiEdit|Write", "hooks": [ { "type": "command", "command": "python3 -c \"import json, sys; data=json.load(sys.stdin); path=data.get('tool_input',{}).get('file_path',''); sys.exit(2 if any(p in path for p in ['.env', 'package-lock.json', '.git/']) else 0)\"" } ] } ] } } ``` -------------------------------- ### Native Binary Installation (Windows PowerShell) Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Provides PowerShell commands to install Claude Code using a native binary installation script via Invoke-RestMethod (irm). Supports installing the stable or latest version. ```powershell # Install stable version (default) irm https://claude.ai/install.ps1 | iex # Install latest version & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) latest ``` -------------------------------- ### Project Planning and Execution Workflow Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md This snippet outlines the typical workflow for developing a new feature using the project's commands. It starts with planning, moves to implementation, and concludes with execution. ```bash # 1. Plan the feature /prp-planning-create "website footer with copyright, privacy policy link, and contact link" # 2. Create implementation guide based on the plan /prp-base-create "implement footer using architecture from PRPs/website-footer-prd.md" # 3. Build the feature using the implementation guide /prp-base-execute PRPs/website-footer-implementation.md ``` -------------------------------- ### Native Claude Code Installation (Windows PowerShell) Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_deployment.md Installs the native version of Claude Code using a PowerShell script. Supports stable, latest, and specific version installations. Ensures the installation directory is in the system PATH. ```powershell # Install stable version (default) irm https://claude.ai/install.ps1 | iex # Install latest version & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) latest # Install specific version number & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 1.0.58 ``` -------------------------------- ### Claude Code Shortcuts Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Lists keyboard shortcuts for efficient use of Claude Code, including command completion, history access, and slash command discovery. ```markdown * Use Tab for command completion * Press ↑ for command history * Type `/` to see all slash commands ``` -------------------------------- ### Review and Refactoring Cadence Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md Recommendations for integrating code reviews and refactoring into the development cycle. ```bash # Before every commit: /review-staged-unstaged # Weekly for code health: /refactor-simple # Before PRs: /review-general ``` -------------------------------- ### Native Claude Code Installation (macOS, Linux, WSL) Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_deployment.md Installs the native version of Claude Code using a curl script. Supports stable, latest, and specific version installations. Ensures the installation directory is in the system PATH. ```bash # Install stable version (default) curl -fsSL https://claude.ai/install.sh | bash # Install latest version curl -fsSL https://claude.ai/install.sh | bash -s latest # Install specific version number curl -fsSL https://claude.ai/install.sh | bash -s 1.0.58 ``` -------------------------------- ### Development Environment Commands Source: https://github.com/wirasm/prps-agentic-eng/blob/development/claude_md_files/CLAUDE-PYTHON-BASIC.md Lists common development commands for running tests, code formatting, linting, type checking, and pre-commit hooks using UV. ```bash # Run all tests uv run pytest # Run specific tests with verbose output uv run pytest tests/test_module.py -v # Run tests with coverage uv run pytest --cov=src --cov-report=html # Format code uv run ruff format . # Check linting uv run ruff check . # Fix linting issues automatically uv run ruff check --fix . # Type checking uv run mypy src/ # Run pre-commit hooks uv run pre-commit run --all-files ``` -------------------------------- ### Install Claude Code (Linux/macOS) Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Installs Claude Code using a curl command. Supports installing a specific version number. ```bash curl -fsSL https://claude.ai/install.sh | bash -s 1.0.58 ``` -------------------------------- ### Install Claude Code (Windows PowerShell) Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Installs Claude Code using PowerShell. Supports installing the stable, latest, or a specific version number. ```powershell # Install stable version (default) irm https://claude.ai/install.ps1 | iex # Install latest version & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) latest # Install specific version number & ([scriptblock]::Create((irm https://claude.ps1))) 1.0.58 ``` -------------------------------- ### Parallel Processing Example Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md Illustrates the use of parallel commands for different phases of development to improve efficiency. ```bash # Research phase: /hackathon-research # Planning phase: /create-planning-parallel # Implementation: /create-base-prp-parallel ``` -------------------------------- ### Install Specific Version of Claude Code Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Installs a specific version of the Claude Code installer using PowerShell. This is useful for managing specific releases. ```powershell $([scriptblock]::Create((irm https://claude.ai/install.ps1))) 1.0.58 ``` -------------------------------- ### Install Claude Code Native Binary (Windows PowerShell) Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/cc_administration.md Installs Claude Code using PowerShell. Supports installing the stable, latest, or a specific version. ```powershell # Install stable version (default) irm https://claude.ai/install.ps1 | iex # Install latest version & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) latest # Install specific version number & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 1.0.58 ``` -------------------------------- ### Extended Thinking Prompts Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/ai_docs/getting_started.md Understand how to prompt Claude for in-depth reasoning on complex tasks, including initial prompts and follow-up refinements. ```bash > I need to implement a new authentication system using OAuth2 for our API. Think deeply about the best approach for implementing this in our codebase. > think about potential security vulnerabilities in this approach > think harder about edge cases we should handle ``` -------------------------------- ### Execute Like Button Implementation Source: https://github.com/wirasm/prps-agentic-eng/blob/development/README-for-DUMMIES.md Initiates the implementation of a like button feature by executing a predefined plan. This process involves multiple stages of development and quality checks. ```bash /prp-base-execute PRPs/like-button-implementation.md ``` -------------------------------- ### Project Setup and Task List Source: https://github.com/wirasm/prps-agentic-eng/blob/development/PRPs/example-from-workshop-mcp-crawl4ai-refactor-1.md Outlines the sequence of tasks for setting up the project, including environment configuration, module creation, and service implementation. Uses YAML for task definition and shell commands for setup. ```yaml Task 1 - Setup UV and pytest: DONT pyproject.toml: - ADD pytest and pytest-asyncio by running uv add pytest pytest-asyncio - ADD [tool.pytest.ini_options] section - ENSURE src/ layout configuration - ADD development dependencies group Task 2 - Create foundation structure: CREATE src/__init__.py: - Empty file to make src a package CREATE main.py: - MINIMAL entry point that imports and runs src.mcp_server CREATE src/conftest.py: - Shared pytest fixtures for all tests Task 3 - Create config module: CREATE src/config.py: - MOVE all os.getenv() calls from existing files - USE pydantic_settings.BaseSettings - VALIDATE all configuration values - PATTERN from: PRPs/ai_docs/refactor_plan.md lines 249-274 Task 4 - Create models module: CREATE src/models.py: - CONVERT Crawl4AIContext dataclass to Pydantic model - ADD all request/response models shown above - ENSURE all fields have proper validation Task 5 - Create MCP server module: CREATE src/mcp_server.py: - MOVE FastMCP initialization from crawl4ai_mcp.py - MOVE crawl4ai_lifespan function - IMPORT tools from tools package (will error until Phase 3) - NO business logic - just server setup Task 6 - Create services structure: CREATE src/services/__init__.py: - Empty file CREATE src/services/database.py: - MOVE get_supabase_client from utils.py - MOVE add_documents_to_supabase from utils.py - MOVE update_source_info from utils.py - MOVE add_code_examples_to_supabase from utils.py CREATE src/services/tests/test_database.py: - Unit tests for database operations Task 7 - Create embeddings service: CREATE src/services/embeddings.py: - MOVE create_embedding from utils.py - MOVE create_embeddings_batch from utils.py - MOVE generate_contextual_embedding from utils.py - MOVE process_chunk_with_context from utils.py CREATE src/services/tests/test_embeddings.py: - Unit tests for embedding operations Task 8 - Create search service: CREATE src/services/search.py: - MOVE search_documents from utils.py - MOVE search_code_examples from utils.py - INTEGRATE with reranking if enabled CREATE src/services/tests/test_search.py: - Unit tests for search operations Task 9 - Create crawling service: CREATE src/services/crawling.py: - MOVE all crawling logic from crawl4ai_mcp.py - MOVE is_sitemap, is_txt, parse_sitemap functions - MOVE crawl_batch, crawl_recursive_internal_links - MOVE extract_code_blocks, generate_code_example_summary from utils.py CREATE src/services/tests/test_crawling.py: - Unit tests for crawling operations Task 10 - Create utilities: CREATE src/utils/__init__.py: - Empty file CREATE src/utils/text_processing.py: - MOVE smart_chunk_markdown from crawl4ai_mcp.py - MOVE extract_section_info from crawl4ai_mcp.py CREATE src/utils/reranking.py: - MOVE rerank_results from crawl4ai_mcp.py CREATE src/utils/tests/: - Unit tests for utilities Task 11 - Create tools (Phase 3): CREATE src/tools/ structure: - One file per tool - Each tool is a thin wrapper calling services - Include tests for each tool Task 12 - Final cleanup: UPDATE imports throughout codebase DELETE src/crawl4ai_mcp.py DELETE src/utils.py RUN full test suite ```