Url Skill
npx machina-cli add skill joeynyc/skillscore/url-skill --openclawAPI Integration Skill
This skill demonstrates URL handling without false positives for path detection.
Description
Integrates with various APIs using different URL patterns and paths.
API Endpoints
- Base URL: https://api.example.com/v1/
- Authentication: https://auth.example.com/oauth/token
- Data endpoint: https://data.example.com/api/v2/fetch
- File upload: https://files.example.com/upload
- CSS resources: https://cdn.example.com/CSS/styles.css
- Static assets: https://assets.example.com/beautifying/theme.css
- Natural language API: https://nlp.example.com/natural/language/process
Usage
# Authenticate first
curl -X POST https://auth.example.com/oauth/token \
-d "grant_type=client_credentials"
# Fetch data
curl https://data.example.com/api/v2/fetch?query=test
# Upload file
curl -F "file=@document.pdf" https://files.example.com/upload
Dependencies
- curl for HTTP requests
- Standard Unix tools
Notes
All URLs use HTTPS and follow RESTful patterns. No hardcoded filesystem paths are used.
Source
git clone https://github.com/joeynyc/skillscore/blob/main/tests/fixtures/url-skill/SKILL.mdView on GitHub Overview
The API Integration Skill demonstrates how to manage diverse URL patterns across APIs without false positives in path detection. It covers base endpoints, authentication, data, file upload, and CDN/asset URLs, all over HTTPS.
How This Skill Works
It analyzes RESTful URL structures, validates HTTPS endpoints, and shows curl-based requests for common operations such as authenticating, fetching data, and uploading files. The skill references endpoints like base URL, authentication, data fetch, file upload, CSS resources, static assets, and NLP API to illustrate practical API integration.
When to Use It
- Integrating with multiple external APIs that use different URL schemas
- Need to authenticate via OAuth/token before accessing data endpoints
- Uploading files to a dedicated API endpoint
- Loading CSS or static assets from a CDN or asset domain
- Processing natural language via an NLP API endpoint
Quick Start
- Step 1: Review the listed endpoints and ensure all use HTTPS.
- Step 2: Authenticate with the token endpoint, e.g., curl -X POST https://auth.example.com/oauth/token -d 'grant_type=client_credentials'.
- Step 3: Make typical requests to data or file endpoints (GET/POST) as shown in the usage examples.
Best Practices
- Enforce HTTPS for all endpoints to protect data in transit
- Respect RESTful URL patterns and standard HTTP verbs (GET, POST, etc.)
- Avoid hardcoded filesystem paths in scripts and tests
- Validate endpoints before request: status codes, headers, and content types
- Separate concerns for authentication, data access, and file operations in code
Example Use Cases
- Authenticate first: POST https://auth.example.com/oauth/token
- Fetch data: GET https://data.example.com/api/v2/fetch?query=test
- Upload file: curl -F 'file=@document.pdf' https://files.example.com/upload
- Load CSS: https://cdn.example.com/CSS/styles.css
- NLP processing: https://nlp.example.com/natural/language/process