
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-protectionAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 33 |
|---|---|
| repo stars | ★ 36 |
| Last updated | July 14, 2026 |
| Repository | oimiragieo/agent-studio ↗ |
What it does
Helps with ai & agent building tasks.
Files
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-Pattern | Why It Fails | Correct Approach |
|---|---|---|
| Skipping CSRF middleware on "safe" routes | Attackers escalate via chained requests; partial protection = no protection | Apply csrf.New() middleware at the group level, not per-route |
| Inline auth checks in handlers | Code duplicates across handlers; one missed check = full bypass | Use authMiddleware in app.Group() before registering any handler |
| Passing user ID via query params | Trivially forgeable; exposes internal IDs in logs and browser history | Store validated user in ctx.Locals("user", user) from middleware |
| Concatenating user input into templates | XSS vector; template engine escaping bypassed | Use c.Render() with template variables; never fmt.Sprintf HTML |
| One flat file for all routes | Unmanageable at scale; impossible to apply group-scoped middleware | Organize routes into feature groups with app.Group("/feature") |
Memory Protocol (MANDATORY)
Before starting:
cat .claude/context/memory/learnings.mdAfter completing: Record any new patterns or exceptions discovered.
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
Invoke the fiber-routing-and-csrf-protection skill and follow it exactly as presented to you
'use strict';
/**
* Post-execute hook for fiber-routing-and-csrf-protection
* Auto-generated by enterprise-bundle-scaffolder
*
* Records metrics after skill execution.
*/
function postExecute(_context) {
// Record execution metrics
return { ok: true, skill: 'fiber-routing-and-csrf-protection' };
}
module.exports = { postExecute };
'use strict';
/**
* Pre-execute hook for fiber-routing-and-csrf-protection
* Auto-generated by enterprise-bundle-scaffolder
*
* Validates inputs before skill execution.
*/
function preExecute(context) {
// Validate skill invocation context
if (!context || typeof context !== 'object') {
return { allow: true, message: 'fiber-routing-and-csrf-protection: no context to validate' };
}
return { allow: true };
}
module.exports = { preExecute };
fiber-routing-and-csrf-protection Research Requirements
Generated: 2026-02-28
Skill Description
Focuses on routing, CSRF protection, context handling, and template usage within the internal handlers directory.
Research Areas
- Current best practices for fiber-routing-and-csrf-protection
- Industry standards and tooling
- Integration patterns
Source References
- To be populated by skill-updater research phase
fiber-routing-and-csrf-protection Rules
Purpose
Focuses on routing, CSRF protection, context handling, and template usage within the internal handlers directory.
Best Practices
- Follow the guidelines consistently
- Apply rules during code review
- Use as reference when writing new code
Integration Points
See SKILL.md for complete documentation.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "fiber-routing-and-csrf-protectionInput",
"description": "Input schema for Focuses on routing, CSRF protection, context handling, and template usage within the internal handlers directory.",
"type": "object",
"additionalProperties": true,
"properties": {
"target": {
"type": "string",
"description": "Target file or path for the skill to operate on"
},
"options": {
"type": "object",
"description": "Additional options for skill execution",
"additionalProperties": true
}
}
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "fiber-routing-and-csrf-protectionOutput",
"type": "object",
"additionalProperties": true,
"properties": {
"ok": {
"type": "boolean"
},
"summary": {
"type": "string"
}
}
}
#!/usr/bin/env node
'use strict';
/**
* fiber-routing-and-csrf-protection - Enterprise Skill Script
* Auto-generated by enterprise-bundle-scaffolder
*/
const fs = require('fs');
const path = require('path');
// Parse arguments
const args = process.argv.slice(2);
const options = {};
for (let i = 0; i < args.length; i++) {
if (args[i].startsWith('--')) {
const key = args[i].slice(2);
const value = args[i + 1] && !args[i + 1].startsWith('--') ? args[++i] : true;
options[key] = value;
}
}
if (options.help) {
console.log(`
fiber-routing-and-csrf-protection - Enterprise Skill
Usage:
node main.cjs --check <file> Check a file against guidelines
node main.cjs --list List all guidelines
node main.cjs --help Show this help
Description:
Focuses on routing, CSRF protection, context handling, and template usage within the internal handlers directory.
`);
process.exit(0);
}
if (options.list) {
console.log('Guidelines for fiber-routing-and-csrf-protection:');
console.log('See SKILL.md for full guidelines');
process.exit(0);
}
console.log('fiber-routing-and-csrf-protection skill loaded. Use with Claude for code review.');
fiber-routing-and-csrf-protection Implementation Template
Goal
- Define target outcome and acceptance criteria.
TDD
1. Red 2. Green 3. Refactor
Verification
- lint
- format
- targeted tests