[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CHB1A3A3R6SY7G3GPZ6ADZ":3,"skill-same:01M7CHB1A3A3R6SY7G3GPZ6ADZ":121},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7CHB1A3A3R6SY7G3GPZ6ADZ","sharp-edges",null,"Identifies error-prone APIs, dangerous configurations, and footgun designs that enable security mistakes. Use when reviewing API designs, configuration schemas, cryptographic library ergonomics, or evaluating whether code follows 'secure by default' and 'pit of success' principles. Triggers: footgun, misuse-resistant, secure defaults, API usability, dangerous configuration.","bongkage\u002Ftrailofbits-skills","bongkage","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F101378796?v=4","01M7CH419QTJ16DNJ33P0WCWBE","01M7CH41A9NWK8D2JBRK9F0M2C",1,"CC-BY-SA-4.0","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: sharp-edges\ndescription: \"Identifies error-prone APIs, dangerous configurations, and footgun designs that enable security mistakes. Use when reviewing API designs, configuration schemas, cryptographic library ergonomics, or evaluating whether code follows 'secure by default' and 'pit of success' principles. Triggers: footgun, misuse-resistant, secure defaults, API usability, dangerous configuration.\"\nallowed-tools: Read Grep Glob\n---\n\n# Sharp Edges Analysis\n\nEvaluates whether APIs, configurations, and interfaces are resistant to developer misuse. Identifies designs where the \"easy path\" leads to insecurity.\n\n## When to Use\n\n- Reviewing API or library design decisions\n- Auditing configuration schemas for dangerous options\n- Evaluating cryptographic API ergonomics\n- Assessing authentication\u002Fauthorization interfaces\n- Reviewing any code that exposes security-relevant choices to developers\n\n## When NOT to Use\n\n- Implementation bugs (use standard code review)\n- Business logic flaws (use domain-specific analysis)\n- Performance optimization (different concern)\n\n## Agent\n\nThe `sharp-edges-analyzer` agent runs the full sharp edges analysis workflow autonomously. Use it when you want a dedicated analysis of APIs, configurations, or interfaces for misuse resistance and footgun potential. The agent follows the four-phase workflow (Surface Identification, Edge Case Probing, Threat Modeling, Validate Findings) and reads language-specific references on demand.\n\n## Core Principle\n\n**The pit of success**: Secure usage should be the path of least resistance. If developers must understand cryptography, read documentation carefully, or remember special rules to avoid vulnerabilities, the API has failed.\n\n## Rationalizations to Reject\n\n| Rationalization | Why It's Wrong | Required Action |\n|-----------------|----------------|-----------------|\n| \"It's documented\" | Developers don't read docs under deadline pressure | Make the secure choice the default or only option |\n| \"Advanced users need flexibility\" | Flexibility creates footguns; most \"advanced\" usage is copy-paste | Provide safe high-level APIs; hide primitives |\n| \"It's the developer's responsibility\" | Blame-shifting; you designed the footgun | Remove the footgun or make it impossible to misuse |\n| \"Nobody would actually do that\" | Developers do everything imaginable under pressure | Assume maximum developer confusion |\n| \"It's just a configuration option\" | Config is code; wrong configs ship to production | Validate configs; reject dangerous combinations |\n| \"We need backwards compatibility\" | Insecure defaults can't be grandfather-claused | Deprecate loudly; force migration |\n\n## Sharp Edge Categories\n\n### 1. Algorithm\u002FMode Selection Footguns\n\nAPIs that let developers choose algorithms invite choosing wrong ones.\n\n**The JWT Pattern** (canonical example):\n- Header specifies algorithm: attacker can set `\"alg\": \"none\"` to bypass signatures\n- Algorithm confusion: RSA public key used as HMAC secret when switching RS256→HS256\n- Root cause: Letting untrusted input control security-critical decisions\n\n**Detection patterns:**\n- Function parameters like `algorithm`, `mode`, `cipher`, `hash_type`\n- Enums\u002Fstrings selecting cryptographic primitives\n- Configuration options for security mechanisms\n\n**Example - PHP password_hash allowing weak algorithms:**\n```php\n\u002F\u002F DANGEROUS: allows crc32, md5, sha1\npassword_hash($password, PASSWORD_DEFAULT); \u002F\u002F Good - no choice\nhash($algorithm, $password); \u002F\u002F BAD: accepts \"crc32\"\n```\n\n### 2. Dangerous Defaults\n\nDefaults that are insecure, or zero\u002Fempty values that disable security.\n\n**The OTP Lifetime Pattern:**\n```python\n# What happens when lifetime=0?\ndef verify_otp(code, lifetime=300):  # 300 seconds default\n    if lifetime == 0:\n        return True  # OOPS: 0 means \"accept all\"?\n        # Or does it mean \"expired immediately\"?\n```\n\n**Detection patterns:**\n- Timeouts\u002Flifetimes that accept 0 (infinite? immediate expiry?)\n- Empty strings that bypass checks\n- Null values that skip validation\n- Boolean defaults that disable security features\n- Negative values with undefined semantics\n\n**Questions to ask:**\n- What happens with `timeout=0`? `max_attempts=0`? `key=\"\"`?\n- Is the default the most secure option?\n- Can any default value disable security entirely?\n\n### 3. Primitive vs. Semantic APIs\n\nAPIs that expose raw bytes instead of meaningful types invite type confusion.\n\n**The Libsodium vs. Halite Pattern:**\n\n```php\n\u002F\u002F Libsodium (primitives): bytes are bytes\nsodium_crypto_box($message, $nonce, $keypair);\n\u002F\u002F Easy to: swap nonce\u002Fkeypair, reuse nonces, use wrong key type\n\n\u002F\u002F Halite (semantic): types enforce correct usage\nCrypto::seal($message, new EncryptionPublicKey($key));\n\u002F\u002F Wrong key type = type error, not silent failure\n```\n\n**Detection patterns:**\n- Functions taking `bytes`, `string`, `[]byte` for distinct security concepts\n- Parameters that could be swapped without type errors\n- Same type used for keys, nonces, ciphertexts, signatures\n\n**The comparison footgun:**\n```go\n\u002F\u002F Timing-safe comparison looks identical to unsafe\nif hmac == expected { }           \u002F\u002F BAD: timing attack\nif hmac.Equal(mac, expected) { }  \u002F\u002F Good: constant-time\n\u002F\u002F Same types, different security properties\n```\n\n### 4. Configuration Cliffs\n\nOne wrong setting creates catastrophic failure, with no warning.\n\n**Detection patterns:**\n- Boolean flags that disable security entirely\n- String configs that aren't validated\n- Combinations of settings that interact dangerously\n- Environment variables that override security settings\n- Constructor parameters with sensible defaults but no validation (callers can override with insecure values)\n\n**Examples:**\n```yaml\n# One typo = disaster\nverify_ssl: fasle  # Typo silently accepted as truthy?\n\n# Magic values\nsession_timeout: -1  # Does this mean \"never expire\"?\n\n# Dangerous combinations accepted silently\nauth_required: true\nbypass_auth_for_health_checks: true\nhealth_check_path: \"\u002F\"  # Oops\n```\n\n```php\n\u002F\u002F Sensible default doesn't protect against bad callers\npublic function __construct(\n    public string $hashAlgo = 'sha256',  \u002F\u002F Good default...\n    public int $otpLifetime = 120,       \u002F\u002F ...but accepts md5, 0, etc.\n) {}\n```\n\nSee [config-patterns.md](references\u002Fconfig-patterns.md#unvalidated-constructor-parameters) for detailed patterns.\n\n### 5. Silent Failures\n\nErrors that don't surface, or success that masks failure.\n\n**Detection patterns:**\n- Functions returning booleans instead of throwing on security failures\n- Empty catch blocks around security operations\n- Default values substituted on parse errors\n- Verification functions that \"succeed\" on malformed input\n\n**Examples:**\n```python\n# Silent bypass\ndef verify_signature(sig, data, key):\n    if not key:\n        return True  # No key = skip verification?!\n\n# Return value ignored\nsignature.verify(data, sig)  # Throws on failure\ncrypto.verify(data, sig)     # Returns False on failure\n# Developer forgets to check return value\n```\n\n### 6. Stringly-Typed Security\n\nSecurity-critical values as plain strings enable injection and confusion.\n\n**Detection patterns:**\n- SQL\u002Fcommands built from string concatenation\n- Permissions as comma-separated strings\n- Roles\u002Fscopes as arbitrary strings instead of enums\n- URLs constructed by joining strings\n\n**The permission accumulation footgun:**\n```python\npermissions = \"read,write\"\npermissions += \",admin\"  # Too easy to escalate\n\n# vs. type-safe\npermissions = {Permission.READ, Permission.WRITE}\npermissions.add(Permission.ADMIN)  # At least it's explicit\n```\n\n## Analysis Workflow\n\n### Phase 1: Surface Identification\n\n1. **Map security-relevant APIs**: authentication, authorization, cryptography, session management, input validation\n2. **Identify developer choice points**: Where can developers select algorithms, configure timeouts, choose modes?\n3. **Find configuration schemas**: Environment variables, config files, constructor parameters\n\n### Phase 2: Edge Case Probing\n\nFor each choice point, ask:\n- **Zero\u002Fempty\u002Fnull**: What happens with `0`, `\"\"`, `null`, `[]`?\n- **Negative values**: What does `-1` mean? Infinite? Error?\n- **Type confusion**: Can different security concepts be swapped?\n- **Default values**: Is the default secure? Is it documented?\n- **Error paths**: What happens on invalid input? Silent acceptance?\n\n### Phase 3: Threat Modeling\n\nConsider three adversaries:\n\n1. **The Scoundrel**: Actively malicious developer or attacker controlling config\n   - Can they disable security via configuration?\n   - Can they downgrade algorithms?\n   - Can they inject malicious values?\n\n2. **The Lazy Developer**: Copy-pastes examples, skips documentation\n   - Will the first example they find be secure?\n   - Is the path of least resistance secure?\n   - Do error messages guide toward secure usage?\n\n3. **The Confused Developer**: Misunderstands the API\n   - Can they swap parameters without type errors?\n   - Can they use the wrong key\u002Falgorithm\u002Fmode by accident?\n   - Are failure modes obvious or silent?\n\n### Phase 4: Validate Findings\n\nFor each identified sharp edge:\n\n1. **Reproduce the misuse**: Write minimal code demonstrating the footgun\n2. **Verify exploitability**: Does the misuse create a real vulnerability?\n3. **Check documentation**: Is the danger documented? (Documentation doesn't excuse bad design, but affects severity)\n4. **Test mitigations**: Can the API be used safely with reasonable effort?\n\nIf a finding seems questionable, return to Phase 2 and probe more edge cases.\n\n## Severity Classification\n\n| Severity | Criteria | Examples |\n|----------|----------|----------|\n| Critical | Default or obvious usage is insecure | `verify: false` default; empty password allowed |\n| High | Easy misconfiguration breaks security | Algorithm parameter accepts \"none\" |\n| Medium | Unusual but possible misconfiguration | Negative timeout has unexpected meaning |\n| Low | Requires deliberate misuse | Obscure parameter combination |\n\n## References\n\n**By category:**\n\n- **Cryptographic APIs**: See [references\u002Fcrypto-apis.md](references\u002Fcrypto-apis.md)\n- **Configuration Patterns**: See [references\u002Fconfig-patterns.md](references\u002Fconfig-patterns.md)\n- **Authentication\u002FSession**: See [references\u002Fauth-patterns.md](references\u002Fauth-patterns.md)\n- **Real-World Case Studies**: See [references\u002Fcase-studies.md](references\u002Fcase-studies.md) (OpenSSL, GMP, etc.)\n\n**By language** (general footguns, not crypto-specific):\n\n| Language | Guide |\n|----------|-------|\n| C\u002FC++ | [references\u002Flang-c.md](references\u002Flang-c.md) |\n| Go | [references\u002Flang-go.md](references\u002Flang-go.md) |\n| Rust | [references\u002Flang-rust.md](references\u002Flang-rust.md) |\n| Swift | [references\u002Flang-swift.md](references\u002Flang-swift.md) |\n| Java | [references\u002Flang-java.md](references\u002Flang-java.md) |\n| Kotlin | [references\u002Flang-kotlin.md](references\u002Flang-kotlin.md) |\n| C# | [references\u002Flang-csharp.md](references\u002Flang-csharp.md) |\n| PHP | [references\u002Flang-php.md](references\u002Flang-php.md) |\n| JavaScript\u002FTypeScript | [references\u002Flang-javascript.md](references\u002Flang-javascript.md) |\n| Python | [references\u002Flang-python.md](references\u002Flang-python.md) |\n| Ruby | [references\u002Flang-ruby.md](references\u002Flang-ruby.md) |\n\nSee also [references\u002Flanguage-specific.md](references\u002Flanguage-specific.md) for a combined quick reference.\n\n## Quality Checklist\n\nBefore concluding analysis:\n\n- [ ] Probed all zero\u002Fempty\u002Fnull edge cases\n- [ ] Verified defaults are secure\n- [ ] Checked for algorithm\u002Fmode selection footguns\n- [ ] Tested type confusion between security concepts\n- [ ] Considered all three adversary types\n- [ ] Verified error paths don't bypass security\n- [ ] Checked configuration validation\n- [ ] Constructor params validated (not just defaulted) - see [config-patterns.md](references\u002Fconfig-patterns.md#unvalidated-constructor-parameters)\n","# Sharp Edges Analysis\n\nEvaluates whether APIs, configurations, and interfaces are resistant to developer misuse. Identifies designs where the \"easy path\" leads to insecurity.\n\n## When to Use\n\n- Reviewing API or library design decisions\n- Auditing configuration schemas for dangerous options\n- Evaluating cryptographic API ergonomics\n- Assessing authentication\u002Fauthorization interfaces\n- Reviewing any code that exposes security-relevant choices to developers\n\n## When NOT to Use\n\n- Implementation bugs (use standard code review)\n- Business logic flaws (use domain-specific analysis)\n- Performance optimization (different concern)\n\n## Agent\n\nThe `sharp-edges-analyzer` agent runs the full sharp edges analysis workflow autonomously. Use it when you want a dedicated analysis of APIs, configurations, or interfaces for misuse resistance and footgun potential. The agent follows the four-phase workflow (Surface Identification, Edge Case Probing, Threat Modeling, Validate Findings) and reads language-specific references on demand.\n\n## Core Principle\n\n**The pit of success**: Secure usage should be the path of least resistance. If developers must understand cryptography, read documentation carefully, or remember special rules to avoid vulnerabilities, the API has failed.\n\n## Rationalizations to Reject\n\n| Rationalization | Why It's Wrong | Required Action |\n|-----------------|----------------|-----------------|\n| \"It's documented\" | Developers don't read docs under deadline pressure | Make the secure choice the default or only option |\n| \"Advanced users need flexibility\" | Flexibility creates footguns; most \"advanced\" usage is copy-paste | Provide safe high-level APIs; hide primitives |\n| \"It's the developer's responsibility\" | Blame-shifting; you designed the footgun | Remove the footgun or make it impossible to misuse |\n| \"Nobody would actually do that\" | Developers do everything imaginable under pressure | Assume maximum developer confusion |\n| \"It's just a configuration option\" | Config is code; wrong configs ship to production | Validate configs; reject dangerous combinations |\n| \"We need backwards compatibility\" | Insecure defaults can't be grandfather-claused | Deprecate loudly; force migration |\n\n## Sharp Edge Categories\n\n### 1. Algorithm\u002FMode Selection Footguns\n\nAPIs that let developers choose algorithms invite choosing wrong ones.\n\n**The JWT Pattern** (canonical example):\n- Header specifies algorithm: attacker can set `\"alg\": \"none\"` to bypass signatures\n- Algorithm confusion: RSA public key used as HMAC secret when switching RS256→HS256\n- Root cause: Letting untrusted input control security-critical decisions\n\n**Detection patterns:**\n- Function parameters like `algorithm`, `mode`, `cipher`, `hash_type`\n- Enums\u002Fstrings selecting cryptographic primitives\n- Configuration options for security mechanisms\n\n**Example - PHP password_hash allowing weak algorithms:**\n```php\n\u002F\u002F DANGEROUS: allows crc32, md5, sha1\npassword_hash($password, PASSWORD_DEFAULT); \u002F\u002F Good - no choice\nhash($algorithm, $password); \u002F\u002F BAD: accepts \"crc32\"\n```\n\n### 2. Dangerous Defaults\n\nDefaults that are insecure, or zero\u002Fempty values that disable security.\n\n**The OTP Lifetime Pattern:**\n```python\n# What happens when lifetime=0?\ndef verify_otp(code, lifetime=300):  # 300 seconds default\n    if lifetime == 0:\n        return True  # OOPS: 0 means \"accept all\"?\n        # Or does it mean \"expired immediately\"?\n```\n\n**Detection patterns:**\n- Timeouts\u002Flifetimes that accept 0 (infinite? immediate expiry?)\n- Empty strings that bypass checks\n- Null values that skip validation\n- Boolean defaults that disable security features\n- Negative values with undefined semantics\n\n**Questions to ask:**\n- What happens with `timeout=0`? `max_attempts=0`? `key=\"\"`?\n- Is the default the most secure option?\n- Can any default value disable security entirely?\n\n### 3. Primitive vs. Semantic APIs\n\nAPIs that expose raw bytes instead of meaningful types invite type confusion.\n\n**The Libsodium vs. Halite Pattern:**\n\n```php\n\u002F\u002F Libsodium (primitives): bytes are bytes\nsodium_crypto_box($message, $nonce, $keypair);\n\u002F\u002F Easy to: swap nonce\u002Fkeypair, reuse nonces, use wrong key type\n\n\u002F\u002F Halite (semantic): types enforce correct usage\nCrypto::seal($message, new EncryptionPublicKey($key));\n\u002F\u002F Wrong key type = type error, not silent failure\n```\n\n**Detection patterns:**\n- Functions taking `bytes`, `string`, `[]byte` for distinct security concepts\n- Parameters that could be swapped without type errors\n- Same type used for keys, nonces, ciphertexts, signatures\n\n**The comparison footgun:**\n```go\n\u002F\u002F Timing-safe comparison looks identical to unsafe\nif hmac == expected { }           \u002F\u002F BAD: timing attack\nif hmac.Equal(mac, expected) { }  \u002F\u002F Good: constant-time\n\u002F\u002F Same types, different security properties\n```\n\n### 4. Configuration Cliffs\n\nOne wrong setting creates catastrophic failure, with no warning.\n\n**Detection patterns:**\n- Boolean flags that disable security entirely\n- String configs that aren't validated\n- Combinations of settings that interact dangerously\n- Environment variables that override security settings\n- Constructor parameters with sensible defaults but no validation (callers can override with insecure values)\n\n**Examples:**\n```yaml\n# One typo = disaster\nverify_ssl: fasle  # Typo silently accepted as truthy?\n\n# Magic values\nsession_timeout: -1  # Does this mean \"never expire\"?\n\n# Dangerous combinations accepted silently\nauth_required: true\nbypass_auth_for_health_checks: true\nhealth_check_path: \"\u002F\"  # Oops\n```\n\n```php\n\u002F\u002F Sensible default doesn't protect against bad callers\npublic function __construct(\n    public string $hashAlgo = 'sha256',  \u002F\u002F Good default...\n    public int $otpLifetime = 120,       \u002F\u002F ...but accepts md5, 0, etc.\n) {}\n```\n\nSee [config-patterns.md](references\u002Fconfig-patterns.md#unvalidated-constructor-parameters) for detailed patterns.\n\n### 5. Silent Failures\n\nErrors that don't surface, or success that masks failure.\n\n**Detection patterns:**\n- Functions returning booleans instead of throwing on security failures\n- Empty catch blocks around security operations\n- Default values substituted on parse errors\n- Verification functions that \"succeed\" on malformed input\n\n**Examples:**\n```python\n# Silent bypass\ndef verify_signature(sig, data, key):\n    if not key:\n        return True  # No key = skip verification?!\n\n# Return value ignored\nsignature.verify(data, sig)  # Throws on failure\ncrypto.verify(data, sig)     # Returns False on failure\n# Developer forgets to check return value\n```\n\n### 6. Stringly-Typed Security\n\nSecurity-critical values as plain strings enable injection and confusion.\n\n**Detection patterns:**\n- SQL\u002Fcommands built from string concatenation\n- Permissions as comma-separated strings\n- Roles\u002Fscopes as arbitrary strings instead of enums\n- URLs constructed by joining strings\n\n**The permission accumulation footgun:**\n```python\npermissions = \"read,write\"\npermissions += \",admin\"  # Too easy to escalate\n\n# vs. type-safe\npermissions = {Permission.READ, Permission.WRITE}\npermissions.add(Permission.ADMIN)  # At least it's explicit\n```\n\n## Analysis Workflow\n\n### Phase 1: Surface Identification\n\n1. **Map security-relevant APIs**: authentication, authorization, cryptography, session management, input validation\n2. **Identify developer choice points**: Where can developers select algorithms, configure timeouts, choose modes?\n3. **Find configuration schemas**: Environment variables, config files, constructor parameters\n\n### Phase 2: Edge Case Probing\n\nFor each choice point, ask:\n- **Zero\u002Fempty\u002Fnull**: What happens with `0`, `\"\"`, `null`, `[]`?\n- **Negative values**: What does `-1` mean? Infinite? Error?\n- **Type confusion**: Can different security concepts be swapped?\n- **Default values**: Is the default secure? Is it documented?\n- **Error paths**: What happens on invalid input? Silent acceptance?\n\n### Phase 3: Threat Modeling\n\nConsider three adversaries:\n\n1. **The Scoundrel**: Actively malicious developer or attacker controlling config\n   - Can they disable security via configuration?\n   - Can they downgrade algorithms?\n   - Can they inject malicious values?\n\n2. **The Lazy Developer**: Copy-pastes examples, skips documentation\n   - Will the first example they find be secure?\n   - Is the path of least resistance secure?\n   - Do error messages guide toward secure usage?\n\n3. **The Confused Developer**: Misunderstands the API\n   - Can they swap parameters without type errors?\n   - Can they use the wrong key\u002Falgorithm\u002Fmode by accident?\n   - Are failure modes obvious or silent?\n\n### Phase 4: Validate Findings\n\nFor each identified sharp edge:\n\n1. **Reproduce the misuse**: Write minimal code demonstrating the footgun\n2. **Verify exploitability**: Does the misuse create a real vulnerability?\n3. **Check documentation**: Is the danger documented? (Documentation doesn't excuse bad design, but affects severity)\n4. **Test mitigations**: Can the API be used safely with reasonable effort?\n\nIf a finding seems questionable, return to Phase 2 and probe more edge cases.\n\n## Severity Classification\n\n| Severity | Criteria | Examples |\n|----------|----------|----------|\n| Critical | Default or obvious usage is insecure | `verify: false` default; empty password allowed |\n| High | Easy misconfiguration breaks security | Algorithm parameter accepts \"none\" |\n| Medium | Unusual but possible misconfiguration | Negative timeout has unexpected meaning |\n| Low | Requires deliberate misuse | Obscure parameter combination |\n\n## References\n\n**By category:**\n\n- **Cryptographic APIs**: See [references\u002Fcrypto-apis.md](references\u002Fcrypto-apis.md)\n- **Configuration Patterns**: See [references\u002Fconfig-patterns.md](references\u002Fconfig-patterns.md)\n- **Authentication\u002FSession**: See [references\u002Fauth-patterns.md](references\u002Fauth-patterns.md)\n- **Real-World Case Studies**: See [references\u002Fcase-studies.md](references\u002Fcase-studies.md) (OpenSSL, GMP, etc.)\n\n**By language** (general footguns, not crypto-specific):\n\n| Language | Guide |\n|----------|-------|\n| C\u002FC++ | [references\u002Flang-c.md](references\u002Flang-c.md) |\n| Go | [references\u002Flang-go.md](references\u002Flang-go.md) |\n| Rust | [references\u002Flang-rust.md](references\u002Flang-rust.md) |\n| Swift | [references\u002Flang-swift.md](references\u002Flang-swift.md) |\n| Java | [references\u002Flang-java.md](references\u002Flang-java.md) |\n| Kotlin | [references\u002Flang-kotlin.md](references\u002Flang-kotlin.md) |\n| C# | [references\u002Flang-csharp.md](references\u002Flang-csharp.md) |\n| PHP | [references\u002Flang-php.md](references\u002Flang-php.md) |\n| JavaScript\u002FTypeScript | [references\u002Flang-javascript.md](references\u002Flang-javascript.md) |\n| Python | [references\u002Flang-python.md](references\u002Flang-python.md) |\n| Ruby | [references\u002Flang-ruby.md](references\u002Flang-ruby.md) |\n\nSee also [references\u002Flanguage-specific.md](references\u002Flanguage-specific.md) for a combined quick reference.\n\n## Quality Checklist\n\nBefore concluding analysis:\n\n- [ ] Probed all zero\u002Fempty\u002Fnull edge cases\n- [ ] Verified defaults are secure\n- [ ] Checked for algorithm\u002Fmode selection footguns\n- [ ] Tested type confusion between security concepts\n- [ ] Considered all three adversary types\n- [ ] Verified error paths don't bypass security\n- [ ] Checked configuration validation\n- [ ] Constructor params validated (not just defaulted) - see [config-patterns.md](references\u002Fconfig-patterns.md#unvalidated-constructor-parameters)\n",{"name":5,"description":7,"allowed-tools":23},"Read Grep Glob","main","321ccfe628eca0d314b0ee4eaffcdd8a05639aaf","plugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges",0,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills","https:\u002F\u002Fgithub.com\u002Fbongkage","2026-11-06 12:15:06",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add bongkage\u002Ftrailofbits-skills --skill sharp-edges",{"tool":37,"command":38},"bunx","bunx skills add bongkage\u002Ftrailofbits-skills --skill sharp-edges",{"tool":40,"command":41},"pnpm","pnpm dlx skills add bongkage\u002Ftrailofbits-skills --skill sharp-edges","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002FSKILL.md",true,[45,51,57,61,65,69,73,77,81,85,89,93,97,101,105,109,113,117],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"agents\u002Fopenai.yaml","REFERENCE","参考文档",128,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Fagents\u002Fopenai.yaml",{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"assets\u002Ftrail-of-bits-mark.svg","ASSET","资产文件",3084,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Fassets\u002Ftrail-of-bits-mark.svg",{"path":58,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fauth-patterns.md",6999,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Fauth-patterns.md",{"path":62,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fcase-studies.md",8143,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Fcase-studies.md",{"path":66,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fconfig-patterns.md",9729,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Fconfig-patterns.md",{"path":70,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fcrypto-apis.md",5275,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Fcrypto-apis.md",{"path":74,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Flang-c.md",5683,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Flang-c.md",{"path":78,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Flang-csharp.md",7324,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Flang-csharp.md",{"path":82,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Flang-go.md",6661,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Flang-go.md",{"path":86,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Flang-java.md",6820,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Flang-java.md",{"path":90,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Flang-javascript.md",6933,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Flang-javascript.md",{"path":94,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Flang-kotlin.md",6751,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Flang-kotlin.md",{"path":98,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Flang-php.md",6179,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Flang-php.md",{"path":102,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Flang-python.md",6616,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Flang-python.md",{"path":106,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":107,"sourceHtmlUrl":108},"references\u002Flang-ruby.md",6213,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Flang-ruby.md",{"path":110,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":111,"sourceHtmlUrl":112},"references\u002Flang-rust.md",6545,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Flang-rust.md",{"path":114,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":115,"sourceHtmlUrl":116},"references\u002Flang-swift.md",6252,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Flang-swift.md",{"path":118,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":119,"sourceHtmlUrl":120},"references\u002Flanguage-specific.md",13267,"https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fsharp-edges\u002Fskills\u002Fsharp-edges\u002Freferences\u002Flanguage-specific.md",[122,129,136,143,150,157],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":18},"01M7CHJAESZRWKJXFQG55BMNAA","zeroize-audit","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\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fzeroize-audit\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":18},"01M7CHJ543G42A9GQC3PJE4F4V","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fyara-authoring\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":18},"01M7CHHYVFS1AKDTH3YDS1Y4K4","writing-lean-proofs","Writes and reviews structured Lean 4 proofs and designs Lean libraries following Mathlib conventions. Use when proving theorems in Lean, formalizing mathematics or specifications in Lean 4, defining new types or definitions in a Lean library, reviewing Lean proofs for readability and maintainability, refactoring long tactic proofs into lemmas, filling in sorry placeholders in a Lean development, setting up CI or linters for a Lean project, diagnosing slow proofs or maxHeartbeats timeouts, or writing custom tactics, macros, or linters.","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fwriting-lean-proofs\u002Fskills\u002Fwriting-lean-proofs\u002FSKILL.md",[],[],{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":18},"01M7CHHQXA39M4965MV2RMM5YS","vulnerability-triage-brocards","This skill should be used when the user asks to \"triage a vulnerability report\", \"assess a CVE\", \"evaluate a bug bounty submission\", \"decide if a finding is valid\", \"review a security finding\", \"dismiss a vulnerability\", \"should we fix this CVE\", \"prioritize a vulnerability report\", or needs to determine whether an incoming vulnerability report warrants investigation. Applies 7 brocards (rules of thumb) to systematically accept, dismiss, or request more information on vulnerability reports, or needs to filter raw findings from agentic vulnerability discovery pipelines before human review.","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fvulnerability-triage-brocards\u002Fskills\u002Fvulnerability-triage-brocards\u002FSKILL.md",[],[],{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":156,"publishedAt":18},"01M7CHHJVQC2ZG2M310GXT0T42","variant-analysis","Hunts for the other instances of a bug already found — the variants of one root cause across a codebase. Use immediately after a vulnerability, logic bug, or bad pattern turns up in a specific file and the question becomes where else it occurs, including the bare conversational form (\"are there others like this?\", \"is this the same bug?\"). Also for generalizing one known instance into a CodeQL or Semgrep query for its whole pattern family, and for triaging a set of look-alike candidates against a known root cause. Not for initial discovery with no bug in hand.","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fvariant-analysis\u002Fskills\u002Fvariant-analysis\u002FSKILL.md",[],[],{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":18},"01M7CHHC1GM5GH585ZWGP7D03P","vector-forge","Mutation-driven test vector generation. Finds implementations of a cryptographic algorithm or protocol, runs mutation testing to identify escaped mutants, then generates new test vectors that deliberately exercise the uncovered code paths. Compares before\u002Fafter mutation kill rates to prove vector effectiveness. Use when generating cryptographic test vectors, measuring Wycheproof coverage gaps, finding escaped mutants via mutation testing, creating cross-implementation test suites, or improving test vector coverage for crypto primitives.","https:\u002F\u002Fgithub.com\u002Fbongkage\u002Ftrailofbits-skills\u002Fblob\u002Fmain\u002Fplugins\u002Ftrailmark\u002Fskills\u002Fvector-forge\u002FSKILL.md",[],[]]