Agent skill
cyber-security
Vulnerability assessment, defensive programming, and attack prevention
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/cyber-security
SKILL.md
Skill: cyber-security
What I do
I provide a defensive mindset for building resilient systems. I focus on identifying potential attack vectors, implementing robust security controls, and ensuring that security is integrated throughout the development lifecycle rather than added as an afterthought.
When to use me
- During architectural design to model potential threats
- When selecting or updating third-party dependencies
- Before exposing new endpoints or services to the internet
- When implementing authentication or authorisation logic
- During security-focused code reviews
Core principles
- Defence in depth — Never rely on a single security control. Implement multiple layers of protection.
- Least privilege — Grant only the minimum access required for a component or user to perform its function.
- Assume breach — Design systems under the assumption that an attacker may already have access to part of the network.
- Secure by design — Security should be a fundamental requirement from the start, not a checklist item at the end.
Patterns & examples
Threat Modelling (STRIDE):
- Spoofing: Can someone pretend to be another user?
- Tampering: Can data be modified in transit or at rest?
- Repudiation: Can a user deny performing an action?
- Information Disclosure: Can sensitive data be leaked?
- Denial of Service: Can the system be overwhelmed?
- Elevation of Privilege: Can a user gain unauthorised access levels?
Defensive Programming Pattern:
// ✅ Correct: Validate all inputs, use secure defaults, and fail securely
async function processSensitiveData(userId: string, payload: unknown) {
// 1. Validate userId format
if (!isValidUUID(userId)) throw new SecurityError("Invalid ID");
// 2. Authorise user action
const hasAccess = await checkPermissions(userId, 'write');
if (!hasAccess) throw new ForbiddenError("Unauthorised action");
// 3. Sanitise and validate payload schema
const cleanData = Schema.parse(payload);
// 4. Process securely...
}
Anti-patterns to avoid
- ❌ Security through obscurity — Relying on secret algorithms or hidden URLs is not a valid security strategy.
- ❌ Hardcoding secrets — API keys and credentials must never be committed to version control.
- ❌ Trusting user input — Every piece of data from a client must be treated as malicious until validated.
KB Reference
~/vaults/baphled/3. Resources/Knowledge Base/AI Development System/Skills/Security/Cyber Security.md
Related skills
security— Core secure coding practices and implementationcheck-compliance— Automated security scanning and lintingstatic-analysis— Identifying logic flaws and vulnerabilitiesdependency-management— Managing third-party risk
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?