.claude/skills/fiber-routing-and-csrf-protection/SKILL.md
Focuses on routing, CSRF protection, context handling, and template usage within the internal handlers directory.
npx skillsauth add oimiragieo/agent-studio fiber-routing-and-csrf-protectionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ctx.Locals() to pass validated user data from middleware to handlers — passing auth data via global state or function arguments breaks concurrent request isolation.| 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") |
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.
tools
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.
tools
Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.
data-ai
Molecular featurization for ML (100+ featurizers). ECFP, MACCS, descriptors, pretrained models (ChemBERTa), convert SMILES to features, for QSAR and molecular ML.
development
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.