bugfix — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited bugfix (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A systematic approach to diagnosing, fixing, and verifying bugs across TypeScript, Python, and Rust codebases.
Before touching code, collect:
# TypeScript/Node
npm run dev # or specific test command
# Note: exact input that triggers bug
# Python
python -m pytest tests/test_specific.py -xvs -k "test_name"
# or: python script.py --input that_causes_bug
# Rust
cargo run --example reproduction_case
# or: cargo test specific_test -- --nocapture**Bug**: [One-line description]
**Reproduces**: [Always | 50% | Only on X]
**Steps**:
1. [Action 1]
2. [Action 2]
3. [Observe: expected X, got Y] # Search for error message in codebase
# Grep for the function/method in stack trace git log --oneline -20 -- path/to/affected/file.ts
git bisect start HEAD <known-good-commit>TypeScript:
as any, ! operator)Python:
def f(x=[]))== vs is)Rust:
TypeScript:
// Add explicit null checks
if (value === null || value === undefined) {
throw new Error(`Expected value, got ${value}`);
}
// Use type guards for narrowing
function isValidResponse(r: unknown): r is ApiResponse {
return r !== null && typeof r === 'object' && 'data' in r;
}
// Fix async issues with proper error boundaries
try {
const result = await riskyOperation();
} catch (e) {
// Handle or rethrow with context
throw new Error(`Operation failed: ${e.message}`, { cause: e });
}Python:
# Add explicit validation
if value is None:
raise ValueError(f"Expected value, got None for {param_name}")
# Fix mutable defaults
def process(items: list[str] | None = None) -> list[str]:
items = items or []
# ...
# Add type hints for clarity
def fetch_data(url: str) -> dict[str, Any]:
...Rust:
// Replace unwrap with proper error handling
let value = risky_operation()
.map_err(|e| anyhow!("Operation failed: {}", e))?;
// Add explicit match for Option
match optional_value {
Some(v) => process(v),
None => return Err(anyhow!("Missing required value")),
}
// Use expect with context for truly impossible cases
let config = load_config().expect("Config file validated at startup");# TypeScript (Vitest/Jest)
npm run test -- --watch path/to/test.spec.ts
# Python (pytest)
python -m pytest tests/test_module.py -xvs --tb=short
# Rust
cargo test test_name -- --nocapture// TypeScript
describe('functionName', () => {
it('should handle the previously failing case', () => {
// Arrange: setup that caused the bug
const input = { problematicField: null };
// Act: call the function
const result = functionName(input);
// Assert: verify correct behavior
expect(result).toEqual(expectedOutput);
});
});# Python
def test_handles_previously_failing_case():
"""Regression test for issue #123: null handling."""
# Arrange
input_data = {"problematic_field": None}
# Act
result = function_name(input_data)
# Assert
assert result == expected_output// Rust
#[test]
fn test_handles_previously_failing_case() {
// Arrange
let input = ProblematicInput { field: None };
// Act
let result = function_name(input);
// Assert
assert_eq!(result, expected_output);
}npm test, pytest, cargo test)Add a comment at the fix location:
// Fix for #123: Previously failed when x was null because Y.
// The null check here ensures Z before proceeding.Consider whether this bug class can be prevented:
| Bug Class | Prevention |
|---|---|
| Null/None errors | Stricter types, non-null assertions at boundaries |
| Type mismatches | Stronger typing, runtime validation (zod, pydantic) |
| Async race conditions | State machines, explicit ordering |
| Missing error handling | Linter rules (no-floating-promises, must_use) |
| Off-by-one errors | Property-based testing |
fix(module): short description of the fix
Root cause: [What was actually wrong]
Fix: [What was changed and why]
Fixes #123# TypeScript - verbose test output
DEBUG=* npm test -- --verbose
# Python - drop into debugger on failure
python -m pytest --pdb -x
# Rust - show println in tests
cargo test -- --nocapture
# Git - find when bug was introduced
git bisect start HEAD v1.0.0
git bisect run npm test// TypeScript
console.log(JSON.stringify(obj, null, 2));
console.trace('How did we get here?');# Python
import pdb; pdb.set_trace() # or breakpoint() in 3.7+
print(f"{var=}") # f-string debug syntax// Rust
dbg!(&variable);
println!("{:#?}", struct_value);~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.