CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

csrf-protection

Implements CSRF protection using synchronizer tokens, double-submit cookies, and SameSite attributes. Use when securing web forms, protecting state-changing endpoints, or implementing defense-in-depth authentication.

72

Quality

91%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

86%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

Well-structured, token-efficient content with near-executable code and excellent reference hygiene. The main weaknesses are the incomplete express-session setup in the primary snippet and the absence of a verification step for the implemented protection.

Suggestions

Add the missing setup lines to the Express example (e.g., `const session = require('express-session')` and the `app.use(session({...}))` wiring) so the token middleware snippet is fully copy-paste runnable.

Add a short verification section, such as a curl example confirming a POST without the token returns 403, giving the workflow an explicit validation checkpoint.

Consider a one-line note on when to choose 'strict' vs 'lax' SameSite, since the code comment currently defers that decision without guidance.

DimensionReasoningScore

Conciseness

The body is lean throughout: a comparison table instead of prose, no re-explanation of what CSRF is, and the timingSafeEqual RangeError comment is genuinely non-obvious knowledge that earns its tokens. Every section adds information Claude would not already have, matching anchor 5.

5 / 5

Actionability

The Express middleware, validation, session config, and HTML form snippets are concrete and nearly copy-paste ready, but `app` and `session` are never required/imported (express-session setup is absent), so the primary snippet has minor gaps. Fits anchor 4; not 5 because the main example is not fully self-contained.

4 / 5

Workflow Clarity

Sections give a coherent application order (methods overview, token middleware with explicit 403 failure handling, cookie config, form integration, pitfalls) and the validation code includes explicit rejection paths. It is not 5 because no end-to-end verification step is given (e.g., confirming a tokenless request is rejected); not 3 because failure handling is explicit rather than missing.

4 / 5

Progressive Disclosure

One clearly signaled, one-level-deep reference (references/python-react.md, which exists) with a bulleted list of exactly what it contains; the Python/React implementations are appropriately offloaded from the main file. Matches anchor 5: clear overview, well-signaled references, easy navigation.

5 / 5

Total

18

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: concrete multi-technique capability statement in third person, paired with an explicit and specific 'Use when...' clause. The only gap is missing natural synonyms such as the spelled-out 'Cross-Site Request Forgery' phrasing a user might type.

DimensionReasoningScore

Specificity

"Implements CSRF protection using synchronizer tokens, double-submit cookies, and SameSite attributes" names the domain plus three concrete techniques, matching the anchor-5 shape of multiple specific concrete actions with comprehensive coverage. It is not 4 because the technique coverage is complete rather than having minor gaps, and it uses correct third-person voice.

5 / 5

Completeness

Explicitly answers both: the "what" ("Implements CSRF protection using synchronizer tokens, double-submit cookies, and SameSite attributes") and the "when" ("Use when securing web forms, protecting state-changing endpoints, or implementing defense-in-depth authentication") with concrete trigger phrases. Matches anchor 5 exactly; not 4 because the "when" clause is already explicit and specific.

5 / 5

Trigger Term Quality

Natural trigger phrases like "securing web forms", "protecting state-changing endpoints", and "CSRF protection" are present, but the spelled-out synonym "Cross-Site Request Forgery" and common phrasings like "session fixation"-adjacent security vocabulary are missing. Good keyword coverage with a few natural terms missing fits anchor 4; not 5 because synonym coverage is incomplete.

4 / 5

Distinctiveness Conflict Risk

CSRF protection is a clear niche with distinct, unambiguous triggers; only slight adjacency to broader authentication/session skills. Clear niche with distinct triggers and minimal conflict risk fits anchor 5.

5 / 5

Total

19

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

secondsky/claude-skills

Path

plugins/csrf-protection/skills/csrf-protection/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.