Agent Skills: The Folder That Replaced Your Prompt Library
From the publisher’s feed, collected in the ZeroLabs newsroom.
source: OpenAI GPT Image 2.5 modelThe refund agent worked perfectly in staging. In production, it told a customer in Germany that digital subscriptions were non-refundable, then offered a full refund to a customer who had already received two. The system prompt had grown to 4,000 tokens: policy, escalation rules, tone guidance, fourteen examples, and a note about a payments API quirk. Nobody could tell which line was wrong.That is the quiet failure of the prompt library era. A prompt starts compact. Then policy adds a rule, support adds an edge case, and engineering adds an API caveat. A year later, it is a policy manual that every request carries, even when the user just wants an order status. The model reads all of it every time, and you pay for all of it every time.Adding another 2,000 tokens makes it worse. More instructions compete for attention, the model drops the one that matters, and the regression is invisible because nobody can diff a paragraph living in a dashboard.Your agent does not need a bigger prompt. It needs a folder.The 4,000-Token Procedure Nobody MaintainsA prompt library feels organized because the prompts are stored together. In practice, it is a filing cabinet with no schema. The refund instructions live in a Python string, the escalation rules in a Notion page, and the examples in a document three people edited this quarter. The production prompt is assembled by a script nobody wants to touch.The costs compound: every instruction is paid for on every call, forty rules compete for attention, there is no commit history to bisect, no way to unit test a paragraph, and no owner who reviews the diff.The deeper problem is that a prompt mixes three kinds of knowledge with different lifecycles. The procedure changes when the workflow changes. The reference material changes when policy changes. The executable checks change when the API changes. Stuffing all three into one string means every change is a full rewrite of the same artifact.Agent Skills separate those layers. A skill is a folder with a small metadata card, a procedure, and optional resources. The agent sees the metadata at startup, loads the procedure only when the task matches, and reaches for the resources only when the procedure says so.What Is an Agent Skill?An Agent Skill is a folder containing a SKILL.md file with metadata and instructions, plus optional scripts, references, and assets, that an agent discovers from its description and loads only when a task calls for it.The minimum is one file. A folder named refund-triage contains a SKILL.md with YAML frontmatter and a Markdown body. It can also contain scripts/ for executable code, references/ for policy documents and schemas, and assets/ for templates and fixtures.The Agent Skills specification defines what goes inside the folder, not where it lives or how an agent discovers it. That is left to the client: Claude Code reads ~/.claude/skills/ and .claude/skills/, VS Code reads .agents/skills/. Portability comes from the folder format, not a universal install path.Anthropic launched Agent Skills in October 2025, published the format as an open standard in December 2025, and donated it to the Agentic AI Foundation in October 2026. Anthropic reported more than 70 integrated platforms, including ChatGPT, Cursor, GitHub Copilot, and VS Code, with about one million skills published and nearly 280 million installs. Those are vendor numbers, but the direction is clear.A skill is not a tool, an MCP server, or a subagent. It does not add an action, standardize a connection, or create a separate reasoning loop. It packages the knowledge that tells the agent how to use the actions it already has.The Three Levels of Progressive DisclosureAgent Skills use a three-level loading model. The levels are why a skill library can grow without turning every request into a context tax.At level one, the agent sees a name and description. That is enough to decide relevance, not enough to perform the task. At level two, it reads the workflow, boundaries, validation, and examples. At level three, it reads a policy reference, runs a script, or opens a template only if the workflow reaches that point.A three-level progressive disclosure ladder showing skill metadata at the top, the SKILL.md instructions in the middle, and bundled references and scripts at the bottom, with a token budget bar on the right showing how much context each level consumes.The refund skill shows the pattern. At startup, the agent sees the name and description. When a ticket mentions a refund, it reads the body. If policy is disputed, it reads references/refund-policy.md. If it needs eligibility, it runs the script and reads the JSON output. The script's source never enters the context window.Progressive disclosure also moves deterministic work out of context. A script can hold a hundred lines of policy logic while the model sees a compact result. The cost is the output, not the implementation.Metadata is always loaded, so fifty skills with 1,024-character descriptions add a small book to every request. Write descriptions like routing rules, not marketing copy.Anatomy of a Skill That TriggersA skill folder is deliberately boring:SKILL.md is required. It holds the frontmatter and the procedure.scripts/ is optional. It holds executable code the agent can run.references/ is optional. It holds documents the agent reads on demand.assets/ is optional. It holds templates, fixtures, and static resources.The SKILL.md frontmatter is where most skills succeed or fail. The spec requires two fields and allows four optional ones.The description is the router. The agent does not read the body until it decides the skill is relevant, and it decides from the name and description alone. A vague description causes false positives. A narrow description causes silent misses.Here is the description that shipped with the first version of the refund skill:Helps with refunds.That description will trigger on billing questions, cancellation requests, invoice problems, and anything else that mentions money. It tells the agent nothing about the boundaries. Here is the version that survived several rounds of trigger evals:Triages customer refund requests against policy, checks eligibility, and drafts a response. Use when a support ticket mentions a refund, chargeback, duplicate charge, cancellation with a refund request, or billing dispute.he second version names the task, the action, and the trigger vocabulary. It also implies the boundary: a cancellation without a refund request is a different workflow. The body can make that boundary explicit.Inside the body, include when to use the skill, when not to use it, the inputs the agent must collect, a numbered workflow, a validation step, one good example, and failure handling. Keep the body under 500 lines and move detail into references/. Keep file references one level deep.---name: refund-triagedescription: Triages customer refund requests against policy, checks eligibility, and drafts a response. Use when a support ticket mentions a refund, chargeback, duplicate charge, cancellation with a refund request, or billing dispute.license: MITcompatibility: Requires Python 3.11+ and no network access.metadata: author: support-platform version: "1.0"allowed-tools: Read---# Refund Triage## When to use this skill- A customer asks for a refund, credit, or chargeback.- A ticket mentions a duplicate charge or an unauthorized charge.- A cancellation request also asks for money back.## When not to use this skill- The customer only wants to update a payment method.- The ticket is a general billing question with no refund request.- The order is already in a formal chargeback dispute. Route it to the disputes team.## InputsCollect these fields before running the eligibility check:- `order_id`- `purchase_date` in ISO 8601 format- `amount_usd`- `product_type`: physical, digital, or subscription- `prior_refunds`: integer count in the last 12 months## Workflow1. Confirm the order ID and purchase date from the order record, not from the customer's memory.2. Write the fields to a JSON object.3. Run `python scripts/check_refund_eligibility.py --input payload.json`.4. If the script exits 2, ask for the missing or invalid fields. Do not guess.5. If `requires_review` is true, escalate to a human before promising anything.6. If the customer disputes the policy, read `references/refund-policy.md` and quote the relevant rule.7. Draft the reply with `assets/response-template.md`.8. Never promise a refund before the payments tool confirms it.## Validation- The script must exit 0 before you use its result.- The response must include the policy version when the customer asks why.- A refund above 500 USD always requires human review.- If the payments tool fails, retry once. If it fails again, escalate.## ExampleInput: {"order_id": "ORD-1042", "purchase_date": "2026-10-20", "amount_usd": 89.0, "product_type": "subscription", "prior_refunds": 0}Output: {"order_id": "ORD-1042", "eligible": true, "requires_review": false, "reason_codes": ["prorate_remaining_period"], "policy_version": "2026-01", "days_since_purchase": 14, "refund_window_days": 30}## Failure handling- Missing data: ask one concise question that lists the missing fields.- Policy conflict: escalate with the order ID and the reason codes.- Tool error: do not retry more than once.Skill vs Tool vs MCP vs SubagentThe fastest way to misuse a skill is to treat it as a tool. A tool exposes an action: create_refund, lookup_order, send_email. A skill teaches the agent when to call those actions, in what order, with what checks, and what to do when one fails. The tool is the hand. The skill is the procedure.A decision tree for choosing between a skill, a tool, an MCP server, and a subagent, starting from the question of what the agent needs and branching into the four units. (source: OpenAI GPT Image 2.5 model)The same distinction separates a skill from an MCP server and a subagent.The decision rule is simpler than the table:If the agent needs to know how, write a skill.If the agent needs to do something new, write a tool.If many clients need the same external capability, expose it through MCP.If the work needs a separate context or parallel execution, use a subagent.These units compose. A skill can tell the agent to use an MCP tool. A subagent can load a skill. The mistake is using a heavier unit for a lighter problem. A refund policy in a tool schema is a workflow with a bad interface. A subagent for a five-step procedure adds latency without capability.Bundling Deterministic CodeThe SKILL.md above tells the agent to run scripts/check_refund_eligibility.py. That script is the most important file in the folder, and it is not written in English.Eligibility is deterministic. It depends on purchase date, product type, amount, prior refunds, and policy version. Asking a language model to compare dates, apply precedence, and detect duplicate charges is asking it to do arithmetic and policy logic in its head. It will be right most of the time. The times it is wrong cost money.A script gives reproducibility, testability, auditability, and cheap execution. The same input produces the same output. You can unit test the 30-day boundary and log the policy version. The model reads the result, not the code.The skill body tells the agent when to run the script and how to interpret the output. The script returns JSON with eligible, reason_codes, requires_review, and policy_version. The prose explains the policy; the script enforces it.#!/usr/bin/env python3"""Check refund eligibility against a versioned policy.This is the deterministic script referenced by refund-triage/SKILL.md."""# Bad: ask the model to compare dates and apply policy in its head.# Good: run this deterministic script and explain the JSON result.import argparseimport jsonimport sysfrom datetime import datefrom pathlib import PathPOLICY_VERSION = "2026-01"RETURN_WINDOW_DAYS = 30DIGITAL_WINDOW_DAYS = 14MAX_REFUNDS_PER_YEAR = 2REVIEW_THRESHOLD_USD = 500def parse_date(value): try: return date.fromisoformat(value) except (TypeError, ValueError): raise ValueError("purchase_date must be ISO 8601 (YYYY-MM-DD)")def evaluate(payload, today=None): if not isinstance(payload, dict): raise ValueError("payload must be a JSON object") required = ["order_id", "purchase_date", "amount_usd", "product_type", "prior_refunds"] missing = [key for key in required if key not in payload] if missing: raise ValueError("missing fields: " + ", ".join(missing)) today = today or date.today() purchase = parse_date(payload["purchase_date"]) age = (today - purchase).days if age raise ValueError("purchase_date cannot be in the future") amount = float(payload["amount_usd"]) if amount raise ValueError("amount_usd must be positive") product_type = payload["product_type"] if product_type not in {"physical", "digital", "subscription"}: raise ValueError("product_type must be physical, digital, or subscription") prior_refunds = int(payload["prior_refunds"]) window = DIGITAL_WINDOW_DAYS if product_type == "digital" else RETURN_WINDOW_DAYS reasons = [] eligible = True requires_review = False if age > window: eligible = False reasons.append("outside_refund_window") if prior_refunds >= MAX_REFUNDS_PER_YEAR: eligible = False reasons.append("refund_limit_reached") if amount > REVIEW_THRESHOLD_USD: requires_review = True reasons.append("high_value_review") if product_type == "subscription" and age reasons.append("prorate_remaining_period") return { "order_id": payload["order_id"], "eligible": eligible, "requires_review": requires_review, "reason_codes": reasons, "policy_version": POLICY_VERSION, "days_since_purchase": age, "refund_window_days": window, }def self_test(): today = date(2026, 11, 2) cases = [ ({"order_id": "A", "purchase_date": "2026-10-20", "amount_usd": 89, "product_type": "subscription", "prior_refunds": 0}, True), ({"order_id": "B", "purchase_date": "2026-09-01", "amount_usd": 40, "product_type": "physical", "prior_refunds": 0}, False), ({"order_id": "C", "purchase_date": "2026-10-30", "amount_usd": 700, "product_type": "digital", "prior_refunds": 0}, True), ({"order_id": "D", "purchase_date": "2026-10-30", "amount_usd": 20, "product_type": "digital", "prior_refunds": 2}, False), ] for payload, expected in cases: result = evaluate(payload, today=today) assert result["eligible"] is expected, (payload, result) print("self-test passed")def main(): parser = argparse.ArgumentParser(description="Check refund eligibility.") parser.add_argument("--input", help="Path to a JSON payload. Reads stdin when omitted.") parser.add_argument("--self-test", action="store_true", help="Run built-in checks and exit.") args = parser.parse_args() if args.self_test: self_test() return 0 try: raw = Path(args.input).read_text(encoding="utf-8") if args.input else sys.stdin.read() payload = json.loads(raw) result = evaluate(payload) except (OSError, TypeError, ValueError, json.JSONDecodeError) as exc: print(json.dumps({"error": str(exc)}), file=sys.stderr) return 2 print(json.dumps(result, indent=2)) return 0if __name__ == "__main__": raise SystemExit(main())The script is deliberately boring: parse the input, validate the fields, apply the policy windows, and return a structured decision. It supports --input or stdin, exits 2 on invalid data, and ships with a self-test. The model never does the date arithmetic.Four rules keep scripts safe:Pin dependencies or stay self-contained.Validate input and exit nonzero.Emit structured JSON, not prose.Never print secrets.Ship --help and a self-test.The bad pattern asks the model to compare dates, apply policy precedence, and decide eligibility in one pass. The good pattern runs a script, gets a JSON decision, and uses the model to explain it. The model still does the language work. It stops doing the arithmetic.Scripts are executable code. A skill that can run a script can read files, make network calls, and modify state.Trigger EvalsA skill that never fires is dead weight. A skill that always fires is a tax. The difference is the description, and the description is a classifier. You would not ship a classifier without a test set.A trigger eval is a labeled set of realistic prompts. Each prompt has one expected outcome: activate or not. Run the set, record what happened, compute precision and recall.Use about twenty prompts: ten should trigger, ten should not. Vary phrasing and detail. Make negatives near-misses. For refunds, “I want my money back” is positive; “Cancel my subscription” is a strong negative because it is adjacent but not a refund.Run each prompt three times. Model behavior is nondeterministic, and a single run will lie to you. Treat a prompt as triggered if it fires in more than half the runs. Split train and validation so you do not overfit the description.#!/usr/bin/env python3"""Measure whether a skill description triggers on the right prompts.This harness tests discovery, not execution. Replace KeywordRouter with afunction that calls your agent and reports whether the skill was loaded.Run: python skill_trigger_eval.py python skill_trigger_eval.py --cases triggers.json --threshold 0.15 --runs 3"""from __future__ import annotationsimport argparseimport jsonimport refrom dataclasses import dataclassfrom pathlib import Path# Bad: "Helps with refunds." is too broad and has low precision.# Good: the description below names the task and the trigger vocabulary.DESCRIPTION = ( "Triages customer refund requests against policy, checks eligibility, and drafts a response. " "Use when a support ticket mentions a refund, money back, chargeback, duplicate charge, " "cancellation with a refund request, or billing dispute.")@dataclass(frozen=True)class EvalCase: id: str query: str should_trigger: bool split: str = "train"# Small demo set. Expand to about 20 cases, including near-miss negatives.SAMPLE_CASES = [ EvalCase("refund-01", "I want my money back for the annual plan.", True), EvalCase("refund-02", "Customer is asking for a chargeback on order ORD-99.", True), EvalCase("refund-03", "We charged the customer twice for the same order.", True), EvalCase("refund-04", "Refund request for a digital subscription purchased 12 days ago.", True), EvalCase("refund-05", "Can you reverse the charge? The customer cancelled within the trial.", True), EvalCase("refund-06", "Billing dispute: the customer wants a refund for a duplicate charge.", True, "validation"), EvalCase("refund-07", "How do I update my billing address?", False), EvalCase("refund-08", "The invoice PDF is blank.", False), EvalCase("refund-09", "Cancel my subscription at the end of the month.", False), EvalCase("refund-10", "Where is my order?", False), EvalCase("refund-11", "Can you change the payment method on file?", False), EvalCase("refund-12", "The customer wants to upgrade to the annual plan.", False, "validation"),]class KeywordRouter: """Deterministic baseline. Not a substitute for your agent's router.""" def __init__(self, description: str, threshold: float = 0.15) -> None: self.description = description self.threshold = threshold self.keywords = self._keywords(description) @staticmethod def _keywords(text: str) -> set[str]: stop = {"a", "an", "and", "are", "as", "at", "be", "by", "for", "from", "in", "is", "it", "of", "on", "or", "that", "the", "to", "when", "with"} return {word for word in re.findall(r"[a-z0-9]+", text.lower()) if word not in stop and len(word) > 2} def score(self, query: str) -> float: query_words = set(re.findall(r"[a-z0-9]+", query.lower())) if not query_words: return 0.0 return len(query_words & self.keywords) / len(query_words) def should_trigger(self, query: str) -> bool: return self.score(query) >= self.thresholddef _metrics(counts: dict[str, int]) -> tuple[float, float, float]: precision = counts["tp"] / (counts["tp"] + counts["fp"]) if counts["tp"] + counts["fp"] else 0.0 recall = counts["tp"] / (counts["tp"] + counts["fn"]) if counts["tp"] + counts["fn"] else 0.0 f1 = 2 * precision * recall / (precision + recall) if precision + recall else 0.0 return precision, recall, f1def run_eval( cases: list[EvalCase], router: KeywordRouter, runs: int = 3, trigger_threshold: float = 0.5,) -> dict[str, float]: counts = {"tp": 0, "fp": 0, "fn": 0, "tn": 0} by_split: dict[str, dict[str, int]] = {} failures: list[str] = [] for case in cases: hits = sum(router.should_trigger(case.query) for _ in range(runs)) prediction = (hits / runs) >= trigger_threshold correct = prediction == case.should_trigger if case.should_trigger and prediction: key = "tp" elif case.should_trigger: key = "fn" elif prediction: key = "fp" else: key = "tn" counts[key] += 1 bucket = by_split.setdefault(case.split, {"tp": 0, "fp": 0, "fn": 0, "tn": 0}) bucket[key] += 1 score = router.score(case.query) if hasattr(router, "score") else 0.0 status = "PASS" if correct else "FAIL" print(f"[{status}] {case.id:10} split={case.split:10} expected={case.should_trigger!s:5} got={prediction!s:5} rate={hits}/{runs} score={score:.2f} {case.query}") if not correct: failures.append(case.id) print("\nPer split") for split, bucket in sorted(by_split.items()): precision, recall, f1 = _metrics(bucket) print(f" {split:10} precision={precision:.2f} recall={recall:.2f} f1={f1:.2f}") precision, recall, f1 = _metrics(counts) print("\nConfusion matrix") print(f" TP={counts['tp']} FP={counts['fp']} FN={counts['fn']} TN={counts['tn']}") print(f" precision={precision:.2f} recall={recall:.2f} f1={f1:.2f}") if failures: print(f" inspect: {', '.join(failures)}") return {"precision": precision, "recall": recall, "f1": f1, **counts}def load_cases(path: str | None) -> list[EvalCase]: if not path: return SAMPLE_CASES raw = json.loads(Path(path).read_text(encoding="utf-8")) allowed = {"id", "query", "should_trigger", "split"} return [EvalCase(**{key: value for key, value in item.items() if key in allowed}) for item in raw]def main() -> int: parser = argparse.ArgumentParser(description="Evaluate skill trigger precision and recall.") parser.add_argument("--cases", help="JSON file with id, query, should_trigger, and optional split.") parser.add_argument("--threshold", type=float, default=0.15, help="Keyword overlap threshold.") parser.add_argument("--runs", type=int, default=3, help="Runs per prompt.") parser.add_argument("--trigger-threshold", type=float, default=0.5, help="Fraction of runs that must trigger.") args = parser.parse_args() if args.runs parser.error("--runs must be at least 1") if not 0 parser.error("--threshold must be between 0 and 1") if not 0 parser.error("--trigger-threshold must be between 0 and 1") router = KeywordRouter(DESCRIPTION, threshold=args.threshold) run_eval(load_cases(args.cases), router, runs=args.runs, trigger_threshold=args.trigger_threshold) return 0if __name__ == "__main__": raise SystemExit(main())The harness loads a labeled set, runs a pluggable router, and reports precision, recall, F1, and the exact failures. The keyword router is a baseline. Replace it with a function that calls your agent and reports whether the skill was loaded. The harness tests discovery, not execution.Read the failures before editing. A false positive means the description is too broad. A false negative means it is missing a phrase. Fix the boundary, then rerun the validation split.The Security BoundaryA skill is executable instructions from a possibly untrusted source. That sentence should change how you install them.A skill trust boundary diagram showing an untrusted skill folder feeding instructions into an agent, with the agent separated from tools, secrets, and network access by a permission gate that blocks one risky path. (source: OpenAI GPT Image 2.5 model)The folder looks like documentation, but the agent treats it as instructions. A malicious skill can tell the agent to read a credential file, send customer data to an endpoint, or call a tool the user never approved. Frontmatter loads at startup. The body loads on activation. Scripts run with the host’s permissions. The trust boundary is not the folder. It is the permission gate between the skill and tools, secrets, and network.A January 2026 study of 31,132 skills from two marketplaces found 26.1 percent contained at least one vulnerability: 13.3 percent data exfiltration, 11.8 percent privilege escalation, and 5.2 percent high-severity patterns. Skills with executable scripts were 2.12 times more likely to be vulnerable. A 2026 benchmark, Skill-Inject, reported attack success rates up to 80 percent against frontier models. These are research findings, not proof that every marketplace is unsafe, but they justify treating a skill like a dependency.The practical review is not complicated:Read the full SKILL.md, including frontmatter.Inspect every script and dependency for network calls, file reads, shell execution, and secrets.Check allowed-tools and remove broad grants.Run in a sandbox with no production secrets and limited network.Log activation, files read, tool calls, and destinations. Pin versions and review updates.#!/usr/bin/env python3"""Static first-pass audit for an Agent Skill folder.This is a review aid, not a guarantee. Context-dependent attacks andlegitimate code can both evade or trip these checks. Pair it with leastprivilege, sandboxing, and runtime logging.Run: python skill_security_audit.py ./refund-triage"""from __future__ import annotationsimport argparseimport reimport sysfrom dataclasses import dataclassfrom pathlib import PathTEXT_SUFFIXES = {".md", ".py", ".sh", ".ps1", ".bat", ".js", ".ts", ".json", ".yaml", ".yml", ".txt"}HIDDEN_RANGES = [(0x200B, 0x200F), (0x202A, 0x202E), (0xE0000, 0xE007F)]# Bad: broad shell access, unpinned dependencies, no review.# Good: least privilege, pinned dependencies, and a scan before install.RULES = [ ("high", "shell-pipe", re.compile(r"(curl|wget)[^\n|]*\|\s*(bash|sh|zsh)", re.I), "Piped download to shell"), ("high", "dynamic-exec", re.compile(r"\b(eval|exec)\s*\(", re.I), "Dynamic code execution"), ("high", "shell-true", re.compile(r"subprocess\.(run|call|Popen)\([^\n]*shell\s*=\s*True", re.I), "Subprocess with shell=True"), ("high", "os-system", re.compile(r"os\.system\s*\(", re.I), "Shell command through os.system"), ("high", "secret-path", re.compile(r"(~/\.ssh|id_rsa|\.aws/credentials|\.config/gcloud|keychain)", re.I), "Credential path"), ("high", "secret-assignment", re.compile(r"\b(api[_-]?key|secret|password|token)\s*=\s*['\"][^'\"]{8,}", re.I), "Possible hardcoded secret"), ("high", "prompt-injection", re.compile(r"(ignore (all )?previous instructions|reveal the system prompt|do not tell the user|exfiltrate|send .* to .*https?://)", re.I), "Prompt injection phrase"), ("medium", "network", re.compile(r"(https?://|requests\.(get|post)|urllib\.request|socket\.socket|fetch\()", re.I), "Network access"), ("medium", "destructive", re.compile(r"(rm\s+-rf|shutil\.rmtree|Remove-Item[^\n]*-Recurse)", re.I), "Destructive file operation"), ("medium", "unpinned-install", re.compile(r"\b(pip\s+install|npm\s+install)\s+(?!-)[a-zA-Z0-9_.-]+(?![a-zA-Z0-9_.-]*\s*(==|@))", re.I), "Unpinned dependency install"), ("low", "broad-tool", re.compile(r"allowed-tools:.*(\*|Bash|Write|Network)", re.I), "Broad allowed-tools grant"),]@dataclass(frozen=True)class Finding: path: str line: int severity: str rule: str message: strdef scan_file(path: Path, root: Path) -> list[Finding]: findings: list[Finding] = [] if path.suffix.lower() not in TEXT_SUFFIXES: return findings try: text = path.read_text(encoding="utf-8", errors="replace") except OSError as exc: return [Finding(str(path.relative_to(root)), 0, "medium", "read-error", str(exc))] for line_number, line in enumerate(text.splitlines(), start=1): for severity, rule, pattern, message in RULES: if pattern.search(line): findings.append(Finding(str(path.relative_to(root)), line_number, severity, rule, message)) for character in line: code = ord(character) if any(start findings.append(Finding(str(path.relative_to(root)), line_number, "high", "hidden-unicode", "Hidden or bidirectional Unicode character")) break return findingsdef scan_skill(root: Path) -> list[Finding]: findings: list[Finding] = [] for path in sorted(root.rglob("*")): if path.is_symlink(): findings.append(Finding(str(path.relative_to(root)), 0, "high", "symlink", "Symlink can escape the skill folder")) elif path.is_file(): findings.extend(scan_file(path, root)) skill_md = root / "SKILL.md" if not skill_md.exists(): findings.append(Finding("SKILL.md", 0, "high", "missing-skill-md", "SKILL.md is required")) return findingsdef main() -> int: parser = argparse.ArgumentParser(description="Audit an Agent Skill folder.") parser.add_argument("path", help="Path to the skill folder.") parser.add_argument("--strict", action="store_true", help="Fail on medium findings too.") args = parser.parse_args() root = Path(args.path).resolve() if not root.is_dir(): print(f"error: {root} is not a directory", file=sys.stderr) return 2 findings = scan_skill(root) if not findings: print("No findings. This is a first pass, not a safety guarantee.") return 0 order = {"high": 0, "medium": 1, "low": 2} for finding in sorted(findings, key=lambda item: (order[item.severity], item.path, item.line)): location = f"{finding.path}:{finding.line}" if finding.line else finding.path print(f"[{finding.severity.upper():6}] {location:40} {finding.rule:18} {finding.message}") counts = {level: sum(1 for item in findings if item.severity == level) for level in order} print(f"\nSummary: {counts['high']} high, {counts['medium']} medium, {counts['low']} low") print("Static checks cannot prove a skill is safe. Review the full instructions and scripts.") if counts["high"] or (args.strict and counts["medium"]): return 1 return 0if __name__ == "__main__": raise SystemExit(main())The audit script scans for shell execution, eval and exec, hardcoded secrets, outbound URLs, broad allowed-tools, hidden Unicode, and prompt injection phrases. It assigns severity and exits nonzero on high findings, so you can wire it into CI. Run it on the refund-triage folder.The scanner is a first pass, not a guarantee. It will miss context-dependent attacks and flag legitimate code. The real controls are least privilege, sandboxing, and logging.Adoption ChecklistStart with one workflow that has clear boundaries and a deterministic validation step. Refund triage is a good candidate: the policy is written down, eligibility is testable, and mistakes are expensive.The rollout can be small:Then expand. Add a second skill only when the first one is stable and the new workflow is genuinely different. Ten mediocre skills are worse than one reliable skill, because every metadata card is a context tax and every bad description is a routing conflict.Retire skills aggressively. A skill that never triggers is not free. It occupies metadata space, confuses the router, and creates a maintenance obligation.Final ThoughtsThe prompt library treated knowledge as text. The skill era treats it as a package with a discovery layer, a procedure, executable checks, and a permission boundary. That is more demanding, but more honest. It forces you to decide what the agent needs to know, when, and what it is allowed to do with that knowledge.The folder is not magic. It is a contract. Metadata promises relevance. The body promises a procedure. Scripts promise determinism. The permission gate promises a limit. Teams that get value take all four seriously.The unit of agent reuse is moving from prompts to packages. If your agent still carries a 4,000-token policy manual in every request, you do not have a knowledge problem. You have a packaging problem.Here are several key takeaways from this article:A skill is a folder, not a prompt. It packages metadata, instructions, and optional scripts and references, and the agent loads each layer only when needed.Progressive disclosure keeps context small. Metadata is always loaded, the body loads on activation, and resources load on demand. The total library can grow while the active context stays lean.The description is the router. Write it for discovery, include the words real users type, and test it with positive and near-miss negative prompts.Bundle deterministic work in scripts. Dates, policy precedence, validation, and arithmetic belong in code, not in the model’s head.A skill is executable instructions. Treat third-party skills like dependencies: review the frontmatter and scripts, grant least privilege, sandbox execution, and log what happens.Start with one workflow and measure it. Trigger evals and script tests turn a clever folder into a reliable part of your agent stack.Thank you for reading this article! I hope you found it helpful. If you have any questions or feedback, please feel free to reach out to me.Agent Skills: The Folder That Replaced Your Prompt Library was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.