fullstack-guardian
它能做什么
它指导 AI 智能体跨前端和后端构建功能,并在每个层级进行安全检查。适用于希望从数据库到用户界面都保持安全的网络应用开发者。
适用场景
- ✓当你构建同时涉及前端和后端的功能时。
- ✓当你需要一个 REST API 并配有对应的用户界面时。
- ✓当你希望在为新功能编写任何代码之前,先进行安全审查时。
技能链接
https://github.com/Jeffallan/claude-skills/blob/main/skills/fullstack-guardian/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请构建一个安全的账户设置页面,配有对应的 API,包括登录检查和输入验证。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先写一份简短的设计,涵盖前端、后端和安全。在编码之前,它运行安全检查清单,然后逐步构建功能并测试每个部分。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Fullstack Guardian
Security-focused full-stack developer implementing features across the entire application stack.
Core Workflow
- Gather requirements - Understand feature scope and acceptance criteria
- Design solution - Consider all three perspectives (Frontend/Backend/Security)
- Write technical design - Document approach in
specs/{feature}_design.md - Security checkpoint - Run through
references/security-checklist.mdbefore writing any code; confirm auth, authz, validation, and output encoding are addressed - Implement - Build incrementally, testing each component as you go
- Hand off - Pass to Test Master for QA, DevOps for deployment
Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| Design Template | references/design-template.md |
Starting feature, three-perspective design |
| Security Checklist | references/security-checklist.md |
Every feature - auth, authz, validation |
| Error Handling | references/error-handling.md |
Implementing error flows |
| Common Patterns | references/common-patterns.md |
CRUD, forms, API flows |
| Backend Patterns | references/backend-patterns.md |
Microservices, queues, observability, Docker |
| Frontend Patterns | references/frontend-patterns.md |
Real-time, optimization, accessibility, testing |
| Integration Patterns | references/integration-patterns.md |
Type sharing, deployment, architecture decisions |
| API Design | references/api-design-standards.md |
REST/GraphQL APIs, versioning, CORS, validation |
| Architecture Decisions | references/architecture-decisions.md |
Tech selection, monolith vs microservices |
| Deliverables Checklist | references/deliverables-checklist.md |
Completing features, preparing handoff |
Constraints
MUST DO
- Address all three perspectives (Frontend, Backend, Security)
- Validate input on both client and server
- Use parameterized queries (prevent SQL injection)
- Sanitize output (prevent XSS)
- Implement proper error handling at every layer
- Log security-relevant events
- Write the implementation plan before coding
- Test each component as you build
MUST NOT DO
- Skip security considerations
- Trust client-side validation alone
- Expose sensitive data in API responses
- Hardcode credentials or secrets
- Implement features without acceptance criteria
- Skip error handling for "happy path only"
Three-Perspective Example
A minimal authenticated endpoint illustrating all three layers:
[Backend] — Authenticated route with parameterized query and scoped response:
@router.get("/users/{user_id}/profile", dependencies=[Depends(require_auth)])
async def get_profile(user_id: int, current_user: User = Depends(get_current_user)):
if current_user.id != user_id:
raise HTTPException(status_code=403, detail="Forbidden")
# Parameterized query — no raw string interpolation
row = await db.fetchone("SELECT id, name, email FROM users WHERE id = ?", (user_id,))
if not row:
raise HTTPException(status_code=404, detail="Not found")
return ProfileResponse(**row) # explicit schema — no password/token leakage
[Frontend] — Component calls the endpoint and handles errors gracefully:
async function fetchProfile(userId: number): Promise<Profile> {
const res = await apiFetch(`/users/${userId}/profile`); // apiFetch attaches auth header
if (!res.ok) throw new Error(await res.text());
return res.json();
}
// Client-side input guard (never the only guard)
if (!Number.isInteger(userId) || userId <= 0) throw new Error("Invalid user ID");
[Security]
- Auth enforced server-side via
require_authdependency; client header is a convenience, not the gate. - Response schema (
ProfileResponse) explicitly excludes sensitive fields. - 403 returned before any DB access when IDs don't match — no timing leak via 404.
Output Templates
When implementing features, provide:
- Technical design document (if non-trivial)
- Backend code (models, schemas, endpoints)
- Frontend code (components, hooks, API calls)
- Brief security notes
Maintained by @jeffallan, Principal Consultant at Synergetic Solutions
常见问题
它会运行哪些安全检查?
对于每项功能,它都会检查身份验证、授权、输入验证、输出编码,以及参数化查询。
它会编写设计文档吗?
会。它会在编写代码之前,把方案记录在设计文件中。
之后它会把工作交给谁?
该技能说明,它会把工作交给测试角色进行质量检查,并交给 DevOps 角色进行部署。
详情
作者的原始描述
Builds security-focused full-stack web applications by implementing integrated frontend and backend components with layered security at every level. Covers the complete stack from database to UI, enforcing auth, input validation, output encoding, and parameterized queries across all layers. Use when implementing features across frontend and backend, building REST APIs with corresponding UI, connecting frontend components to backend endpoints, creating end-to-end data flows from database to UI, or implementing CRUD operations with UI forms. Distinct from frontend-only, backend-only, or API-only
repo: Jeffallan/claude-skills
热度
- GitHub 星标
- 12k
- 排名
- #11426
- 许可证
- MIT
- 更新时间
- 2026/10/30
评论
- …
同一仓库的更多技能
angular-architect
12k帮你的智能体构建 Angular 17 及更新版本的应用,包括独立组件、懒加载路由、NgRx 状态管理、RxJS 模式和性能优化。
api-designer
12k帮你的智能体设计 REST 或 GraphQL API,并编写 OpenAPI 3.1 规范,包括资源、分页、错误格式和版本控制规则。
architecture-designer
12k帮你的智能体设计系统架构、比较模式和技术,并编写架构决策记录,解释每个选择的理由。
atlassian-mcp
12k帮你的智能体通过 MCP 搜索和更新 Jira 问题及 Confluence 页面,包括 JQL 和 CQL 查询、冲刺和文档同步。