.claude/skills/web-analyze/SKILL.md
Analyze API documentation from a website and generate a destination implementation plan
npx skillsauth add segmentio/action-destinations web-analyzeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill analyzes API documentation from websites and generates comprehensive implementation plans for Segment action-destinations. It produces the same standardized output format as openapi-analyze, making it compatible with implement-destination.
Use /web-analyze when:
Ask the user for the API documentation location:
Where is the API documentation located? Please provide:
1. **Main API docs URL** (e.g., https://api.example.com/docs)
2. **Additional relevant pages** (optional - authentication, endpoints, etc.)
3. **API name** (e.g., "Acme Marketing API")
Use WebFetch to retrieve the documentation pages. For each URL provided:
What to Look For:
Look for sections titled:
Extract:
Look for sections titled:
For each endpoint, extract:
/v1/events)From request examples and descriptions, extract:
Apply the same prioritization heuristics as openapi-analyze:
Priority: HIGH
/events, /track, /identify, /users, /contacts, /leads, /customersPriority: MEDIUM
Priority: LOW
For each high/medium priority endpoint, determine:
Segment Event Type:
trackidentifygroupDefault Subscription:
type = "track"type = "identify"type = "group"type = "track" and event = "Order Completed"Field Mappings:
$.userId$.traits.email or $.properties.email$.event$.timestamp$.propertiesBatch Support:
/batch or /bulk endpointsGenerate a markdown document following the Standard Analysis Format (see .claude/skills/implement-destination/analysis-format.md).
File location: packages/destination-actions/.claude/openapi-analyses/[api-slug]-analysis.md
Important: Use the exact format specified in analysis-format.md so that implement-destination can consume it.
Document Template:
# Website Destination Analysis: [API Name]
## Summary
- **API Name:** [from documentation]
- **Version:** [if mentioned, otherwise "Unknown"]
- **Base URL:** [from docs or examples]
- **Authentication:** [custom|basic|oauth2|oauth-managed]
- **Analysis Date:** [current date YYYY-MM-DD]
- **Analysis Source:** Website Documentation
## Authentication Setup
### Recommended Scheme: [custom|basic|oauth2|oauth-managed]
**Authentication Method:** [How auth works based on docs]
**Required Settings:**
1. **[fieldName]** (type: [string|password])
- Description: [What this credential is]
- Where to find: [Instructions from docs]
- Applied as: [Header/query/etc with example]
**Test Authentication Endpoint:**
- Endpoint: `GET [endpoint]`
- Purpose: [What it returns]
- Fallback: TODO - Manual identification needed [if not found in docs]
## Recommended Actions
### Priority: High
#### 1. [Action Name] - [One-line summary]
- **Endpoint:** `[METHOD] [path]`
- **Operation ID:** [generate from path, e.g., trackEvent]
- **Purpose:** [From docs description]
- **Segment Event Type:** [track|identify|group]
- **Default Subscription:** `type = "[track|identify|group]"`
- **Batch Support:** [Yes|No based on docs]
- **Reasoning:** [Why high priority]
**Field Mappings:**
| Field Name | Type | Required | Description | Suggested Default Path |
| ---------- | ------ | -------- | ----------- | ---------------------- | -------- |
| [field] | [type] | [Yes | No] | [from docs] | [$.path] |
**Request Body Schema:**
```json
{
[schema extracted or inferred from examples]
}
```
Additional Notes:
[Repeat for each action]
[Medium priority actions]
[Low priority actions]
[If applicable]
[If docs mention multiple regions]
[If mentioned in docs]
/implement-destination skill with your selections to generate the destination code
### Step 6: Handle Missing Information
Documentation may be incomplete. When information is missing:
**For Authentication:**
- If auth method unclear, ask user or mark TODO
- Suggest common patterns (API key in header is most common)
**For Field Types:**
- Infer from example values:
- `"string"` → string
- `123` → integer
- `12.34` → number
- `true` → boolean
- `{"key": "value"}` → object
- `["item1", "item2"]` → string[] or object[]
- If unclear, default to `string` and add note
**For Required Fields:**
- Check for "required" or "optional" labels in docs
- Look for asterisks (*) or other required indicators
- Check if field appears in all examples
- If unclear, mark as not required (safer default)
**For Base URL:**
- Look in examples
- Check for base URL in getting started
- Look for server/host information
- If multiple environments (sandbox/production), use production
### Step 7: Present Results
Show the user:
1. **Summary of findings:**
- API name
- Authentication method
- Number of actions found (by priority)
- Base URL
2. **Where analysis was saved:**
`packages/destination-actions/.claude/openapi-analyses/[slug]-analysis.md`
3. **Any uncertainties or TODOs:**
List any information that couldn't be determined from docs
4. **Next steps:**
- Review the analysis document
- Verify extracted information against docs
- Shortlist actions to implement
- Run `/implement-destination` to generate code
## Tips for Effective Analysis
### Reading Documentation
1. **Start with Getting Started / Overview**
- Understand the API's purpose
- Find base URL
- Identify auth method
2. **Read Authentication Section Carefully**
- Note exact header names
- Check for token prefixes (Bearer, Token, etc.)
- Find instructions for obtaining credentials
3. **Scan API Reference**
- Identify write operations (POST/PUT/PATCH)
- Look for user/event-related endpoints
- Note batch endpoints
4. **Study Examples**
- Extract field names from example requests
- Infer field types from example values
- Identify required vs optional fields
### Handling Common Patterns
**Pattern: API Key in Header**
Authentication: custom Field: apiKey (password) Applied as: "Authorization: Bearer {apiKey}"
**Pattern: Multiple Auth Options**
- Choose the simplest (usually API key)
- Note alternatives in Implementation Notes
**Pattern: Versioned API**
- Include version in base URL
- Note version in analysis
**Pattern: Regional Endpoints**
- List all regions
- Recommend region selector field
### Dealing with Incomplete Docs
- Mark missing information as TODO
- Make reasonable assumptions (note them)
- Suggest user verify against actual API
- Prioritize what can be determined confidently
### Common API Documentation URLs to Check
If user provides just a homepage, suggest checking:
- `/docs`
- `/api-reference`
- `/developers`
- `/documentation`
- `/api/docs`
- `/v1/docs` or `/v2/docs`
## Example Workflow
**User provides:**
- Main URL: `https://docs.acme.com/api`
- API Name: "Acme Marketing"
**Skill actions:**
1. Fetch `https://docs.acme.com/api`
2. Look for authentication section → Find "API key in Authorization header"
3. Look for endpoints → Find `/v1/events` (POST), `/v1/users` (POST), `/v1/users/{id}` (PUT)
4. Extract field schemas from examples
5. Prioritize:
- High: Track Events (`POST /v1/events`)
- High: Identify User (`POST /v1/users`)
- Medium: Update User (`PUT /v1/users/{id}`)
6. Generate analysis document
7. Present findings to user
## Quality Checklist
Before saving the analysis document, verify:
- [ ] Authentication section is complete
- [ ] At least one high-priority action identified
- [ ] Each action has: endpoint, method, event type, subscription
- [ ] Field mappings table exists for each action
- [ ] Field types are standard (string, integer, number, boolean, object, datetime)
- [ ] Base URL is present
- [ ] Batch support is determined (Yes/No)
- [ ] Document follows standard analysis format
- [ ] Links to original docs are included
## Error Handling
**If documentation is not accessible:**
- Report error to user
- Ask for alternative URL or credentials
- Suggest checking if docs are public
**If documentation is in unsupported format:**
- Try to extract what's possible
- Ask user for specific pages
- Suggest using OpenAPI spec if available
**If API is not REST:**
- Inform user this skill is for REST APIs
- Suggest alternatives (GraphQL, SOAP, etc. would need different approach)
## Limitations
- ✗ Cannot access documentation behind authentication
- ✗ May miss information across multiple pages
- ✗ Cannot interact with dynamic API explorers
- ✗ Inferred field types may need verification
- ✗ Complex authentication flows may need manual review
## Advantages Over OpenAPI
- ✓ Works when no OpenAPI spec exists
- ✓ Can extract documentation-specific context
- ✓ May capture best practices from docs
- ✓ Includes human-written descriptions
## Notes
- This skill produces the **same format** as `openapi-analyze`
- Output is **compatible** with `implement-destination`
- Analysis may require **more manual review** than OpenAPI-based analysis
- User should **verify** extracted information against actual API behavior
development
Analyze an OpenAPI specification and generate a destination implementation plan with action recommendations
development
Generate destination code from analysis documents (OpenAPI or web-based) and user-selected actions
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.