How to Handle Offline Samples in Reverse-Skill Case Initialization
Reverse-Skill requires the offline-sample preset and an explicit sample path when initializing cases with local artifacts to satisfy the authentication hard gate.
The zhaoxuya520/reverse-skill framework enforces strict validation before any active analysis can begin. When working with offline artifacts such as APKs or binary files, you must handle offline samples in reverse-skill case initialization by invoking the platform-specific case-init script with the correct preset and authentication parameters.
Understanding the Hard Gate Requirement
The reverse-skill platform implements a mandatory hard gate that blocks all active (ACT) operations until authentication requirements are met. According to the source code in RULES.md, the system requires both auth.status=granted and a valid offline-sample scope before permitting any analysis work to proceed. This gate cannot be bypassed and serves as the primary security control for local artifact handling.
Initializing Cases with the Offline-Sample Preset
To satisfy the hard gate for offline artifacts, invoke the case-init script using the offline-sample preset and provide the absolute or relative path to your sample file.
PowerShell (Windows)
On Windows systems, use the PowerShell implementation located at skills/scripts/case-init.ps1:
powershell -File skills/scripts/case-init.ps1 `
-Hint "offline apk" `
-CaseName "my-sample" `
-Preset offline-sample `
-Sample ".\app.apk"
This command is documented in skills/MASTER-ROUTING.md (lines 30-33) and creates the case structure under work/my-sample/.
Bash (Linux/macOS/Kali)
For Unix-like environments, use the Bash implementation at skills/scripts/case-init.sh:
bash skills/scripts/case-init.sh \
--hint "offline apk" \
--case-name "my-sample" \
--preset offline-sample \
--sample ./app.apk
As shown in skills/MASTER-ROUTING.md (lines 49-52), this command establishes the case directory with the proper authentication metadata required by the framework.
What the Preset Configures
When you specify the offline-sample preset, the initialization script performs three critical actions:
- Creates the case directory under
work/<case-name>/with the standard reverse-skill structure. - Generates
scope.mdcontainingauth.status=grantedand an explicit reference to the supplied sample file path. - Validates the artifact against the offline-sample contract defined in
skills/ops/scope-contract.md.
The resulting scope.md file satisfies the gating rule in RULES.md (lines 20-22) that mandates "auth.status=granted + a valid offline-sample scope is required before ACT".
Critical Gating Rules
The reverse-skill framework enforces two non-negotiable policies regarding offline samples:
- Never bypass the gate: The
-Forceor--forceflag is explicitly prohibited from overriding the authentication check. As stated inRULES.md(lines 391-398), force flags cannot circumvent theauth.statusverification. - Explicit sample required: An offline case is only valid when the sample is supplied via the
--sample(or-Sample) argument together with theoffline-samplepreset. Theskills/SKILL.mdfile (lines 14-16) codifies this requirement, ensuring that every offline case has a traceable artifact reference.
Verification Workflow
After initialization, verify that your case meets the hard gate requirements:
- Open
work/<case-name>/scope.mdand confirm it containsauth.status=grantedand asample:entry pointing to your artifact. - Validate that the sample file path is accessible from the case directory.
- Proceed with subsequent skill scripts (e.g., static analysis, reverse engineering) knowing the authentication gate is satisfied.
If scope.md lacks the granted status or sample reference, the framework will reject any ACT commands until you reinitialize with the correct preset.
Summary
- Use the
offline-samplepreset when invokingcase-initto authorize offline artifacts. - Provide the
--sampleargument with the path to your local APK, binary, or other artifact. - Verify
scope.mdcontainsauth.status=grantedbefore attempting active analysis. - Never use
--forceto bypass authentication; the hard gate cannot be overridden. - Reference
skills/ops/scope-contract.mdfor the complete offline-sample specification.
Frequently Asked Questions
What happens if I forget to specify the --sample argument?
The initialization will fail or create an incomplete case scope that cannot pass the hard gate. According to skills/SKILL.md (lines 14-16), the offline-sample preset requires an explicit sample path to establish a valid authorization scope. Without it, subsequent ACT commands will be rejected.
Can I use the --force flag to bypass the offline sample check?
No. The reverse-skill framework explicitly prohibits using -Force or --force to override authentication checks. As documented in RULES.md (lines 391-398), force flags do not circumvent the auth.status=granted requirement, ensuring security controls remain intact.
Where is the authorization status stored?
The authorization status is written to work/<case-name>/scope.md during initialization. This file contains the auth.status=granted declaration along with metadata linking the case to the specific offline sample file, satisfying the gating rules defined in RULES.md.
Is the offline-sample preset supported on all platforms?
Yes. The framework provides platform-native implementations in skills/scripts/case-init.ps1 for Windows and skills/scripts/case-init.sh for Linux, macOS, and Kali. Both scripts support the offline-sample preset and enforce identical gating rules across operating systems.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →