agents: Skill for Claude Code

.agents/skills/sast-pathtraversal/SKILL.md

sast-pathtraversal is a skill for Claude Code, Codex from mtnyilmaz/agents. It costs 101 tokens per session (6,036 once invoked), scanned A, original, MIT.

A focused security assessment for path traversal, a vulnerability where file paths built from user input can escape an intended directory.

In plain words
What is it for?
It first locates dynamic file-loading operations, then checks whether user input can reach them and leave the permitted base directory.
Why use it?
It helps find cases where an attacker could read, write, or serve private files by manipulating path values.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; installed under .agents/ (shared by several agents).

This is mtnyilmaz/agents's own configuration. It tells Claude Code and Codex how to work on agents itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agents configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - Using `os.path.join` alone without `realpath` — `os.path.join('/base', '../etc/passwd')` still produces `/etc/passwd`.

Reuse

Borrowing it

Nothing to install: this file belongs to mtnyilmaz/agents. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mtnyilmaz/agents/main/.agents/skills/sast-pathtraversal/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/mtnyilmaz/agents

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sast-pathtraversal

README.md
[![agentmods](https://agentmods.dev/badge/skills/mtnyilmaz/agents/sast-pathtraversal.svg)](https://agentmods.dev/skills/mtnyilmaz/agents/sast-pathtraversal)
Your own site
<a href="https://agentmods.dev/skills/mtnyilmaz/agents/sast-pathtraversal"><img src="https://agentmods.dev/badge/skills/mtnyilmaz/agents/sast-pathtraversal.svg" alt="Measured on agentmods" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,036 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00101 $0.06036
Opus 5 $0.00051 $0.03018
Sonnet 5 $0.00020 $0.01207
Haiku 4.5 $0.00010 $0.00604

Measured 8d ago against content hash 2f253ab32ecd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

sast-pathtraversal scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

> [curl command or payload to confirm this finding.
.agents/skills/sast-pathtraversal/SKILL.md · 500 lines

How it starts

The opening of the file, as written. The whole thing — 500 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Path Traversal Detection

You are performing a focused security assessment to find path traversal vulnerabilities in a codebase. This skill uses a two-phase approach with subagents: sink discovery (find all places where files are loaded using dynamically constructed paths) then taint (confirm whether user-supplied input reaches those sinks and can escape the intended directory).

Prerequisites: sast/architecture.md must exist. Run the analysis skill first if it doesn't.


What is Path Traversal

Path traversal (also called directory traversal) occurs when user-supplied input is incorporated into a file path that is then used to read, write, or serve files from the filesystem — without properly constraining the resulting path to an intended base directory. An attacker can supply sequences like ../ or encoded variants (%2e%2e%2f, ..%2f, %2e%2e/) to escape the intended directory and access arbitrary files such as /etc/passwd, application source code, credentials, or private keys.

The core pattern: unvalidated user input reaches a filesystem operation and the resolved path is not verified to remain within the intended base directory.

What Path Traversal IS

  • Serving a user-requested filename directly from a base directory without canonicalizing and checking the resulting path: open(os.path.join(BASE_DIR, user_filename))
  • Constructing a file path from a URL parameter and passing it to a file-read function: fs.readFile(path.join(__dirname, req.query.file), ...)
  • Template rendering or include directives driven by user input: include($_GET['page'] . '.php')
  • Archive extraction (ZipFile, tarfile, zipslip) where entry names are used as output paths without stripping ../ components
  • Using send_file() / send_from_directory() / res.sendFile() with an unsanitized user-controlled path
  • Reading a file whose path is derived from a user-controlled database value that was stored without sanitization

What Path Traversal is NOT

Read the full file on GitHub · 500 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 500 lines · 101 tokens per session scan A 2f253ab32ecd

Subscribe to this mod's changes

sast-pathtraversal is a skill published in the GitHub repository mtnyilmaz/agents (6 stars, last pushed 3mo ago), licensed MIT. It adds 101 tokens to every session and 6,036 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens