security
Skill3 starsChanged 8 months agoMITView on GitHub
Use when implementing authentication, authorization, input validation, or security hardening in Go, Python, or React applications
- Reads credentials
78 other projects use a version of this.
Adopted by
Most recently taken up by
- AllThingsSmitty/proven-skillstheir own version, first seen Oct 6, 2026
- MarvelCollin/agent-skillstheir own version, first seen Oct 5, 2026
- muon-m2/magento2-toolstheir own version, first seen Oct 4, 2026
- flavien-ia/hypervibe-harnesstheir own version, first seen Oct 4, 2026
- AIBiz-Automatyzacje/claude-code-startertheir own version, first seen Oct 4, 2026
- lgzarturo/codeconductortheir own version, first seen Sep 30, 2026
Used with
Projects with it also use cost-reducer, trigger-dev and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
daianepepes-labSkillcost-reducer
Analyze and reduce costs across cloud infrastructure, code, and services. Use when asked to cut costs, optimize spending, reduce bills, or improve cost efficiency.
Also in 5 projects that use this
xfstudioSkilltrigger-dev
Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.
Also in 4 projects that use this
ffsshhttiikkSkillscalability
Core foundational concepts and principles for Scalability
Also in 4 projects that use this
daianepepes-labSkillself-healing
Detect, diagnose, and automatically fix recurring errors, memory issues, and system degradation. Use when a system has recurring failures, memory leaks, performance degradation, or needs automatic recovery mechanisms.
Also in 5 projects that use this
xfstudioSkillcustomer-support
Elite AI-powered customer support specialist mastering
Also in 4 projects that use this
ffsshhttiikkSkillcicd
Continuous integration and delivery pipelines
Also in 4 projects that use this
- +1 more from daianepepes-lab
Other versions78 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 78
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- BankrBot/skills★ 1.2ksame name
- rshankras/claude-code-apple-skills★ 777same name
- alinaqi/maggy★ 707same name
- boshu2/agentops★ 447same name
- notque/vexjoy-agent★ 424same name
- nth5693/gemini-kit★ 373same name
- telagod/code-abyss★ 242same name
- garagon/nanostack★ 207same name
- TheBeardedBearSAS/claude-craft★ 106same name
68 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- adrSkill
- analyticsSkill
- api-contractSkill
- api-designSkill
- ci-pipelineSkill
- claude-mdSkill
- code-qualitySkill
- data-modelSkill
- db-migrateSkill
- debugSkill
- deploySkill
- dep-updateSkill
- disk-cleanupSkill
- docker-buildSkill
- eng-leadSkill
- event-drivenSkill
- fullstack-healthcheckSkill
- go-featureSkill
- go-integration-testSkill
- go-refactorSkill
- go-scaffoldSkill
- incident-responseSkill
- interactive-clarifySkill
- observabilitySkill
- onboardingSkill
- product-specSkill
- py-featureSkill
- py-integration-testSkill
- py-migrateSkill
- py-refactorSkill
- py-scaffoldSkill
- react-featureSkill
- react-refactorSkill
- react-scaffoldSkill
- review-codeSkill
- system-designSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 56 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Before deploying to production (security checklist)
- Very specific: line 20
After review-code flags security issues
- Distinctive: line 170
Always validate at the system boundary (handlers).
- Very specific: line 272
REQUIRED: Update CLAUDE.md with auth conventions and new environment variables (claude-md)
“Common” is measured: kept by at least 6 in 10 of the 56 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Security Engineering
Overview
Build security in from the start, not bolt it on later. Covers authentication, authorization, input handling, and common vulnerability prevention.
Core principle: Trust nothing from outside your system boundary. Validate everything. Fail closed.
When to Use
- Setting up auth for a new project
- Adding role-based access control
- Handling user input
- Before deploying to production (security checklist)
- After
review-codeflags security issues
Authentication
JWT with Bearer Token
Go/Fiber middleware:
func AuthMiddleware() fiber.Handler {
return func(c fiber.Ctx) error {
authHeader := c.Get("Authorization")
if authHeader == "" {
return pkg.NewError("unauthorized", "Missing authorization header", 401)
}
parts := strings.SplitN(authHeader, " ", 2)
if len(parts) != 2 || parts[0] != "Bearer" {
return pkg.NewError("unauthorized", "Invalid authorization format", 401)
}
claims, err := validateJWT(parts[1])
if err != nil {
return pkg.NewError("unauthorized", "Invalid or expired token", 401)
}
c.Locals("user_id", claims.UserID)
c.Locals("user_role", claims.Role)
return c.Next()
}
}
// Helper to extract user ID (safe — panics caught by recover middleware)
func GetUserID(c fiber.Ctx) (uuid.UUID, error) {
userID, ok := c.Locals("user_id").(uuid.UUID)
if !ok {
return uuid.Nil, pkg.NewError("unauthorized", "User not authenticated", 401)
}
return userID, nil
}Python/FastAPI dependency:
from fastapi import Depends, HTTPException
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
security = HTTPBearer()
async def get_current_user(
credentials: HTTPAuthorizationCredentials = Depends(security),
) -> UserClaims:
try:
claims = validate_jwt(credentials.credentials)
return claims
except JWTError:
raise HTTPException(status_code=401, detail="Invalid or expired token")API Key Authentication
func APIKeyMiddleware(validKeys map[string]bool) fiber.Handler {
return func(c fiber.Ctx) error {
key := c.Get("X-API-Key")
if key == "" || !validKeys[key] {
return pkg.NewError("unauthorized", "Invalid API key", 401)
}
return c.Next()
}
}Authorization (RBAC)
func RequireRole(roles ...string) fiber.Handler {
roleSet := make(map[string]struct{}, len(roles))
for _, r := range roles {
roleSet[r] = struct{}{}
}
return func(c fiber.Ctx) error {
userRole, _ := c.Locals("user_role").(string)
if _, ok := roleSet[userRole]; !ok {
return pkg.NewError("forbidden", "Insufficient permissions", 403)
}
return c.Next()
}
}
// Usage
admin := api.Group("/admin", RequireRole("admin"))
admin.Get("/users", adminHandler.ListUsers)Resource-level authorization:
// Always check: does this user own this resource?
func (h *Handler) GetPost(c fiber.Ctx) error {
userID, _ := middleware.GetUserID(c)
postID := c.Params("id")
post, err := h.useCase.GetByID(c.Context(), postID)
if err != nil {
return mapDomainError(err)
}
// Ownership check
if post.AuthorID != userID {
return pkg.NewError("forbidden", "Not your post", 403)
}
return c.JSON(post.ToResponse())
}Input Security
SQL Injection Prevention
// NEVER: string concatenation
query := "SELECT * FROM users WHERE email = '" + email + "'"
// ALWAYS: parameterized queries
query := "SELECT * FROM users WHERE email = $1"
row := pool.QueryRow(ctx, query, email)# NEVER
session.execute(text(f"SELECT * FROM users WHERE email = '{email}'"))
# ALWAYS
stmt = select(UserModel).where(UserModel.email == email)XSS Prevention
React: JSX auto-escapes by default. Never use dangerouslySetInnerHTML.
// SAFE: auto-escaped
<p>{userInput}</p>
// DANGEROUS: only if you sanitized with DOMPurify
<p dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(htmlContent) }} />Request Validation
Always validate at the system boundary (handlers). Internal code trusts validated input.
// Request structs ARE the validation boundary
type CreateUserRequest struct {
Email string `json:"email" validate:"required,email,max=255"`
Name string `json:"name" validate:"required,min=2,max=100"`
}
// pkg.ValidateBody[CreateUserRequest](c) handles validationFile Upload Safety
// Validate file type by content, not extension
file, _ := c.FormFile("avatar")
f, _ := file.Open()
buffer := make([]byte, 512)
f.Read(buffer)
contentType := http.DetectContentType(buffer)
allowedTypes := map[string]bool{
"image/jpeg": true, "image/png": true, "image/webp": true,
}
if !allowedTypes[contentType] {
return pkg.NewError("bad_request", "Invalid file type", 400)
}Rate Limiting
import "github.com/gofiber/fiber/v3/middleware/limiter"
// Global rate limit
app.Use(limiter.New(limiter.Config{
Max: 100,
Expiration: 1 * time.Minute,
}))
// Stricter limit for auth endpoints
auth := api.Group("/auth")
auth.Use(limiter.New(limiter.Config{
Max: 10,
Expiration: 1 * time.Minute,
}))Secret Management
# NEVER commit secrets
echo ".env" >> .gitignore
# Use environment variables
DATABASE_URL=postgres://...
JWT_SECRET=...
SENTRY_DSN=...
API_KEY=...// Load from environment, fail if missing
func MustGetEnv(key string) string {
val := os.Getenv(key)
if val == "" {
log.Fatalf("required env var %s is not set", key)
}
return val
}Security Headers
app.Use(func(c fiber.Ctx) error {
c.Set("X-Content-Type-Options", "nosniff")
c.Set("X-Frame-Options", "DENY")
c.Set("X-XSS-Protection", "1; mode=block")
c.Set("Strict-Transport-Security", "max-age=31536000; includeSubDomains")
c.Set("Referrer-Policy", "strict-origin-when-cross-origin")
return c.Next()
})Pre-Deploy Security Checklist
- All endpoints have authentication (except public routes)
- Resource-level authorization checks (ownership)
- All user input validated (ValidateBody/Query/Params or Pydantic)
- Parameterized SQL queries only (no string concatenation)
- Rate limiting on auth and public endpoints
- CORS configured for specific origins (not
*) - Security headers set
- Secrets in environment variables (not in code)
.envin.gitignore- No sensitive data in logs
- File uploads validated by content type
- JWT tokens expire (not indefinite)
- HTTPS enforced in production
Chains
- REQUIRED: Update CLAUDE.md with auth conventions and new environment variables (
claude-md) - Build into:
go-scaffold/py-scaffold(auth middleware from day one) - Checked by:
review-codeAgent 4 (security review) - Reference:
api-designfor auth annotations in swaggo
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

