### Example Eval Queries for Skill Triggering Source: https://agentskills.io/skill-creation/optimizing-descriptions Use this JSON structure to define user prompts and whether they should trigger a skill. Aim for a balanced set of positive and negative examples. ```json [ { "query": "I've got a spreadsheet in ~/data/q4_results.xlsx with revenue in col C and expenses in col D — can you add a profit margin column and highlight anything under 10%?", "should_trigger": true }, { "query": "whats the quickest way to convert this json file to yaml", "should_trigger": false } ] ``` -------------------------------- ### Documenting skill instructions Source: https://agentskills.io/skill-creation/best-practices Examples of how to structure skill documentation to avoid verbosity and focus on project-specific requirements. ```markdown ## Extract PDF text PDF (Portable Document Format) files are a common file format that contains text, images, and other content. To extract text from a PDF, you'll need to use a library. pdfplumber is recommended because it handles most cases well. ``` -------------------------------- ### GET /llms.txt Source: https://agentskills.io/home Fetches the complete documentation index for the AgentSkills project. ```APIDOC ## GET /llms.txt ### Description Fetch the complete documentation index to discover all available pages. ### Method GET ### Endpoint https://agentskills.io/llms.txt ``` -------------------------------- ### Define agent task instructions Source: https://agentskills.io/skill-creation/evaluating-skills Example instruction set for executing a skill-based task, including path, prompt, input files, and output directory. ```text Execute this task: - Skill path: /path/to/csv-analyzer - Task: I have a CSV of monthly sales data in data/sales_2025.csv. Can you find the top 3 months by revenue and make a bar chart? - Input files: evals/files/sales_2025.csv - Save outputs to: csv-analyzer-workspace/iteration-1/eval-top-months-chart/with_skill/outputs/ ``` -------------------------------- ### Referencing files in Markdown Source: https://agentskills.io/specification Use relative paths from the skill root to reference other files within your skill. This example shows how to link to a reference guide and a script. ```markdown See [the reference guide](references/REFERENCE.md) for details. Run the extraction script: scripts/extract.py ``` -------------------------------- ### Document Script Usage with --help Source: https://agentskills.io/skill-creation/using-scripts Provide a `--help` message that includes a brief description, available flags, and usage examples. This is the primary way agents understand your script's interface. ```bash Usage: scripts/process.py [OPTIONS] INPUT_FILE Process input data and produce a summary report. Options: --format FORMAT Output format: json, csv, table (default: json) --output FILE Write output to FILE instead of stdout --verbose Print progress to stderr Examples: scripts/process.py data.csv scripts/process.py --format csv --output report.csv data.csv ``` -------------------------------- ### Define SKILL.md Frontmatter Source: https://agentskills.io/specification Examples of YAML frontmatter configurations for SKILL.md files, ranging from minimal to feature-rich. ```markdown --- name: skill-name description: A description of what this skill does and when to use it. --- ``` ```markdown --- name: pdf-processing description: Extract PDF text, fill forms, merge files. Use when handling PDFs. license: Apache-2.0 metadata: author: example-org version: "1.0" --- ``` -------------------------------- ### Example `metadata` field Source: https://agentskills.io/specification The `metadata` field is a map for storing additional properties. Use unique key names to avoid conflicts. This example shows author and version information. ```yaml metadata: author: example-org version: "1.0" ``` -------------------------------- ### Example `compatibility` field values Source: https://agentskills.io/specification Use the `compatibility` field to specify environment requirements for your skill. It can indicate intended products, required system packages, or network access needs. ```yaml compatibility: Designed for Claude Code (or similar products) ``` ```yaml compatibility: Requires git, docker, jq, and access to the internet ``` ```yaml compatibility: Requires Python 3.14+ and uv ``` -------------------------------- ### Define Skill License Field Source: https://agentskills.io/specification Example of specifying a license within the frontmatter. ```yaml license: Proprietary. LICENSE.txt has complete terms ``` -------------------------------- ### Example `allowed-tools` field Source: https://agentskills.io/specification Use the `allowed-tools` field to specify a space-delimited list of pre-approved tools. Note that support for this experimental field may vary. ```yaml allowed-tools: Bash(git:*) Bash(jq:*) Read ``` -------------------------------- ### Define Skill Description Field Source: https://agentskills.io/specification Examples demonstrating the difference between descriptive and vague skill descriptions. ```yaml description: Extracts text and tables from PDF files, fills PDF forms, and merges multiple PDFs. Use when working with PDF documents or when the user mentions PDFs, forms, or document extraction. ``` ```yaml description: Helps with PDFs. ``` -------------------------------- ### Example Feedback JSON Structure Source: https://agentskills.io/skill-creation/evaluating-skills Use this JSON structure to record specific feedback for each test case during the review process. Ensure feedback is actionable. ```json { "eval-top-months-chart": "The chart is missing axis labels and the months are in alphabetical order instead of chronological.", "eval-clean-missing-emails": "" } ``` -------------------------------- ### Run Python packages with uvx Source: https://agentskills.io/skill-creation/using-scripts Use uvx to run Python packages in isolated environments with aggressive caching. Requires a separate Python installation. ```bash uvx ruff@0.8.0 check . ``` ```bash uvx black@24.10.0 . ``` -------------------------------- ### Handle malformed YAML in skill files Source: https://agentskills.io/client-implementation/adding-skills-support Example of invalid YAML where unquoted colons in values cause parsing errors. ```yaml # Technically invalid YAML — the colon breaks parsing description: Use this skill when: the user asks about PDFs ``` -------------------------------- ### Run Python Script with uv Source: https://agentskills.io/skill-creation/using-scripts Execute a Python script using `uv run`, which creates an isolated environment, installs declared dependencies, and runs the script. This is the recommended method for PEP 723 scripts. ```bash uv run scripts/extract.py ``` -------------------------------- ### Validate Skill Name Field Source: https://agentskills.io/specification Examples of valid and invalid naming conventions for the skill name field. ```yaml name: pdf-processing ``` ```yaml name: data-analysis ``` ```yaml name: code-review ``` ```yaml name: PDF-Processing # uppercase not allowed ``` ```yaml name: -pdf # cannot start with hyphen ``` ```yaml name: pdf--processing # consecutive hyphens not allowed ``` -------------------------------- ### Configure evaluation assertions Source: https://agentskills.io/skill-creation/evaluating-skills Example of adding objective assertions to an evaluation test case within the evals.json configuration file. ```json { "skill_name": "csv-analyzer", "evals": [ { "id": 1, "prompt": "I have a CSV of monthly sales data in data/sales_2025.csv. Can you find the top 3 months by revenue and make a bar chart?", "expected_output": "A bar chart image showing the top 3 months by revenue, with labeled axes and values.", "files": ["evals/files/sales_2025.csv"], "assertions": [ "The output includes a bar chart image file", "The chart shows exactly 3 months", "Both axes are labeled", "The chart title or caption mentions revenue" ] } ] } ``` -------------------------------- ### Grading Results JSON Source: https://agentskills.io/skill-creation/evaluating-skills Example JSON structure for recording assertion results and a summary of pass/fail metrics for a single run. ```json { "assertion_results": [ { "text": "The output includes a bar chart image file", "passed": true, "evidence": "Found chart.png (45KB) in outputs directory" }, { "text": "The chart shows exactly 3 months", "passed": true, "evidence": "Chart displays bars for March, July, and November" }, { "text": "Both axes are labeled", "passed": false, "evidence": "Y-axis is labeled 'Revenue ($)' but X-axis has no label" }, { "text": "The chart title or caption mentions revenue", "passed": true, "evidence": "Chart title reads 'Top 3 Months by Revenue'" } ], "summary": { "passed": 3, "failed": 1, "total": 4, "pass_rate": 0.75 } } ``` -------------------------------- ### Aggregated Benchmark Results JSON Source: https://agentskills.io/skill-creation/evaluating-skills Example JSON structure for aggregated benchmark results, showing mean and standard deviation for key metrics across different configurations (with/without skill). Includes a delta calculation. ```json { "run_summary": { "with_skill": { "pass_rate": { "mean": 0.83, "stddev": 0.06 }, "time_seconds": { "mean": 45.0, "stddev": 12.0 }, "tokens": { "mean": 3800, "stddev": 400 } }, "without_skill": { "pass_rate": { "mean": 0.33, "stddev": 0.10 }, "time_seconds": { "mean": 32.0, "stddev": 8.0 }, "tokens": { "mean": 2100, "stddev": 300 } }, "delta": { "pass_rate": 0.50, "time_seconds": 13.0, "tokens": 1700 } } } ``` -------------------------------- ### Evaluate skill trigger rates with shell scripts Source: https://agentskills.io/skill-creation/optimizing-descriptions This script checks if a skill is triggered for a set of queries and calculates the trigger rate. It requires the 'claude' CLI and 'jq' to be installed. ```bash check_triggered() { local query="$1" claude -p "$query" --output-format json 2>/dev/null \ | jq -e --arg skill "$SKILL_NAME" \ 'any(.messages[].content[]; .type == "tool_use" and .name == "Skill" and .input.skill == $skill)' \ > /dev/null 2>&1 } count=$(jq length "$QUERIES_FILE") for i in $(seq 0 $((count - 1))); do query=$(jq -r ".[\$i].query" "$QUERIES_FILE") should_trigger=$(jq -r ".[\$i].should_trigger" "$QUERIES_FILE") triggers=0 for run in $(seq 1 $RUNS); do check_triggered "$query" && triggers=$((triggers + 1)) done jq -n \ --arg query "$query" \ --argjson should_trigger "$should_trigger" \ --argjson triggers "$triggers" \ --argjson runs "$RUNS" \ '{query: $query, should_trigger: $should_trigger, triggers: $triggers, runs: $runs, trigger_rate: ($triggers / $runs)}' done | jq -s '.' ``` -------------------------------- ### Implement multi-step workflow checklists Source: https://agentskills.io/skill-creation/best-practices Use checklists to help agents track progress and dependencies in complex workflows. ```markdown ## Form processing workflow Progress: - [ ] Step 1: Analyze the form (run `scripts/analyze_form.py`) - [ ] Step 2: Create field mapping (edit `fields.json`) - [ ] Step 3: Validate mapping (run `scripts/validate_fields.py`) - [ ] Step 4: Fill the form (run `scripts/fill_form.py`) - [ ] Step 5: Verify output (run `scripts/verify_output.py`) ``` -------------------------------- ### Run Bun Script Source: https://agentskills.io/skill-creation/using-scripts Execute a Bun script using the `bun run` command. Packages are cached globally, and the first run downloads dependencies. ```bash bun run scripts/extract.ts ``` -------------------------------- ### Run npm packages with bunx Source: https://agentskills.io/skill-creation/using-scripts Use bunx, Bun's equivalent of npx, to run npm packages. It is suitable for Bun-based environments. ```bash bunx eslint@9 --fix . ``` ```bash bunx create-vite@6 my-app ``` -------------------------------- ### Run Deno Script Source: https://agentskills.io/skill-creation/using-scripts Execute a Deno script using the `deno run` command. Dependencies are cached globally, and `--reload` can be used to force re-fetching. ```bash deno run scripts/extract.ts ``` -------------------------------- ### Compile and run Go packages with go run Source: https://agentskills.io/skill-creation/using-scripts Use go run to compile and run Go packages directly. It is built into the go command. Pin versions or use '@latest' for explicitness. ```bash go run golang.org/x/tools/cmd/goimports@v0.28.0 . ``` ```bash go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.0 run ``` -------------------------------- ### Execute database migration command Source: https://agentskills.io/skill-creation/best-practices A prescriptive bash command for running database migrations with verification and backup flags. ```bash python scripts/migrate.py --verify --backup ``` -------------------------------- ### Bun Script with Auto-installed Packages Source: https://agentskills.io/skill-creation/using-scripts A Bun script that auto-installs missing packages at runtime when no `node_modules` directory is present. Versions are pinned directly in the import path. ```typescript #!/usr/bin/env bun import * as cheerio from "cheerio@1.0.0"; const html = `
This is a test.
`; const $ = cheerio.load(html); console.log($("p.info").text()); ``` -------------------------------- ### List available scripts in SKILL.md Source: https://agentskills.io/skill-creation/using-scripts Reference bundled files using relative paths from the skill directory root in your SKILL.md file to make them available to the agent. ```markdown ```markdown SKILL.md # My Skill ## Scripts - run-linter: scripts/linter.sh - format-code: scripts/formatter.sh ``` ``` -------------------------------- ### Run npm packages with npx Source: https://agentskills.io/skill-creation/using-scripts Use npx to run npm packages, downloading them on demand. It is bundled with Node.js. Pin versions for reproducibility. ```bash npx eslint@9 --fix . ``` ```bash npx create-vite@6 my-app ``` -------------------------------- ### SKILL.md File Structure Source: https://agentskills.io/what-are-skills The SKILL.md file contains YAML frontmatter for metadata and Markdown for instructions. Required frontmatter includes 'name' and 'description'. ```mdx --- name: pdf-processing description: Extract PDF text, fill forms, merge files. Use when handling PDFs. --- # PDF Processing ## When to use this skill Use this skill when the user needs to work with PDF files... ## How to extract text 1. Use pdfplumber for text extraction... ## How to fill forms ... ``` -------------------------------- ### Define procedural vs specific instructions Source: https://agentskills.io/skill-creation/best-practices Contrast between hardcoded specific answers and reusable procedural methods for agent tasks. ```markdown Join the `orders` table to `customers` on `customer_id`, filter where `region = 'EMEA'`, and sum the `amount` column. 1. Read the schema from `references/schema.yaml` to find relevant tables 2. Join tables using the `_id` foreign key convention 3. Apply any filters from the user's request as WHERE clauses 4. Aggregate numeric columns as needed and format as a markdown table ``` -------------------------------- ### Run Ruby Script Source: https://agentskills.io/skill-creation/using-scripts Execute a Ruby script using the `ruby` command. This assumes Bundler is available and configured correctly for inline gems. ```bash ruby scripts/extract.rb ``` -------------------------------- ### Use Structured Output Formats Source: https://agentskills.io/skill-creation/using-scripts Prefer structured formats like JSON, CSV, or TSV for output. This allows for programmatic consumption by agents and standard command-line tools. Separate data from diagnostics by sending structured data to stdout and messages to stderr. ```bash # Whitespace-aligned — hard to parse programmatically NAME STATUS CREATED my-service running 2025-01-15 # Delimited — unambiguous field boundaries {"name": "my-service", "status": "running", "created": "2025-01-15"} ``` -------------------------------- ### Validating skills with `skills-ref` Source: https://agentskills.io/specification Use the `skills-ref validate` command to check if your `SKILL.md` frontmatter is valid and adheres to naming conventions. ```bash skills-ref validate ./my-skill ``` -------------------------------- ### Run scripts with deno run Source: https://agentskills.io/skill-creation/using-scripts Use deno run to execute scripts directly from URLs or specifiers. Requires permission flags for filesystem/network access and uses '--' to separate Deno flags from tool flags. ```bash deno run npm:create-vite@6 my-app ``` ```bash deno run --allow-read npm:eslint@9 -- --fix . ``` -------------------------------- ### Define Client Data Structure Source: https://agentskills.io/clients An array of objects containing metadata for each agent product, including branding assets and documentation links. ```javascript export const clients = [{ name: "Junie", description: "Junie is an LLM-agnostic coding agent built for real-world development. It is built on top of the IntelliJ Platform, so it understands your project the same way your editor does.", url: "https://junie.jetbrains.com/", lightSrc: "/images/logos/junie/junie-logo-on-white.svg", darkSrc: "/images/logos/junie/junie-logo-on-dark.svg", instructionsUrl: "https://junie.jetbrains.com/docs/agent-skills.html" }, { name: "Gemini CLI", description: "Gemini CLI is an open-source AI agent that brings the power of Gemini directly into your terminal.", url: "https://geminicli.com", lightSrc: "/images/logos/gemini-cli/gemini-cli-logo_light.svg", darkSrc: "/images/logos/gemini-cli/gemini-cli-logo_dark.svg", instructionsUrl: "https://geminicli.com/docs/cli/skills/", sourceCodeUrl: "https://github.com/google-gemini/gemini-cli" }, { name: "Autohand Code CLI", description: "Autohand Code CLI is an autonomous LLM-powered coding agent that lives in your terminal. It uses the ReAct (Reason + Act) pattern to understand your codebase, plan changes, and execute them with your approval.", url: "https://autohand.ai/", lightSrc: "/images/logos/autohand/autohand-light.svg", darkSrc: "/images/logos/autohand/autohand-dark.svg", scale: 0.8, instructionsUrl: "https://autohand.ai/docs/working-with-autohand-code/agent-skills.html", sourceCodeUrl: "https://github.com/autohandai/code-cli" }, { name: "OpenCode" ``` -------------------------------- ### Define output format templates Source: https://agentskills.io/skill-creation/best-practices Provide a structured template to ensure consistent output formatting from the agent. ```markdown ## Report structure Use this template, adapting sections as needed for the specific analysis: ```markdown # [Analysis Title] ## Executive summary [One-paragraph overview of key findings] ## Key findings - Finding 1 with supporting data - Finding 2 with supporting data ## Recommendations 1. Specific actionable recommendation 2. Specific actionable recommendation ``` ``` -------------------------------- ### POST /_mintlify/feedback/agent-skills/agent-feedback Source: https://agentskills.io/home Submits feedback regarding incorrect, outdated, or confusing documentation. ```APIDOC ## POST /_mintlify/feedback/agent-skills/agent-feedback ### Description Submit feedback for specific and actionable issues found in the documentation. ### Method POST ### Endpoint https://agentskills.io/_mintlify/feedback/agent-skills/agent-feedback ### Parameters #### Request Body - **path** (string) - Required - The current page path where the issue was found. - **feedback** (string) - Required - Description of the issue. ### Request Example { "path": "/current-page-path", "feedback": "Description of the issue" } ``` -------------------------------- ### Skill Test Cases Configuration Source: https://agentskills.io/skill-creation/evaluating-skills Define your skill's test cases in `evals/evals.json`. Each test case includes a prompt, expected output, and optional input files. This structure allows for systematic testing and iteration. ```json { "skill_name": "csv-analyzer", "evals": [ { "id": 1, "prompt": "I have a CSV of monthly sales data in data/sales_2025.csv. Can you find the top 3 months by revenue and make a bar chart?", "expected_output": "A bar chart image showing the top 3 months by revenue, with labeled axes and values.", "files": ["evals/files/sales_2025.csv"] }, { "id": 2, "prompt": "there's a csv in my downloads called customers.csv, some rows have missing emails — can you clean it up and tell me how many were missing?", "expected_output": "A cleaned CSV with missing emails handled, plus a count of how many were missing.", "files": ["evals/files/customers.csv"] } ] } ``` -------------------------------- ### Define code review process guidelines Source: https://agentskills.io/skill-creation/best-practices A markdown-based checklist for performing code reviews, focusing on security and concurrency. ```markdown ## Code review process 1. Check all database queries for SQL injection (use parameterized queries) 2. Verify authentication checks on every endpoint 3. Look for race conditions in concurrent code paths 4. Confirm error messages don't leak internal details ``` -------------------------------- ### Record run timing and token data Source: https://agentskills.io/skill-creation/evaluating-skills JSON structure for capturing performance metrics like total tokens and duration in milliseconds upon task completion. ```json { "total_tokens": 84852, "duration_ms": 23332 } ``` -------------------------------- ### Implement ClientShowcase React Component Source: https://agentskills.io/clients A functional component that manages client display state and renders a responsive grid of cards. Requires an array of client objects as props. ```javascript export const ClientShowcase = ({clients}) => { const shuffle = arr => { const copy = arr.slice(); for (let i = copy.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [copy[i], copy[j]] = [copy[j], copy[i]]; } return copy; }; const sort = clients => clients.toSorted((a, b) => a.name.localeCompare(b.name)); const [state, dispatch] = React.useReducer((state, action) => { switch (action) { case "shuffle": return { mode: "shuffle", clients: shuffle(clients) }; case "alpha": return { mode: "alpha", clients: sort(clients) }; default: return state; } }, { mode: "shuffle", clients: shuffle(clients) }); const Logo = ({client}) =>{client.description}
{(client.instructionsUrl || client.sourceCodeUrl) &&This is a test.
' print(BeautifulSoup(html, "html.parser").select_one("p.info").get_text()) ``` -------------------------------- ### Run Validation Script Source: https://agentskills.io/skill-creation/using-scripts Execute the validation script with a specified input file. Ensure the script path is relative to the skill directory root. ```bash bash scripts/validate.sh "$INPUT_FILE" ``` -------------------------------- ### Wrap Skill Content with Identifying Tags Source: https://agentskills.io/client-implementation/adding-skills-support Use identifying tags to wrap skill content when using a dedicated activation tool. This helps the model distinguish skill instructions and allows the harness to identify skill content during context compaction. ```xmlThis is a test.
`; const $ = cheerio.load(html); console.log($("p.info").text()); ``` -------------------------------- ### Define a roll-dice skill in SKILL.md Source: https://agentskills.io/skill-creation/quickstart Create this file in .agents/skills/roll-dice/SKILL.md to define the skill's name, description, and execution instructions. ```markdown --- name: roll-dice description: Roll dice using a random number generator. Use when asked to roll a die (d6, d20, etc.), roll dice, or generate a random dice roll. --- To roll a die, use the following command that generates a random number from 1 to the given number of sides: ```bash echo $((RANDOM %