reproduction-trace-instrumenter — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited reproduction-trace-instrumenter (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.
This skill instruments source code to capture detailed execution traces for bug reproduction. It records function calls, variable values, control flow, and program state, then generates replay scripts to deterministically reproduce the bug for diagnosis.
Before instrumentation, understand:
Use the appropriate instrumenter for your language:
#### Python Instrumentation
python scripts/python_instrumenter.py <source_file.py> -o <instrumented_file.py>Options:
--no-functions: Disable function call tracing--no-variables: Disable variable assignment tracing--no-control-flow: Disable control flow tracing--exclude <patterns>: Exclude functions matching patterns (e.g., __init__ test_*)Example:
# Full instrumentation
python scripts/python_instrumenter.py app.py -o app_instrumented.py
# Minimal instrumentation (functions only)
python scripts/python_instrumenter.py app.py -o app_instrumented.py --no-variables --no-control-flow
# Exclude test functions
python scripts/python_instrumenter.py app.py -o app_instrumented.py --exclude test_ __Execute the instrumented program with the inputs that trigger the bug:
python app_instrumented.pyThe execution trace will be automatically saved to trace.json when the program exits.
Trace Output:
trace.json: Complete execution trace with all recorded eventsGenerate a human-readable summary:
python scripts/replay_generator.py trace.json --summaryThis shows:
Create a replay script to reproduce the bug:
python scripts/replay_generator.py trace.json -o replay.pyRun the replay script:
python replay.pyThe replay script executes the same sequence of operations, allowing you to:
Use the trace configuration template to customize instrumentation:
cp assets/trace_config_template.json trace_config.json
# Edit trace_config.json as neededKey Configuration Options:
Instrumentation Level:
trace_functions: Record function entry/exittrace_variables: Record variable assignmentstrace_control_flow: Record if/else, loopstrace_exceptions: Record exception handlingFiltering:
exclude_patterns: Function name patterns to skipexclude_modules: Modules to skip entirelymax_string_length: Truncate long stringsmax_call_depth: Limit trace depthPerformance:
buffer_size: Events to buffer before writingasync_write: Write traces asynchronouslymax_trace_size_mb: Maximum trace file sizeChoose the appropriate level based on your needs:
python scripts/python_instrumenter.py app.py -o app_inst.py --no-variables --no-control-flowpython scripts/python_instrumenter.py app.py -o app_inst.py --no-control-flowpython scripts/python_instrumenter.py app.py -o app_inst.pyUser: "I have a bug that only happens sometimes. Help me capture what's happening."
→ Instrument with full tracing
→ Run multiple times until bug occurs
→ Analyze the trace from the failing run
→ Generate replay script to reproduce consistentlyUser: "I don't understand why this function returns the wrong value."
→ Instrument with functions + variables
→ Run with problematic input
→ Review trace to see variable values at each step
→ Identify where the logic goes wrongUser: "Users report a crash but I can't reproduce it locally."
→ Instrument production code (minimal level for performance)
→ Deploy and wait for crash
→ Retrieve trace.json from crashed instance
→ Generate replay script to reproduce locallyUser: "I fixed a bug. How do I ensure it doesn't come back?"
→ Capture trace of the bug before fix
→ Generate replay script
→ Use replay script as regression test
→ Run after each code changeTraces are stored in JSON format with the following structure:
{
"traces": [
{
"seq": 1,
"timestamp": "2024-01-15T10:30:45.123",
"type": "function_entry",
"depth": 0,
"data": {
"function": "calculate_total",
"arguments": {"price": 100, "tax_rate": 0.08}
}
},
{
"seq": 2,
"timestamp": "2024-01-15T10:30:45.125",
"type": "variable_assignment",
"depth": 1,
"data": {
"variable": "tax",
"value": 8.0,
"type": "float"
}
}
],
"metadata": {
"total_events": 2,
"max_depth": 1
}
}--exclude to skip irrelevant code pathsModify scripts/python_instrumenter.py to add custom tracing:
For programs with multiple processes:
For distributed systems:
AST-based Python code instrumenter that:
Trace replay script generator that:
Comprehensive guide covering:
Read this reference when you need deeper understanding of instrumentation theory, want to implement instrumenters for other languages, or need to optimize trace performance.
Configuration template for customizing:
Copy and modify this template to create custom trace configurations for specific use cases.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.