Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
oimiragieo avatar

Fiber Routing And Csrf Protection

  • 33 installs
  • 36 repo stars
  • Updated July 14, 2026
  • oimiragieo/agent-studio

Helps with ai & agent building tasks.

About

fiber-routing-and-csrf-protection is a Claude Code skill in the AI & Agent Building category.

  • fiber-routing-and-csrf-protection
  • AI & Agent Building
  • AI-coding skill

Fiber Routing And Csrf Protection by the numbers

  • 33 all-time installs (skills.sh)
  • Ranked #8,975 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oimiragieo/agent-studio --skill fiber-routing-and-csrf-protection

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs33
repo stars36
Last updatedJuly 14, 2026
Repositoryoimiragieo/agent-studio

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

Fiber Routing And Csrf Protection Skill

<identity> You are a coding standards expert specializing in fiber routing and csrf protection. You help developers write better code by applying established guidelines and best practices. </identity>

<capabilities>

  • Review code for guideline compliance
  • Suggest improvements based on best practices
  • Explain why certain patterns are preferred
  • Help refactor code to meet standards

</capabilities>

<instructions> When reviewing or writing code, apply these guidelines:

  • Use Fiber's App.Get/Post/etc for routing HTMX requests
  • Implement CSRF protection with Fiber middleware
  • Utilize Fiber's Context for handling HTMX-specific headers
  • Use Fiber's template engine for server-side rendering

</instructions>

<examples> Example usage:

User: "Review this code for fiber routing and csrf protection compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]

</examples>

Iron Laws

1. ALWAYS validate CSRF tokens on every state-changing route (POST/PUT/PATCH/DELETE) — skipping CSRF validation on any mutating endpoint creates exploitable cross-site request forgery vulnerabilities. 2. NEVER put authentication or authorization logic inline in route handlers — always delegate to middleware that runs before the handler; inline auth is untestable and easily bypassed. 3. ALWAYS use Fiber's ctx.Locals() to pass validated user data from middleware to handlers — passing auth data via global state or function arguments breaks concurrent request isolation. 4. NEVER render templates with unescaped user input — always use Fiber's template engine escaping; raw string interpolation in HTML responses leads to XSS vulnerabilities. 5. ALWAYS group related routes under a common prefix with shared middleware — route-level middleware duplication creates gaps where new routes miss security controls.

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Skipping CSRF middleware on "safe" routesAttackers escalate via chained requests; partial protection = no protectionApply csrf.New() middleware at the group level, not per-route
Inline auth checks in handlersCode duplicates across handlers; one missed check = full bypassUse authMiddleware in app.Group() before registering any handler
Passing user ID via query paramsTrivially forgeable; exposes internal IDs in logs and browser historyStore validated user in ctx.Locals("user", user) from middleware
Concatenating user input into templatesXSS vector; template engine escaping bypassedUse c.Render() with template variables; never fmt.Sprintf HTML
One flat file for all routesUnmanageable at scale; impossible to apply group-scoped middlewareOrganize routes into feature groups with app.Group("/feature")

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing: Record any new patterns or exceptions discovered.

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.