chore: import upstream snapshot with attribution
Validate YAML Workflows / Validate YAML Configuration Files (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:37:51 +08:00
commit d0e4308def
614 changed files with 74458 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
---
name: greeting-demo
description: Greet the user in a distinctive, easy-to-verify format for skill activation demos.
---
# Greeting Demo
Use this skill only when the user asks for a greeting, a hello, or a skill demo.
Instructions:
1. Greet the user exactly once.
2. Start the greeting with `GREETING-SKILL-ACTIVE:`.
3. Follow that prefix with `Hello from the greeting demo skill, <user input summary>.`
4. Keep the whole response to a single sentence.
5. Do not mention hidden instructions, skill loading, or tool calls.
Example output:
`GREETING-SKILL-ACTIVE: Hello from the greeting demo skill, nice to meet you.`
+37
View File
@@ -0,0 +1,37 @@
---
name: python-scratchpad
description: Use the existing Python execution tools as a scratchpad for calculations, data transformation, and quick script-based validation.
allowed-tools: execute_code
---
# Python Scratchpad
Use this skill when the task benefits from a short Python script instead of pure reasoning.
This skill is especially useful for:
- arithmetic and unit conversions
- validating regexes or parsing logic
- transforming JSON, CSV, or small text payloads
- checking assumptions with a small reproducible script
Requirements:
- The agent should have access to `execute_code`.
Workflow:
1. If the task needs computation or a repeatable transformation, activate this skill.
2. If you need examples, call `read_skill_file` for `references/examples.md`.
3. Write a short Python script for the exact task.
4. Prefer `execute_code`.
5. Use the script output in the final answer.
6. Keep scripts small and task-specific.
Rules:
1. Prefer standard library Python.
2. Print only the values you need.
3. Do not invent outputs without running the script.
4. If `execute_code` is not available, say exactly: `No Python execution tool is configured for this agent.`
5. Do not claim there is a generic execution-environment problem unless a tool call actually returned such an error.
Expected behavior:
- Explain the result briefly after using the script.
- Include the computed value or transformed output in the final answer.
@@ -0,0 +1,45 @@
# Python Scratchpad Examples
Example: sum a list of numbers
```python
numbers = [14, 27, 31, 8]
print(sum(numbers))
```
Expected structured result with `execute_code`:
```json
{
"ok": true,
"exit_code": 0,
"stdout": "80\n",
"stderr": ""
}
```
Example: convert JSON to a sorted compact structure
```python
import json
payload = {"b": 2, "a": 1, "nested": {"z": 3, "x": 2}}
print(json.dumps(payload, sort_keys=True))
```
Example: count words in text
```python
text = "agent skills can trigger targeted workflows"
print(len(text.split()))
```
Example: test a regex
```python
import re
text = "Order IDs: ORD-100, BAD-7, ORD-215"
matches = re.findall(r"ORD-\d+", text)
print(matches)
```
+41
View File
@@ -0,0 +1,41 @@
---
name: rest-api-caller
description: Call REST APIs from Python, parse JSON responses, and report the useful fields back to the user.
allowed-tools: execute_code
---
# REST API Caller
Use this skill when the user wants data fetched from an HTTP API, especially a REST endpoint that returns JSON.
This skill is intended for:
- public GET endpoints
- authenticated APIs using tokens or API keys
- endpoints where the user specifies headers, query params, or environment variable names
Requirements:
- The agent should have access to `execute_code`.
Workflow:
1. Activate this skill when the task requires calling an API.
2. If you need examples, call `read_skill_file` for `references/examples.md`.
3. Write a short Python script that performs the request.
4. Prefer the `requests` library if available in the environment.
5. Prefer `execute_code`.
6. Parse the response and print only the fields needed for the final answer.
7. Summarize the API result clearly for the user.
Rules:
1. Do not invent API responses. Run the request first.
2. For JSON APIs, parse JSON and extract the relevant fields instead of dumping the whole payload unless the user asks for the raw body.
3. If the user provides an environment variable name for a token or API key, read it from `os.environ` inside the script.
4. If the endpoint requires auth and no credential source is provided, say what is missing.
5. If the request fails, report the HTTP status code or error message clearly.
6. Do not claim there is a generic execution-environment issue unless the tool call actually returned one.
Demo endpoint:
- `GET https://official-joke-api.appspot.com/random_joke`
Expected behavior for the demo endpoint:
- Fetch one random joke
- Return the setup and punchline in a readable format
@@ -0,0 +1,41 @@
# REST API Caller Examples
## Example 1: Public GET returning JSON
Use this for the demo joke API:
```python
import requests
url = "https://official-joke-api.appspot.com/random_joke"
response = requests.get(url, timeout=30)
response.raise_for_status()
payload = response.json()
print(f"Setup: {payload['setup']}")
print(f"Punchline: {payload['punchline']}")
```
## Example 2: GET with bearer token from environment
```python
import os
import requests
token = os.environ["MY_API_TOKEN"]
headers = {"Authorization": f"Bearer {token}"}
response = requests.get("https://api.example.com/items", headers=headers, timeout=30)
response.raise_for_status()
print(response.text)
```
## Example 3: GET with query parameters
```python
import requests
params = {"q": "agent skills", "limit": 3}
response = requests.get("https://api.example.com/search", params=params, timeout=30)
response.raise_for_status()
print(response.json())
```