skills/development/code-writing-software-development/SKILL.md
Write, edit, refactor, and understand code across any language or framework. Use when the user wants to implement features, fix bugs, refactor code, or get coding assistance. Synthesizes best practices from Anthropic Claude Code, Cursor, Windsurf, Augment Code, Cline, Kiro, and others.
npx skillsauth add bereniketech/claude_kit code-writing-software-developmentInstall 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.
Never modify a file you have not read in the current session. Before making any edit:
Rule: Read → Understand → Edit. Never edit blind.
For any non-trivial task, do a discovery pass before writing a single line of code:
package.json, requirements.txt, Cargo.toml, go.mod, etc.) before assuming any library is available.Rule: Bias toward gathering information rather than guessing. Use tools extensively, in parallel where possible.
When editing an existing codebase, mirror its style exactly:
Rule: Be a skilled new team member joining an established project — blend in, do not rewrite the culture.
Write code that a senior engineer would be proud to review.
Naming: Use full, descriptive names. Functions should be verbs or verb-phrases (fetchUserData). Variables should be nouns (userList). Avoid non-standard abbreviations.
Control flow: Use guard clauses and early returns. Keep nesting to 2–3 levels maximum. Handle error and edge cases first.
Comments: Explain why, not what. Use language-specific docstrings for public APIs. Never leave TODO comments — implement or create a tracked issue.
Type safety: Annotate all function signatures and public APIs explicitly. Avoid any, unsafe casts, or type assertions unless justified with a comment.
No duplication: Before writing new logic, search for existing utilities. Extract repeated patterns into shared functions.
KISS / YAGNI: Prefer the simplest solution that works. Do not build features before they are needed. Add complexity only when required.
Immutability: Prefer immutable data structures and pure functions. Use spread operators ({ ...obj }, [...arr]) over direct mutation.
Named constants: Replace magic numbers and strings with named constants (MAX_RETRY_COUNT = 3).
Use write-time enforcement and auditing to catch issues as they are introduced, not just at review time.
Code smell detection — flag these patterns immediately:
any types in TypeScript (replace with proper types)console.log left in production pathsLinting and formatting gates (run before marking a task done):
# TypeScript / JavaScript
npx tsc --noEmit 2>&1 | head -30
npm run lint 2>&1 | head -30
# Python
ruff check . 2>&1 | head -30
Config tamper guard: Never modify linter configs (.ruff.toml, biome.json, tsconfig.json, .eslintrc*) to suppress violations. Fix the code instead. If a config change is genuinely needed, flag it explicitly for review.
Package manager enforcement:
bun; use npm/yarn/pnpm only when the project requires ituv; avoid pip / poetry / pipenv unless the project requires itRun this gate after completing a feature, before creating a PR, or after significant refactoring.
Phase 1 — Build:
npm run build 2>&1 | tail -20
If build fails, stop and fix before continuing.
Phase 2 — Type check:
npx tsc --noEmit 2>&1 | head -30 # TypeScript
pyright . 2>&1 | head -30 # Python
Phase 3 — Lint:
npm run lint 2>&1 | head -30
ruff check . 2>&1 | head -30
Phase 4 — Tests:
npm run test -- --coverage 2>&1 | tail -50
# Target: 80% minimum coverage
Phase 5 — Security scan:
grep -rn "sk-\|api_key\|password" --include="*.ts" --include="*.js" src/ | head -10
grep -rn "console\.log" --include="*.ts" --include="*.tsx" src/ | head -10
Phase 6 — Diff review:
git diff --stat
git diff HEAD~1 --name-only
Review each changed file for unintended changes, missing error handling, and edge cases.
Output format:
VERIFICATION REPORT
==================
Build: [PASS/FAIL]
Types: [PASS/FAIL] (X errors)
Lint: [PASS/FAIL] (X warnings)
Tests: [PASS/FAIL] (X/Y passed, Z% coverage)
Security: [PASS/FAIL] (X issues)
Diff: [X files changed]
Overall: [READY/NOT READY] for PR
Run verification at mental checkpoints: after completing each function, after finishing a component, before moving to the next task.
Rule: Start with regex. Reserve LLM calls only for low-confidence edge cases.
Decision framework:
Is the text format consistent and repeating?
├── Yes (>90% follows a pattern) → Start with Regex
│ ├── Regex handles 95%+ → Done, no LLM needed
│ └── Regex handles <95% → Add LLM for edge cases only
└── No (free-form, highly variable) → Use LLM directly
Hybrid pipeline:
Source Text
│
[Regex Parser] ─── Extracts structure (95-98% accuracy)
│
[Confidence Scorer] ─── Flags low-confidence extractions
│
├── High confidence (≥0.95) → Direct output
└── Low confidence (<0.95) → [LLM Validator] → Output
Confidence scoring — flag items when:
LLM validator: Use the cheapest model available (Haiku-class) for validation. Pass the flagged item and original text; ask it to return corrected JSON or confirm accuracy.
Real-world benchmark (410 items): Regex success rate 98%, LLM calls needed ~5, cost savings vs all-LLM ~95%.
Anti-patterns:
Use for: quiz/exam parsing, form data extraction, invoice/receipt processing, document structure parsing, any structured text with repeating patterns where cost matters.
When a task spans multiple files:
Rule: A multi-file change is only complete when every affected file is consistent with every other affected file.
returns empty array when no markets match query).Rule: For any feature touching auth, input, secrets, or APIs — load and follow the security-review skill.
Proceed without asking when: the task is clearly scoped, you can discover necessary information through tools, the change is low-risk and easily reversible.
Stop and ask when: intent is genuinely ambiguous, a destructive or irreversible action is required, you are about to take action with significant scope beyond what was asked, you have tried 2–3 approaches and none have worked, or required information cannot be found through tools.
Rule: Use tools to find answers before asking the user. Ask only when tools cannot provide the answer.
Be concise. Lead with the action, not the preamble. Use backticks for identifiers, fenced code blocks for code. Do not narrate tool usage.
Before starting any coding task:
Before completing any coding task:
When receiving code review feedback, follow this response pattern:
Rule: Never respond with performative agreement ("You're absolutely right!", "Great point!", "Excellent feedback!"). Instead: restate the technical requirement, ask clarifying questions, push back with technical reasoning if wrong, or just start working. Actions speak louder than words.
If any item is unclear, STOP — do not implement anything yet. Ask for clarification on unclear items. Items may be related; partial understanding leads to wrong implementation.
Push back when: suggestion breaks existing functionality, reviewer lacks full context, violates YAGNI (unused feature), technically incorrect for this stack, legacy/compatibility reasons exist, or conflicts with architectural decisions.
Before claiming any work is complete, fixed, or passing:
Rule: No completion claims without fresh verification evidence. If you haven't run the verification command, you cannot claim it passes. Skip any step and you're guessing, not verifying.
| Claim | Requires | Not Sufficient | |-------|----------|----------------| | Tests pass | Test command output: 0 failures | Previous run, "should pass" | | Linter clean | Linter output: 0 errors | Partial check, extrapolation | | Build succeeds | Build command: exit 0 | Linter passing, logs look good | | Bug fixed | Test original symptom: passes | Code changed, assumed fixed | | Requirements met | Line-by-line checklist | Tests passing |
Red flags: Using "should", "probably", "seems to". Expressing satisfaction before verification. About to commit/push/PR without running commands. Relying on partial verification.
testing
AUTHORIZED USE ONLY: This skill contains dual-use security techniques. Before proceeding with any bypass or analysis: > 1.
testing
Provide comprehensive techniques for attacking Microsoft Active Directory environments. Covers reconnaissance, credential harvesting, Kerberos attacks, lateral movement, privilege escalation, and domain dominance for red team operations and penetration testing.
development
Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C/C++/Rust code handling secrets, keys, passwords, or other sensitive data.
development
Comprehensive guide to auditing web content against WCAG 2.2 guidelines with actionable remediation strategies.