/meddev-agent-skills:meddev-defensive-designfrom meddev-agent-skills
Applies defensive coding techniques for medical device software: input validation, output bounds checking, assertions, error propagation, timeouts, and defensive defaults. Use when working on safety-relevant modules.
Ships in meddev-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Apply defensive coding techniques to prevent, detect, and safely handle abnormal conditions in safety-relevant software.
static_assert) for structure sizes, array lengths.Input validation:
// REQ-DEF-INPUT-01; TEST-DEF-03
bool validate_flow(float ml_hr) {
return ml_hr >= 0.0f && ml_hr <= MAX_FLOW;
}
Output clamping with alarm:
// REQ-DEF-OUT-02; TEST-DEF-05
float clamp_output(float cmd) {
if (cmd > MAX_OUTPUT) {
alarm_over_output();
return MAX_OUTPUT;
}
if (cmd < MIN_OUTPUT) return MIN_OUTPUT;
return cmd;
}
Timeout wrapper:
// REQ-DEF-TIMEOUT-04; TEST-DEF-07
int read_with_timeout(int fd, uint8_t *buf, size_t len, uint32_t ms) {
if (!poll_ready(fd, ms)) return -ETIMEDOUT;
return read(fd, buf, len);
}
return; with no log/propagation) -> risk: hidden failure.REQ-DEF-###) and link to tests.What SKILL.md sets; muted values are Claude Code's defaults
59 skills in this plugin
/meddev-21-cfr-part-11Provide implementation guidance for electronic records/signatures (ER/ES) compliance: access control, audit trails, data integrity, and validation expectations in medical device software and supporting tools. Use when working on 21 cfr part 11 in medical device software./meddev-ai-assisted-development-governanceDefine governance for AI/LLM-assisted software development (e.g., Cursor, Copilot, Claude): human review expectations, evidence that generated code is covered by requirements-based tests, tool validation for GxP-adjacent workflows, and alignment with Computer Software Assurance (CSA) principles (risk-based, critical thinking) without replacing your SOPs. Use when working on ai assisted development governance in medical device software./meddev-ai-ml-medical-device-softwareAddress machine learning inside the regulated product (not LLM coding assistants): Good Machine Learning Practice (GMLP), training/validation data integrity, Predetermined Change Control Plans (PCCP) where applicable, drift monitoring, and linking models to ISO 14971 and software lifecycle controls. Use when working on ai ml medical device software in medical device software./meddev-audit-loggingDefine what and how to log for medical devices: security/safety events, integrity, protection, and retention of logs for compliance and forensics. Use when working on audit logging in medical device software./meddev-authenticationDefine secure user/device authentication, session management, and RBAC suitable for medical device risk profiles. Use when working on authentication in medical device software./meddev-automated-testingDefine how to automate tests (unit, integration, system/HIL where feasible) in CI/CD pipelines for medical devices with gating and evidence capture. Use when working on automated testing in medical device software.npx claudepluginhub aminalam/meddev-agent-skills --plugin meddev-agent-skillsOther plugins' skills for the same job