### Environment Setup Installation Commands (Linux)
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/dev-guide-generator/SKILL.md
Provides an example of how to install a tool on Linux (Ubuntu/Debian) using apt, including a comment explaining the action.
```bash
**Linux (Ubuntu/Debian)**:
# Install xxx (via apt)
sudo apt update && sudo apt install -y xxx
```
--------------------------------
### Environment Setup Installation Commands (macOS)
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/dev-guide-generator/SKILL.md
Provides an example of how to install a tool on macOS using Homebrew, including a comment explaining the action.
```bash
**macOS**:
# Install xxx (via Homebrew)
brew install xxx
```
--------------------------------
### LLM Day 1 Onboarding Execution Example
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/test-suite-architect/references/master_qa_prompt.md
Illustrates the LLM's execution of the Day 1 onboarding checklist, including environment setup tasks like cloning a repository and installing dependencies.
```text
Reading: tests/docs/templates/DAY-1-ONBOARDING-CHECKLIST.md
Starting Hour 1: Environment Setup
Task 1.1: Clone repository
Executing: git clone https://github.com/your-org/project.git
Status: ✅ Complete
Task 1.2: Install dependencies
Executing: pnpm install
Status: ✅ Complete
[... continues through all 5 hours ...]
Day 1 Onboarding: ✅ COMPLETE
Ready to start Week 1 testing tomorrow.
```
--------------------------------
### Install SDK
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/code-documenter/references/user-guides-tutorials.md
Install the @myapi/sdk package using npm. This is the first step in the Quick Start guide.
```bash
npm install @myapi/sdk
```
--------------------------------
### Install and Start Apache on Linux
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/network-101/SKILL.md
Installs the Apache web server, starts the service, and enables it to run on boot. Verifies the installation by curling the default page.
```bash
sudo apt update && sudo apt install apache2
# Start service
sudo systemctl start apache2
sudo systemctl enable apache2
# Create test page
echo "
Test Page
" | sudo tee /var/www/html/index.html
# Verify service
curl http://localhost
```
--------------------------------
### Start Native Installer
Source: https://github.com/zebbern/claude-code-guide/blob/main/README.md
Launch the interactive native binary installer for faster startup and auto-updates. This method does not require Node.js.
```bash
# Start the native installer (interactive)
claude install
```
--------------------------------
### Example: Install Agent Locally
Source: https://github.com/zebbern/claude-code-guide/blob/main/agents/agent_installer.agent.md
Demonstrates the process of installing an agent to the local directory. It involves creating the directory if it doesn't exist and saving the agent file.
```bash
# Example of saving an agent file locally
# Assume .claude/agents/ does not exist yet
mkdir -p .claude/agents/
curl -s https://raw.githubusercontent.com/VoltAgent/awesome-claude-code-subagents/main/categories/Core%20Development/agent-installer.agent.md -o .claude/agents/agent-installer.agent.md
```
--------------------------------
### Example: Install Agent Globally
Source: https://github.com/zebbern/claude-code-guide/blob/main/agents/agent_installer.agent.md
Illustrates how to install an agent to the global agent directory. This is a common installation path for agents intended for system-wide use.
```bash
# Example of saving an agent file globally
curl -s https://raw.githubusercontent.com/VoltAgent/awesome-claude-code-subagents/main/categories/Core%20Development/agent-installer.agent.md -o ~/.claude/agents/agent-installer.agent.md
```
--------------------------------
### Install Dependencies and Onboard Skill
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/r2-upload/README.md
Installs project dependencies and runs the interactive onboarding process for the R2/S3 Upload Skill. This is the recommended setup method.
```bash
cd skills/r2-upload
pnpm install
pnpm run onboard
```
--------------------------------
### Example CLI Install Test Case
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/test-suite-architect/assets/templates/TEST-CASE-TEMPLATE.md
An example of a test case written using the template for installing a skill via the command-line interface. It details prerequisites, steps, expected results, and potential bugs.
```markdown
### TC-CLI-001: Install Skill from GitHub Repository
**Priority**: P0
**Type**: Integration
**Estimated Time**: 5 minutes
**Prerequisites**:
- CLI installed globally (`which ccpm` returns path)
- Internet connection active
- `~/.claude/skills/` directory exists or can be created
- No existing installation of `cli-demo-generator`
**Test Steps**:
1. Open terminal
2. Run: `ccpm install cli-demo-generator`
3. Observe success message
4. Run: `ls ~/.claude/skills/`
5. Verify directory exists
6. Run: `cat ~/.claude/skills/cli-demo-generator/package.json`
7. Verify valid JSON with name field
**Expected Result**:
✅ Terminal shows: "Successfully installed cli-demo-generator"
✅ Directory created: `~/.claude/skills/cli-demo-generator/`
✅ package.json exists with valid content
✅ No errors in terminal output
**Pass/Fail Criteria**:
- ✅ PASS: All 4 verification criteria met, exit code 0
- ❌ FAIL: Any error message, missing directory, or malformed package.json
**Potential Bugs to Watch For**:
- Path traversal vulnerability (test with `../../../etc/passwd`)
- Network timeout with no retry logic
- Incorrect permissions on `~/.claude` directory
- Race condition if multiple installs concurrent
```
--------------------------------
### Copy Example Configuration
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/r2-upload/README.md
Copies the example configuration file to the user's home directory for manual setup of the R2/S3 Upload Skill. The copied file should then be edited with specific credentials.
```bash
cp example-config.yml ~/.r2-upload.yml
# Edit ~/.r2-upload.yml with your credentials
```
--------------------------------
### Project Setup for User Dashboard
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/code-documenter/references/user-guides-tutorials.md
Set up a new project for the user dashboard tutorial by creating a directory, initializing npm, and installing necessary packages.
```bash
mkdir user-dashboard
cd user-dashboard
npm init -y
npm install @myapi/sdk react
```
--------------------------------
### Environment Verification Example
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/dev-guide-generator/SKILL.md
Shows how to verify a tool installation by checking its version and the expected output format.
```bash
# Verify installation
xxx --version
# Expected output: xxx x.y.z
```
--------------------------------
### Metasploit Console and Database Setup
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/scanning-tools/SKILL.md
Commands to start the Metasploit Framework console and initialize its database.
```bash
# Start Metasploit
msfconsole
# Database setup
msfdb init
db_status
```
--------------------------------
### Complete HTTP Lab Setup
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/network-101/SKILL.md
Installs Apache, creates a basic HTML login page, and configures the firewall to allow HTTP traffic.
```bash
sudo apt install apache2
sudo systemctl start apache2
cat << 'EOF' | sudo tee /var/www/html/login.html
EOF
sudo ufw allow 80/tcp
```
--------------------------------
### Example User Request and Agent Response
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/dev-guide-generator/SKILL.md
Illustrates a typical interaction where a user requests a tutorial and the agent provides a complete guide.
```text
User: Help me write a Docker beginner's tutorial
Agent: [Outputs complete technical tutorial + Cheatsheet following the SOP workflow]
```
--------------------------------
### CV Tailor Quick Start Example
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/cv-tailor/SKILL.md
Illustrates the basic interaction flow for the CV Tailor skill, where a user provides a resume and job description for optimization.
```text
User: Help me optimize my resume — I'm applying for this role [attaches JD + resume]
Agent: [Follows the SOP workflow and outputs optimization recommendations plus a rewritten resume]
```
--------------------------------
### Run Setup Hooks and Exit
Source: https://github.com/zebbern/claude-code-guide/blob/main/README.md
Run Setup hooks and then exit immediately.
```bash
claude --init-only
```
--------------------------------
### SMB Anonymous Access Setup
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/network-101/SKILL.md
Installs Samba, creates an anonymous share directory with full permissions, and tests access.
```bash
sudo apt install samba
sudo mkdir /srv/samba/anonymous
sudo chmod 777 /srv/samba/anonymous
smbclient //localhost/anonymous -N
```
--------------------------------
### Initialize SDK and List Users
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/code-documenter/references/user-guides-tutorials.md
Initialize the SDK client with an API key and make a request to list users. This is part of the Quick Start guide.
```typescript
import { Client } from "@myapi/sdk"
const client = new Client({ apiKey: "your_key" })
const users = await client.users.list()
console.log(users)
```
--------------------------------
### Execute First Test Case (CLI Install)
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/test-suite-architect/references/day1_onboarding.md
Execute the first test case, which involves clearing previous installations, running the install command, and verifying the installation.
```bash
# Step 1: Clear previous installations
rm -rf ~/.claude/skills/
# Step 2: Run install command
ccpm install
# Step 3: Verify installation
ls ~/.claude/skills/
cat ~/.claude/skills//package.json
```
--------------------------------
### Migrate to Native Installer
Source: https://github.com/zebbern/claude-code-guide/blob/main/README.md
Switch your installation from the npm method to the native binary installer. This command facilitates the transition.
```bash
# Switch from npm global install to native installer
claude migrate-installer
```
--------------------------------
### SDK Installation - npm
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/code-documenter/references/interactive-api-docs.md
Shows how to install the SDK package using npm.
```bash
npm install @myapi/sdk
```
--------------------------------
### Simulate PWA Install Prompt
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/playwright/core/service-workers-and-pwa.md
Tests if the application captures the 'beforeinstallprompt' event and displays an install button. This is useful for verifying the PWA installation flow.
```typescript
import { test, expect } from "@playwright/test"
test("app captures install prompt and shows install button", async ({ swContext }) => {
const page = await swContext.newPage()
// Mock the beforeinstallprompt event
await page.addInitScript(() => {
let deferredPrompt: Event | null = null
// Simulate the browser firing beforeinstallprompt
window.addEventListener("load", () => {
const event = new Event("beforeinstallprompt")
;(event as any).preventDefault = () => {}
;(event as any).prompt = () => Promise.resolve()
;(event as any).userChoice = Promise.resolve({ outcome: "accepted" })
window.dispatchEvent(event)
})
})
await page.goto("/")
// Your app should show an install button when it captures the prompt
await expect(page.getByRole("button", { name: "Install app" })).toBeVisible()
})
```
--------------------------------
### Simulate PWA Install Prompt (JavaScript)
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/playwright/core/service-workers-and-pwa.md
A JavaScript version for testing the PWA installation flow by simulating the 'beforeinstallprompt' event and checking for the visibility of the install button.
```javascript
const { test, expect } = require("@playwright/test")
test("app captures install prompt and shows install button", async ({ swContext }) => {
const page = await swContext.newPage()
await page.addInitScript(() => {
window.addEventListener("load", () => {
const event = new Event("beforeinstallprompt")
event.preventDefault = () => {}
event.prompt = () => Promise.resolve()
event.userChoice = Promise.resolve({ outcome: "accepted" })
window.dispatchEvent(event)
})
})
await page.goto("/")
await expect(page.getByRole("button", { name: "Install app" })).toBeVisible()
})
```
--------------------------------
### Automate Package Installation with Bash
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/linux-shell-scripting/SKILL.md
Installs a predefined list of packages using 'apt-get' if they are not already installed. Skips packages that are already present.
```bash
#!/bin/bash
packages=("vim" "htop" "curl" "wget" "git")
echo "Installing packages..."
for package in "${packages[@]}"; do
if dpkg -l | grep -q "^ii $package"; then
echo "[SKIP] $package is already installed"
else
sudo apt-get install -y "$package"
echo "[INSTALLED] $package"
fi
done
echo "Package installation completed."
```
--------------------------------
### Playwright Dockerfile Example
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/playwright/core/error-index.md
A sample Dockerfile using the official Playwright image, including dependency installation and test execution setup. Ensures necessary components are available in containerized environments.
```docker
FROM mcr.microsoft.com/playwright:v1.50.0-noble
WORKDIR /app
COPY . .
RUN npm ci
RUN npx playwright install chromium
CMD ["npx", "playwright", "test"]
```
--------------------------------
### Install @react-spring/three
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/r3f-animation/SKILL.md
Install the @react-spring/three package using npm.
```bash
npm install @react-spring/three
```
--------------------------------
### Create User SDK Example - Go
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/code-documenter/references/interactive-api-docs.md
Demonstrates creating a user using the Go SDK client.
```go
import "github.com/myapi/sdk-go"
client := sdk.NewClient("your_key")
user, err := client.Users.Create(ctx, &sdk.CreateUserInput{
Name: "John Doe",
Email: "john@example.com",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(user.ID)
```
--------------------------------
### Configure setup and teardown projects
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/playwright/ci/projects-and-dependencies.md
Define setup and teardown projects to manage browser-based cleanup after tests complete. The setup project links to the teardown project.
```typescript
// playwright.config.ts
import { defineConfig, devices } from "@playwright/test"
export default defineConfig({
projects: [
{
name: "setup",
testMatch: /global\.setup\.ts/,
teardown: "teardown", // link to teardown project
},
{
name: "teardown",
testMatch: /global\.teardown\.ts/,
},
{
name: "chromium",
use: {
...devices["Desktop Chrome"],
storageState: "playwright/.auth/user.json",
},
dependencies: ["setup"],
},
],
})
```
--------------------------------
### Example .env Files for Configuration
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/playwright/core/configuration.md
Demonstrates how to use .env files for managing environment-specific configurations like URLs and secrets. Includes example .env.example, .env.local, and .env.staging files, and a .gitignore entry.
```bash
# .env.example (commit this)
BASE_URL=http://localhost:3000
TEST_PASSWORD=
API_KEY=
# .env.local (gitignored)
BASE_URL=http://localhost:3000
TEST_PASSWORD=s3cret
API_KEY=test-key-abc123
# .env.staging (gitignored)
BASE_URL=https://staging.example.com
TEST_PASSWORD=staging-password
API_KEY=staging-key-xyz789
```
```bash
# .gitignore
.env
.env.local
.env.staging
.env.production
playwright/.auth/
```
```bash
# Install dotenv:
npm install -D dotenv
```
--------------------------------
### Install Dependencies Manually
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/r2-upload/README.md
Installs project dependencies for the R2/S3 Upload Skill. This is part of the manual setup process.
```bash
pnpm install
```
--------------------------------
### Run Setup Hooks in Maintenance Mode
Source: https://github.com/zebbern/claude-code-guide/blob/main/README.md
Run Setup hooks in maintenance mode.
```bash
claude --maintenance
```
--------------------------------
### Install and Onboard r2-upload Skill
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/r2-upload/CLAWDHUB.md
Install the skill's dependencies and run the interactive onboarding process to set up credentials and configuration.
```bash
cd ~/clawd/skills/r2-upload
pnpm install
pnpm run onboard
```
--------------------------------
### Install Playwright Browsers in GitHub Actions
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/playwright/core/error-index.md
Example of how to install Playwright browsers with OS dependencies in a GitHub Actions CI pipeline.
```yaml
# GitHub Actions example
- name: Install Playwright Browsers
run: npx playwright install --with-deps
```
--------------------------------
### Quick Usage Example
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/chart-image/SKILL.md
A basic example demonstrating how to generate a line chart with specified data, title, and output file.
```bash
node /data/clawd/skills/chart-image/scripts/chart.mjs \
--type line \
--data '[{"x":"10:00","y":25},{"x":"10:30","y":27},{"x":"11:00","y":31}]' \
--title "Price Over Time" \
--output chart.png
```
--------------------------------
### Install Metasploit Framework
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/metasploit-framework/SKILL.md
Installs Metasploit Framework on systems other than Kali Linux. It also starts and initializes the PostgreSQL database required for Metasploit's database support.
```bash
# Metasploit comes pre-installed on Kali Linux
# For other systems:
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall
chmod 755 msfinstall
./msfinstall
# Start PostgreSQL for database support
sudo systemctl start postgresql
sudo msfdb init
```
--------------------------------
### Playwright Configuration for Global Setup (JavaScript)
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/playwright/core/authentication.md
Configure Playwright to use the global setup file and specify the storage state path. This ensures tests start with the saved authentication.
```javascript
// playwright.config.js
const { defineConfig } = require("@playwright/test")
module.exports = defineConfig({
globalSetup: require.resolve("./global-setup"),
use: {
baseURL: "http://localhost:3000",
storageState: ".auth/user.json",
},
})
```
--------------------------------
### Playwright Configuration for Global Setup (TypeScript)
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/playwright/core/authentication.md
Configure Playwright to use the global setup file and specify the storage state path. This ensures tests start with the saved authentication.
```typescript
// playwright.config.ts
import { defineConfig } from "@playwright/test"
export default defineConfig({
globalSetup: require.resolve("./global-setup"),
use: {
baseURL: "http://localhost:3000",
storageState: ".auth/user.json",
},
})
```
--------------------------------
### Create User SDK Example - Python
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/code-documenter/references/interactive-api-docs.md
Demonstrates creating a user using the Python SDK client.
```python
from myapi import Client
client = Client(api_key="your_key")
user = client.users.create(
name="John Doe",
email="john@example.com"
)
print(user.id)
```
--------------------------------
### Initialize QA Project
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/test-suite-architect/SKILL.md
Use this script to set up the initial QA infrastructure for a new project. It creates necessary directories and baseline files. Follow this by documenting the current state in BASELINE-METRICS.md, writing test cases, and preparing for autonomous execution.
```bash
python scripts/init_qa_project.py my-app ./
Fill in BASELINE-METRICS.md (document current state)
Write test cases using assets/templates/TEST-CASE-TEMPLATE.md
Copy master prompt from references/master_qa_prompt.md
Paste to LLM → autonomous execution begins
```
--------------------------------
### Group Related Tests with `test.describe()` in TypeScript
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/playwright/core/test-organization.md
Use `test.describe()` to group related tests that share setup or context. This example demonstrates shared `beforeEach` setup and nested describe blocks.
```typescript
// tests/auth/login.spec.ts
import { test, expect } from "@playwright/test"
test.describe("Login", () => {
// Shared setup for all tests in this describe block
test.beforeEach(async ({ page }) => {
await page.goto("/login")
})
test("should login with valid credentials", async ({ page }) => {
await page.getByLabel("Email").fill("user@example.com")
await page.getByLabel("Password").fill("securepass123")
await page.getByRole("button", { name: "Sign in" }).click()
await expect(page).toHaveURL("/dashboard")
})
test("should show error for invalid password", async ({ page }) => {
await page.getByLabel("Email").fill("user@example.com")
await page.getByLabel("Password").fill("wrongpassword")
await page.getByRole("button", { name: "Sign in" }).click()
await expect(page.getByRole("alert")).toHaveText("Invalid credentials")
})
// One level of nesting — acceptable
test.describe("Rate Limiting", () => {
test("should lock account after 5 failed attempts", async ({ page }) => {
for (let i = 0; i < 5; i++) {
await page.getByLabel("Email").fill("user@example.com")
await page.getByLabel("Password").fill("wrong")
await page.getByRole("button", { name: "Sign in" }).click()
}
await expect(page.getByRole("alert")).toContainText("Account locked")
})
})
})
```
--------------------------------
### Create User SDK Example - Ruby
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/code-documenter/references/interactive-api-docs.md
Demonstrates creating a user using the Ruby SDK client.
```ruby
require 'myapi'
client = MyAPI::Client.new(api_key: 'your_key')
user = client.users.create(
name: 'John Doe',
email: 'john@example.com'
)
puts user.id
```
--------------------------------
### JavaScript Example for Angular Material Select
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/playwright/core/angular.md
A basic JavaScript example demonstrating the setup for testing an Angular Material select dropdown. This snippet shows the import and describe block structure.
```javascript
const { test, expect } = require("@playwright/test")
test.describe("Angular Material components", () => {
test("mat-select dropdown", async ({ page }) => {
await page.goto("/settings")
```
--------------------------------
### Reflected GET HTML Injection Payloads
Source: https://github.com/zebbern/claude-code-guide/blob/main/skills/html-injection-testing/SKILL.md
Provides examples of URL-based payloads for reflected GET HTML injection, demonstrating how to inject HTML tags into welcome messages and search results.
```html
http://target.com/welcome?name=Welcome%20Admin