mocking-test-generator — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited mocking-test-generator (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.
Generate unit tests with proper mocking of external dependencies for Python and Java code.
Read the target code to identify:
Ask clarifying questions if:
Python: Use unittest.mock with pytest or unittest
@patch decorator for external callsMock() objects for complex dependenciespytest.fixture for reusable mocksJava: Use Mockito with JUnit 5
@Mock annotation for dependencies@ExtendWith(MockitoExtension.class) to test classwhen().thenReturn() for stubbingIdentify what to mock:
Always mock:
Never mock (unless explicitly requested):
For common patterns, reference:
Generate test code that:
Test structure:
# Python example
from unittest.mock import patch, Mock
import pytest
@patch('module.external_dependency')
def test_function_name(mock_dependency):
# Arrange: Setup mock behavior
mock_dependency.return_value = expected_value
# Act: Execute function under test
result = function_under_test(input_data)
# Assert: Verify results
assert result == expected_output
mock_dependency.assert_called_once_with(expected_args)// Java example
@ExtendWith(MockitoExtension.class)
class ServiceTest {
@Mock
private ExternalDependency dependency;
@Test
void testMethodName() {
// Arrange: Setup mock behavior
when(dependency.method()).thenReturn(expectedValue);
// Act: Execute method under test
Service service = new Service(dependency);
String result = service.methodUnderTest();
// Assert: Verify results
assertEquals(expectedOutput, result);
verify(dependency).method();
}
}Include:
Include comments that explain:
Keep comments concise and focused on non-obvious aspects.
Provide:
Do not:
User request: "Generate unit tests for this Python function that calls an external API"
Response:
@patch decoratorPython (pytest):
@pytest.fixture for reusable mock setups@patch as decorator or context managermock_open for file operations@patch.dict for environment variablesPython (unittest):
unittest.TestCase base class@patch decorator or patch() context managersetUp() and tearDown() methodsself.assert* methodsJava (Mockito + JUnit 5):
@ExtendWith(MockitoExtension.class) on test class@Mock for dependencies@BeforeEach for setup, @AfterEach for teardownArgumentCaptor to verify complex argumentsMockedStatic for static method mocking (Mockito 3.4+)Reference files contain detailed examples for:
Python (references/python_patterns.md):
Java (references/java_patterns.md):
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.