techygarg/lattice-secure-coding
Apply security-conscious thinking when generating or modifying code. Enforces trust boundary awareness, input validation, injection prevention, secrets management, and defense-in-depth authorization. Use when generating code that handles user input, authentication, authorization, database queries, external APIs, file operations, or when the user mentions 'security review', 'secure this', 'check for vulnerabilities', 'trust boundary', 'input validation', or 'OWASP'. This skill governs the security posture of generated code -- not architecture (see architecture) and not code craft (see clean-code).
This is a copy. The original lives at techygarg/secure-coding.
npx skills add https://github.com/techygarg/lattice --skill secure-coding
Skill support project-custom. Order:
.lattice/config.yaml in repo rootpaths.secure_coding for custom doc pathmode:mode: override (or no mode): Custom doc take full precedence.Use instead embed default. Must be comprehensive -- sole reference.
mode: overlay: Read embed ./references/defaults.md first, then applycustom doc sections on top. Custom sections replace matching
sections in default (match by heading). New sections append after default.
./references/defaults.mdpaths.language_idioms exist in config, read "Error Handling" section and adapt §1 (Trust Boundary Identification) error message patterns to language idioms. Language idioms take precedence over pseudocode defaults.STOP after gen each component. Verify ALL before proceed. If check clearly fail, fix code before present. If check judgment call with multiple valid approach (see Ambiguity Signals), flag — present options and reasoning rather than silent choose.
STOP: After verify checklist above, scan output for specific anti-pattern. If find any, fix before present code.
Check often have multiple valid outcome. When encounter, present option rather than silent choose.
Govern security posture of generated code — trust boundaries, input validation, injection prevention, secrets, authorization.
Boundary with clean-code: clean-code governs error message craft; this skill governs what error messages must not reveal (internal detail).
Boundary with architecture: architecture defines *where* checks live (service layer, not controller); this skill defines *what* to check (identity confirmed, permission granted, resource owned).
See ./references/defaults.md.
Take techygarg/lattice-secure-coding from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.